From 045ed9530dd18d92dde50f1f9bf7dd5cd9ebb47f Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Tue, 21 May 2024 21:47:02 +0200 Subject: [PATCH] test: add doctype to some screenshot tests to avoid running them in quirks mode (#12475) --- test/TestExpectations.json | 28 ---------------------------- test/src/screenshot.spec.ts | 5 +++-- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/test/TestExpectations.json b/test/TestExpectations.json index 64d3f10d7be..02e220953a6 100644 --- a/test/TestExpectations.json +++ b/test/TestExpectations.json @@ -3689,34 +3689,6 @@ "expectations": ["FAIL", "PASS"], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, - { - "testIdPattern": "[screenshot.spec] Screenshots ElementHandle.screenshot should work for an element with an offset", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["cdp", "firefox"], - "expectations": ["FAIL"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, - { - "testIdPattern": "[screenshot.spec] Screenshots ElementHandle.screenshot should work for an element with an offset", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], - "expectations": ["FAIL"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, - { - "testIdPattern": "[screenshot.spec] Screenshots ElementHandle.screenshot should work with a rotated element", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["cdp", "firefox"], - "expectations": ["FAIL"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, - { - "testIdPattern": "[screenshot.spec] Screenshots ElementHandle.screenshot should work with a rotated element", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], - "expectations": ["FAIL"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, { "testIdPattern": "[screenshot.spec] Screenshots Page.screenshot should clip clip bigger than the viewport without \"captureBeyondViewport\"", "platforms": ["darwin", "linux", "win32"], diff --git a/test/src/screenshot.spec.ts b/test/src/screenshot.spec.ts index d86bcba168f..c20a445aa1d 100644 --- a/test/src/screenshot.spec.ts +++ b/test/src/screenshot.spec.ts @@ -290,7 +290,8 @@ describe('Screenshots', function () { const {page} = await getTestState(); await page.setViewport({width: 500, height: 500}); - await page.setContent(`
' + '
' ); using elementHandle = (await page.$('div'))!; const screenshot = await elementHandle.screenshot();