Skip to content

Commit

Permalink
chore: enable anchor navigation tests for Firefox (#8394)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliandescottes committed May 25, 2022
1 parent 3dae2b4 commit f866274
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
25 changes: 11 additions & 14 deletions test/frame.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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 = [];
Expand All @@ -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 = [];
Expand Down
6 changes: 3 additions & 3 deletions test/navigation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f866274

Please sign in to comment.