From f866274360593032db9292be9bc5f004b4d8ed79 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Wed, 25 May 2022 08:46:17 +0200 Subject: [PATCH] chore: enable anchor navigation tests for Firefox (#8394) --- test/frame.spec.ts | 25 +++++++++++-------------- test/navigation.spec.ts | 6 +++--- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/test/frame.spec.ts b/test/frame.spec.ts index 40efc7989708c..94bf572153641 100644 --- a/test/frame.spec.ts +++ b/test/frame.spec.ts @@ -134,19 +134,16 @@ describe('Frame specs', function () { expect(detachedFrames[0].isDetached()).toBe(true); } ); - itFailsFirefox( - 'should send "framenavigated" when navigating on anchor URLs', - async () => { - const { page, server } = getTestState(); + it('should send "framenavigated" when navigating on anchor URLs', async () => { + const { page, server } = getTestState(); - await page.goto(server.EMPTY_PAGE); - await Promise.all([ - page.goto(server.EMPTY_PAGE + '#foo'), - utils.waitEvent(page, 'framenavigated'), - ]); - expect(page.url()).toBe(server.EMPTY_PAGE + '#foo'); - } - ); + await page.goto(server.EMPTY_PAGE); + await Promise.all([ + page.goto(server.EMPTY_PAGE + '#foo'), + utils.waitEvent(page, 'framenavigated'), + ]); + expect(page.url()).toBe(server.EMPTY_PAGE + '#foo'); + }); it('should persist mainFrame on cross-process navigation', async () => { const { page, server } = getTestState(); @@ -164,7 +161,7 @@ describe('Frame specs', function () { await page.goto(server.EMPTY_PAGE); expect(hasEvents).toBe(false); }); - itFailsFirefox('should detach child frames on navigation', async () => { + it('should detach child frames on navigation', async () => { const { page, server } = getTestState(); let attachedFrames = []; @@ -186,7 +183,7 @@ describe('Frame specs', function () { expect(detachedFrames.length).toBe(4); expect(navigatedFrames.length).toBe(1); }); - itFailsFirefox('should support framesets', async () => { + it('should support framesets', async () => { const { page, server } = getTestState(); let attachedFrames = []; diff --git a/test/navigation.spec.ts b/test/navigation.spec.ts index b8ff839e0682c..a7d0e36b8988c 100644 --- a/test/navigation.spec.ts +++ b/test/navigation.spec.ts @@ -35,7 +35,7 @@ describe('navigation', function () { await page.goto(server.EMPTY_PAGE); expect(page.url()).toBe(server.EMPTY_PAGE); }); - itFailsFirefox('should work with anchor navigation', async () => { + it('should work with anchor navigation', async () => { const { page, server } = getTestState(); await page.goto(server.EMPTY_PAGE); @@ -488,7 +488,7 @@ describe('navigation', function () { }); describe('Page.waitForNavigation', function () { - itFailsFirefox('should work', async () => { + it('should work', async () => { const { page, server } = getTestState(); await page.goto(server.EMPTY_PAGE); @@ -526,7 +526,7 @@ describe('navigation', function () { await bothFiredPromise; await navigationPromise; }); - itFailsFirefox('should work with clicking on anchor links', async () => { + it('should work with clicking on anchor links', async () => { const { page, server } = getTestState(); await page.goto(server.EMPTY_PAGE);