|
|
@@ -2,9 +2,7 @@
|
|
|
import { ROOT_COLLECTION_NAME } from '@vendure/common/lib/shared-constants';
|
|
|
import {
|
|
|
DefaultJobQueuePlugin,
|
|
|
- DefaultLogger,
|
|
|
facetValueCollectionFilter,
|
|
|
- JobQueueService,
|
|
|
variantNameCollectionFilter,
|
|
|
} from '@vendure/core';
|
|
|
import { createTestEnvironment } from '@vendure/testing';
|
|
|
@@ -58,7 +56,6 @@ import { sortById } from './utils/test-order-utils';
|
|
|
describe('Collection resolver', () => {
|
|
|
const { server, adminClient, shopClient } = createTestEnvironment({
|
|
|
...testConfig,
|
|
|
- logger: new DefaultLogger(),
|
|
|
plugins: [DefaultJobQueuePlugin],
|
|
|
});
|
|
|
|
|
|
@@ -408,7 +405,7 @@ describe('Collection resolver', () => {
|
|
|
},
|
|
|
});
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
expect(updateCollection).toMatchSnapshot();
|
|
|
|
|
|
pearCollection = updateCollection;
|
|
|
@@ -425,7 +422,7 @@ describe('Collection resolver', () => {
|
|
|
featuredAssetId: assets[3].id,
|
|
|
},
|
|
|
});
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
expect(updateCollection.assets.map(a => a.id)).toEqual([assets[3].id, assets[0].id]);
|
|
|
});
|
|
|
|
|
|
@@ -439,7 +436,7 @@ describe('Collection resolver', () => {
|
|
|
assetIds: [],
|
|
|
},
|
|
|
});
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
expect(updateCollection.assets).toEqual([]);
|
|
|
expect(updateCollection.featuredAsset).toBeNull();
|
|
|
});
|
|
|
@@ -712,7 +709,7 @@ describe('Collection resolver', () => {
|
|
|
});
|
|
|
|
|
|
it('re-evaluates Collection contents on move', async () => {
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
|
|
|
const result = await adminClient.query<
|
|
|
GetCollectionProducts.Query,
|
|
|
@@ -922,7 +919,7 @@ describe('Collection resolver', () => {
|
|
|
},
|
|
|
);
|
|
|
collectionToDeleteChild = result2.createCollection;
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
});
|
|
|
|
|
|
it(
|
|
|
@@ -1166,7 +1163,7 @@ describe('Collection resolver', () => {
|
|
|
} as CreateCollectionInput,
|
|
|
});
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
const { collection } = await adminClient.query<GetCollection.Query, GetCollection.Variables>(
|
|
|
GET_COLLECTION,
|
|
|
{
|
|
|
@@ -1211,7 +1208,7 @@ describe('Collection resolver', () => {
|
|
|
} as CreateCollectionInput,
|
|
|
});
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
const { collection } = await adminClient.query<GetCollection.Query, GetCollection.Variables>(
|
|
|
GET_COLLECTION,
|
|
|
{
|
|
|
@@ -1265,7 +1262,7 @@ describe('Collection resolver', () => {
|
|
|
} as CreateCollectionInput,
|
|
|
});
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
const { collection } = await adminClient.query<GetCollection.Query, GetCollection.Variables>(
|
|
|
GET_COLLECTION,
|
|
|
{
|
|
|
@@ -1321,7 +1318,7 @@ describe('Collection resolver', () => {
|
|
|
],
|
|
|
},
|
|
|
});
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
return createCollection;
|
|
|
}
|
|
|
|
|
|
@@ -1469,7 +1466,7 @@ describe('Collection resolver', () => {
|
|
|
},
|
|
|
});
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
|
|
|
const result = await adminClient.query<
|
|
|
GetCollectionProducts.Query,
|
|
|
@@ -1502,7 +1499,7 @@ describe('Collection resolver', () => {
|
|
|
},
|
|
|
);
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
|
|
|
const result = await adminClient.query<
|
|
|
GetCollectionProducts.Query,
|
|
|
@@ -1536,7 +1533,7 @@ describe('Collection resolver', () => {
|
|
|
},
|
|
|
);
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
|
|
|
const result = await adminClient.query<
|
|
|
GetCollectionProducts.Query,
|
|
|
@@ -1589,7 +1586,7 @@ describe('Collection resolver', () => {
|
|
|
} as CreateCollectionInput,
|
|
|
});
|
|
|
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
|
|
|
const result = await adminClient.query<
|
|
|
GetCollectionProducts.Query,
|
|
|
@@ -1680,7 +1677,7 @@ describe('Collection resolver', () => {
|
|
|
input: [{ id: 'T_1', enabled: false }],
|
|
|
},
|
|
|
);
|
|
|
- await awaitRunningJobs(adminClient, 5000, 500);
|
|
|
+ await awaitRunningJobs(adminClient, 5000);
|
|
|
|
|
|
const { collection } = await shopClient.query<
|
|
|
GetCollectionProducts.Query,
|