From e14cf7ebac439f31cbed1c3d3ab13e7e256322f2 Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Thu, 9 Feb 2023 12:50:42 +0100 Subject: [PATCH] fix: update test expectations for next Firefox Nightly changes (#9635) --- test/TestExpectations.json | 132 ++----------------------------------- test/src/jshandle.spec.ts | 10 +-- 2 files changed, 8 insertions(+), 134 deletions(-) diff --git a/test/TestExpectations.json b/test/TestExpectations.json index c699d8f9..e262567e 100644 --- a/test/TestExpectations.json +++ b/test/TestExpectations.json @@ -59,18 +59,6 @@ "parameters": ["firefox"], "expectations": ["FAIL"] }, - { - "testIdPattern": "[browsercontext.spec] BrowserContext window.open should use parent tab context", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[browsercontext.spec] BrowserContext window.open should use parent tab context", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, { "testIdPattern": "[browsercontext.spec] BrowserContext should provide a context id", "platforms": ["linux"], @@ -359,54 +347,6 @@ "parameters": ["firefox"], "expectations": ["TIMEOUT", "PASS"] }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should be able to throw a tricky error", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should fail for circular object", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should fail for circular object", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should not throw an error when evaluation does a navigation", - "platforms": ["darwin", "win32", "linux"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should return undefined for non-serializable objects", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should return undefined for non-serializable objects", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should return undefined for objects with symbols", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should return undefined for objects with symbols", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, { "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should simulate a user gesture", "platforms": ["darwin", "win32"], @@ -421,22 +361,10 @@ }, { "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw a nice error after a navigation", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw a nice error after a navigation", - "platforms": ["linux"], + "platforms": ["darwin", "linux", "win32"], "parameters": ["firefox"], "expectations": ["FAIL"] }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw if elementHandles are from other frames", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, { "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should throw when evaluation triggers reload", "platforms": ["darwin", "linux", "win32"], @@ -445,16 +373,10 @@ }, { "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should work from-inside an exposed function", - "platforms": ["darwin", "win32"], + "platforms": ["darwin", "linux", "win32"], "parameters": ["firefox"], "expectations": ["SKIP"] }, - { - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should work from-inside an exposed function", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, { "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluateOnNewDocument should evaluate before anything else on the page", "platforms": ["darwin", "win32"], @@ -1607,12 +1529,6 @@ "parameters": ["firefox"], "expectations": ["SKIP"] }, - { - "testIdPattern": "[page.spec] Page Page.Events.Close should work with window.close", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, { "testIdPattern": "[page.spec] Page Page.Events.Console should have location and stack trace for console API calls", "platforms": ["darwin", "win32"], @@ -1693,16 +1609,10 @@ }, { "testIdPattern": "[page.spec] Page Page.Events.Popup should work", - "platforms": ["darwin", "win32"], + "platforms": ["darwin", "linux", "win32"], "parameters": ["firefox"], "expectations": ["SKIP"] }, - { - "testIdPattern": "[page.spec] Page Page.Events.Popup should work", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, { "testIdPattern": "[page.spec] Page Page.Events.Popup should work with clicking target=_blank and rel=noopener", "platforms": ["darwin", "linux", "win32"], @@ -2879,12 +2789,6 @@ "parameters": ["firefox"], "expectations": ["SKIP"] }, - { - "testIdPattern": "[target.spec] Target should be able to use async waitForTarget", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, { "testIdPattern": "[target.spec] Target should create a worker from a service worker", "platforms": ["darwin", "linux", "win32"], @@ -2905,39 +2809,15 @@ }, { "testIdPattern": "[target.spec] Target should not crash while redirecting if original request was missed", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[target.spec] Target should not crash while redirecting if original request was missed", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, - { - "testIdPattern": "[target.spec] Target should not report uninitialized pages", - "platforms": ["darwin", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"] - }, - { - "testIdPattern": "[target.spec] Target should not report uninitialized pages", - "platforms": ["linux"], - "parameters": ["firefox"], - "expectations": ["FAIL"] - }, - { - "testIdPattern": "[target.spec] Target should report when a new page is created and closed", - "platforms": ["darwin", "win32"], + "platforms": ["darwin", "linux", "win32"], "parameters": ["firefox"], "expectations": ["SKIP"] }, { "testIdPattern": "[target.spec] Target should report when a new page is created and closed", - "platforms": ["linux"], + "platforms": ["darwin", "linux", "win32"], "parameters": ["firefox"], - "expectations": ["FAIL"] + "expectations": ["SKIP"] }, { "testIdPattern": "[target.spec] Target should report when a service worker is created and destroyed", diff --git a/test/src/jshandle.spec.ts b/test/src/jshandle.spec.ts index a54b59a6..aa37bcde 100644 --- a/test/src/jshandle.spec.ts +++ b/test/src/jshandle.spec.ts @@ -168,7 +168,7 @@ describe('JSHandle', function () { expect(json).toEqual({}); }); it('should throw for circular objects', async () => { - const {page, isChrome} = getTestState(); + const {page} = getTestState(); const handle = await page.evaluateHandle(() => { const t: {t?: unknown; g: number} = {g: 1}; @@ -179,13 +179,7 @@ describe('JSHandle', function () { await handle.jsonValue().catch(error_ => { return (error = error_); }); - if (isChrome) { - expect(error.message).toContain( - 'Could not serialize referenced object' - ); - } else { - expect(error.message).toContain('Object is not serializable'); - } + expect(error.message).toContain('Could not serialize referenced object'); }); });