summaryrefslogtreecommitdiff
path: root/test/playwright/visual.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/playwright/visual.spec.js')
-rw-r--r--test/playwright/visual.spec.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/playwright/visual.spec.js b/test/playwright/visual.spec.js
index b912f8b4..02efc985 100644
--- a/test/playwright/visual.spec.js
+++ b/test/playwright/visual.spec.js
@@ -16,12 +16,8 @@
*/
import path from 'path';
-
-import {
- expect,
- root,
- test
-} from './playwright-util';
+import {pathToFileURL} from 'url';
+import {expect, root, test} from './playwright-util';
test.beforeEach(async ({context}) => {
// wait for the on-install welcome.html tab to load, which becomes the foreground tab
@@ -86,8 +82,8 @@ test('visual', async ({page, extensionId}) => {
await (await /** @type {import('@playwright/test').Frame} */ (popup_frame).frameElement()).waitForElementState('hidden'); // wait for popup to disappear
};
- // Load test-document1.html
- await page.goto('file://' + path.join(root, 'test/data/html/test-document1.html'));
+ // Test document 1
+ await page.goto(pathToFileURL(path.join(root, 'test/data/html/document-util.html')).toString());
await page.setViewportSize({width: 1000, height: 1800});
await page.keyboard.down('Shift');
let i = 1;
@@ -96,8 +92,8 @@ test('visual', async ({page, extensionId}) => {
i++;
}
- // Load test-document2.html
- await page.goto('file://' + path.join(root, 'test/data/html/test-document2.html'));
+ // Test document 2
+ await page.goto(pathToFileURL(path.join(root, 'test/data/html/popup-tests.html')).toString());
await page.setViewportSize({width: 1000, height: 4500});
await page.keyboard.down('Shift');
i = 1;