From da8cb5c07895947dc2e72158b80667588aa5bbd6 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Mon, 30 May 2022 15:00:55 +0200 Subject: [PATCH] Added possible fix for random test timeouts no issue Some tests timeout for an unknown reason. This commit adds some missing awaits for async test methods (that don't perform any async operation, but are marked as async). --- test/e2e-api/content/newsletters.test.js | 2 +- test/e2e-api/content/offers.test.js | 2 +- test/e2e-api/content/pages.test.js | 2 +- test/e2e-api/content/posts.test.js | 2 +- test/e2e-api/content/settings.test.js | 2 +- test/e2e-api/content/tiers.test.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/e2e-api/content/newsletters.test.js b/test/e2e-api/content/newsletters.test.js index ef7318d0e5..24935e1cca 100644 --- a/test/e2e-api/content/newsletters.test.js +++ b/test/e2e-api/content/newsletters.test.js @@ -13,7 +13,7 @@ describe('Newsletters Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); await fixtureManager.init('api_keys', 'newsletters'); - agent.authenticate(); + await agent.authenticate(); }); it('Can request only active newsletters', async function () { diff --git a/test/e2e-api/content/offers.test.js b/test/e2e-api/content/offers.test.js index bc6629d187..d21aa04e7a 100644 --- a/test/e2e-api/content/offers.test.js +++ b/test/e2e-api/content/offers.test.js @@ -15,7 +15,7 @@ describe('Offers Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); await fixtureManager.init('api_keys', 'members'); - agent.authenticate(); + await agent.authenticate(); }); it('Can read offer details from id', async function () { diff --git a/test/e2e-api/content/pages.test.js b/test/e2e-api/content/pages.test.js index 697191ca9b..41ca8b2e12 100644 --- a/test/e2e-api/content/pages.test.js +++ b/test/e2e-api/content/pages.test.js @@ -19,7 +19,7 @@ describe('Pages Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); await fixtureManager.init('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); - agent.authenticate(); + await agent.authenticate(); }); it('Can request pages', async function () { diff --git a/test/e2e-api/content/posts.test.js b/test/e2e-api/content/posts.test.js index 3b833fe49b..c874e81ff1 100644 --- a/test/e2e-api/content/posts.test.js +++ b/test/e2e-api/content/posts.test.js @@ -28,7 +28,7 @@ describe('Posts Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); await fixtureManager.init('owner:post', 'users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys', 'newsletters', 'members:newsletters'); - agent.authenticate(); + await agent.authenticate(); // Assign a newsletter to one of the posts const newsletterId = testUtils.DataGenerator.Content.newsletters[0].id; diff --git a/test/e2e-api/content/settings.test.js b/test/e2e-api/content/settings.test.js index e17c995506..8163d5a982 100644 --- a/test/e2e-api/content/settings.test.js +++ b/test/e2e-api/content/settings.test.js @@ -11,7 +11,7 @@ describe('Settings Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); await fixtureManager.init('api_keys'); - agent.authenticate(); + await agent.authenticate(); }); it('Can request settings', async function () { diff --git a/test/e2e-api/content/tiers.test.js b/test/e2e-api/content/tiers.test.js index 1d31ae1dce..7d9083b028 100644 --- a/test/e2e-api/content/tiers.test.js +++ b/test/e2e-api/content/tiers.test.js @@ -6,7 +6,7 @@ describe('Tiers Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); await fixtureManager.init('members', 'api_keys', 'tiers:archived'); - agent.authenticate(); + await agent.authenticate(); }); it('Can request only active tiers', async function () {