From 186b994fba2406b26b37d448e70019ed33fd1f18 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Tue, 25 Jul 2023 08:30:03 +0200 Subject: [PATCH] test: upstream test and expectation for Firefox sync to puppeteer v20.9.0 (#10622) --- test/TestExpectations.json | 28 +++++++++++++++++----------- test/src/page.spec.ts | 4 ++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/test/TestExpectations.json b/test/TestExpectations.json index 0f1448b1..4b1ee37e 100644 --- a/test/TestExpectations.json +++ b/test/TestExpectations.json @@ -215,6 +215,12 @@ "parameters": ["webDriverBiDi"], "expectations": ["PASS"] }, + { + "testIdPattern": "[page.spec] Page Page.pdf should respect timeout", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["firefox"], + "expectations": ["SKIP"] + }, { "testIdPattern": "[page.spec] Page Page.setContent *", "platforms": ["darwin", "linux", "win32"], @@ -680,25 +686,25 @@ { "testIdPattern": "[headful.spec] headful tests HEADFUL headless should be able to read cookies written by headful", "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], + "parameters": ["webDriverBiDi", "headful"], "expectations": ["PASS"] }, { "testIdPattern": "[headful.spec] headful tests HEADFUL should close browser with beforeunload page", "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], + "parameters": ["webDriverBiDi", "headful"], "expectations": ["PASS"] }, { "testIdPattern": "[headful.spec] headful tests HEADFUL should have default url when launching browser", "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], + "parameters": ["webDriverBiDi", "headful"], "expectations": ["PASS"] }, { "testIdPattern": "[headful.spec] headful tests HEADFUL target.page() should return a DevTools page if custom isPageTarget is provided", "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], + "parameters": ["chrome", "webDriverBiDi"], "expectations": ["PASS"] }, { @@ -836,13 +842,13 @@ { "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.executablePath returns executablePath for channel", "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], + "parameters": ["chrome", "webDriverBiDi"], "expectations": ["PASS"] }, { "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.executablePath should work", "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], + "parameters": ["chrome", "webDriverBiDi"], "expectations": ["PASS"] }, { @@ -860,7 +866,7 @@ { "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should be able to launch Chrome", "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], + "parameters": ["chrome", "webDriverBiDi"], "expectations": ["FAIL"] }, { @@ -2162,7 +2168,7 @@ { "testIdPattern": "[headful.spec] headful tests HEADFUL target.page() should return a DevTools page if custom isPageTarget is provided", "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], + "parameters": ["firefox", "webDriverBiDi", "headful"], "expectations": ["FAIL"] }, { @@ -2378,19 +2384,19 @@ { "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.executablePath returns executablePath for channel", "platforms": ["darwin", "linux", "win32"], - "parameters": ["cdp", "firefox"], + "parameters": ["firefox"], "expectations": ["SKIP"] }, { "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.executablePath should work", "platforms": ["darwin", "linux", "win32"], - "parameters": ["cdp", "firefox"], + "parameters": ["firefox"], "expectations": ["SKIP"] }, { "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should be able to launch Chrome", "platforms": ["darwin", "linux", "win32"], - "parameters": ["cdp", "firefox"], + "parameters": ["firefox"], "expectations": ["SKIP"] }, { diff --git a/test/src/page.spec.ts b/test/src/page.spec.ts index 4c99ce48..ca45d2d0 100644 --- a/test/src/page.spec.ts +++ b/test/src/page.spec.ts @@ -830,8 +830,8 @@ describe('Page', function () { it('should fire when expected', async () => { const {page} = await getTestState(); - page.goto('about:blank'); - await waitEvent(page, 'domcontentloaded'); + const navigate = page.goto('about:blank'); + await Promise.all([waitEvent(page, 'domcontentloaded'), navigate]); }); });