Files
directus/tests-blackbox/routes/fields/crud.seed.ts
ian addb077d48 Emit action events with updated schema (#15576)
* Emit action events with updated schema

* Fix collections service consistency

* Pass action event upstream for createMany item

* Pass action event upstream when processing payload

* Skip unnecessary retrival of updated schema

* Fix folder tests

* Fields service consistency

* Prevent duplicate cache clearing when deleting fields

* Add tests_extensions_log table

* Update collections crud tests

* Add fields crud tests

* Add action verify schema tests

* Bypass system cache purge in relations service

* Bypass system cache purge in nested field deletion

* Update source for consistency when creating from collection
2022-11-15 10:02:45 -05:00

32 lines
756 B
TypeScript

import vendors from '@common/get-dbs-to-test';
import { CreateCollection, DeleteCollection, PRIMARY_KEY_TYPES } from '@common/index';
export const collection = 'test_fields_crud';
export const seedDBStructure = () => {
it.each(vendors)(
'%s',
async (vendor) => {
for (const pkType of PRIMARY_KEY_TYPES) {
try {
const localCollection = `${collection}_${pkType}`;
// Delete existing collections
await DeleteCollection(vendor, { collection: localCollection });
// Create countries collection
await CreateCollection(vendor, {
collection: localCollection,
primaryKeyType: pkType,
});
expect(true).toBeTruthy();
} catch (error) {
expect(error).toBeFalsy();
}
}
},
300000
);
};