From 04ab59c859e02a786f5ef2a8ad859de7c1a5b17b Mon Sep 17 00:00:00 2001 From: Naz Date: Tue, 23 Nov 2021 19:27:32 +0400 Subject: [PATCH] Rewrote reload routes.yaml test to use async/await no issue --- test/regression/site/dynamic_routing.test.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/test/regression/site/dynamic_routing.test.js b/test/regression/site/dynamic_routing.test.js index 47ea902114..494c770709 100644 --- a/test/regression/site/dynamic_routing.test.js +++ b/test/regression/site/dynamic_routing.test.js @@ -607,17 +607,12 @@ describe('Dynamic Routing', function () { }); describe('Reload routes.yaml', function () { - before(function (done) { - testUtils.clearData().then(function () { - // we initialise data, but not a user. No user should be required for navigating the frontend - return testUtils.initData(); - }).then(function () { - return testUtils.fixtures.overrideOwnerUser('ghost-owner'); - }).then(function () { - return testUtils.initFixtures('settings'); - }).then(function () { - done(); - }).catch(done); + before(async function () { + await testUtils.clearData(); + // we initialize data, but not a user. No user should be required for navigating the frontend + await testUtils.initData(); + await testUtils.fixtures.overrideOwnerUser('ghost-owner'); + await testUtils.initFixtures('settings'); }); after(testUtils.teardownDb); @@ -644,7 +639,7 @@ describe('Dynamic Routing', function () { path: path.join(config.get('paths:appRoot'), 'test', 'utils', 'fixtures', 'settings', 'newroutes.yaml') } }).then(() => { - return urlServiceUtils.isFinished({disableDbReadyEvent: true}); + return urlServiceUtils.isFinished(); }); });