diff --git a/test/functional/fixtures/concurrency/pages/first-page.html b/test/functional/fixtures/concurrency/pages/first-page.html index 4b9aa8812a8..db48ab14b37 100644 --- a/test/functional/fixtures/concurrency/pages/first-page.html +++ b/test/functional/fixtures/concurrency/pages/first-page.html @@ -5,6 +5,6 @@ Title -
Hey
+

First page

diff --git a/test/functional/fixtures/concurrency/pages/second-page.html b/test/functional/fixtures/concurrency/pages/second-page.html index 4b9aa8812a8..8d416a7dc1c 100644 --- a/test/functional/fixtures/concurrency/pages/second-page.html +++ b/test/functional/fixtures/concurrency/pages/second-page.html @@ -5,6 +5,6 @@ Title -
Hey
+

Second page

diff --git a/test/functional/fixtures/concurrency/test.js b/test/functional/fixtures/concurrency/test.js index f6925a86459..14204d29523 100644 --- a/test/functional/fixtures/concurrency/test.js +++ b/test/functional/fixtures/concurrency/test.js @@ -114,12 +114,14 @@ if (config.useLocalBrowsers) { }); } - it('Should run tests concurrently with Role', function () { - return run('chrome:headless --no-sandbox', 2, './testcafe-fixtures/role-test.js') - .then(() => { - expect(timeline.getData()).eql(['/fixtures/concurrency/pages/first-page.html', '/fixtures/concurrency/pages/second-page.html']); - }); - }); + if (!config.proxyless) { + it('Should run tests concurrently with Role', function () { + return run('chrome:headless --no-sandbox', 2, './testcafe-fixtures/role-test.js') + .then(() => { + expect(timeline.getData()).eql(['/fixtures/concurrency/pages/first-page.html', '/fixtures/concurrency/pages/second-page.html']); + }); + }); + } it('Should report fixture start correctly if second fixture finishes before first', function () { return run('chrome:headless --no-sandbox', 2, ['./testcafe-fixtures/multifixture-test-a.js', './testcafe-fixtures/multifixture-test-b.js'], customReporter) diff --git a/test/functional/fixtures/concurrency/testcafe-fixtures/role-test.js b/test/functional/fixtures/concurrency/testcafe-fixtures/role-test.js index 42e50484a26..b5dd54cd240 100644 --- a/test/functional/fixtures/concurrency/testcafe-fixtures/role-test.js +++ b/test/functional/fixtures/concurrency/testcafe-fixtures/role-test.js @@ -5,7 +5,6 @@ const DEMO_ROLE = Role('http://localhost:3000/fixtures/concurrency/pages/index.h }); fixture`F1` - .page('http://localhost:3000/fixtures/concurrency/pages/first-page.html') .beforeEach(async t => { await t.useRole(DEMO_ROLE); }) @@ -14,20 +13,10 @@ fixture`F1` timeline.clear(); }); -test('T1', async t => { - const location = await t.eval(() => window.location.pathname); +test('T1', async (t) => { + timeline.add(await t.eval(() => window.location.pathname)); +}).page('http://localhost:3000/fixtures/concurrency/pages/first-page.html'); - timeline.add(location); -}); - -fixture`F2` - .page('http://localhost:3000/fixtures/concurrency/pages/second-page.html') - .beforeEach(async t => { - await t.useRole(DEMO_ROLE); - }); - -test('T2', async t => { - const location = await t.eval(() => window.location.pathname); - - timeline.add(location); -}); +test('T2', async (t) => { + timeline.add(await t.eval(() => window.location.pathname)); +}).page('http://localhost:3000/fixtures/concurrency/pages/second-page.html');