Просмотр исходного кода

test(core): Await modified collection jobs

Attempting to solve flaky e2e tests in MySQL
Michael Bromley 5 лет назад
Родитель
Сommit
55b00b2c9d
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      packages/core/e2e/collection.e2e-spec.ts

+ 3 - 2
packages/core/e2e/collection.e2e-spec.ts

@@ -293,6 +293,7 @@ describe('Collection resolver', () => {
                 },
             });
 
+            await awaitRunningJobs(adminClient);
             expect(updateCollection).toMatchSnapshot();
 
             pearCollection = updateCollection;
@@ -309,7 +310,7 @@ describe('Collection resolver', () => {
                     featuredAssetId: assets[3].id,
                 },
             });
-
+            await awaitRunningJobs(adminClient);
             expect(updateCollection.assets.map(a => a.id)).toEqual([assets[3].id, assets[0].id]);
         });
 
@@ -323,7 +324,7 @@ describe('Collection resolver', () => {
                     assetIds: [],
                 },
             });
-
+            await awaitRunningJobs(adminClient);
             expect(updateCollection.assets).toEqual([]);
             expect(updateCollection.featuredAsset).toBeNull();
         });