From 0a0994ca64fceafde05997d93e5ca7d6e5baa7b2 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 20 Dec 2023 00:31:45 -0500 Subject: HTML test updates (#398) * Rename y-test to test-case * Rename y-description to test-description * Remove extension name * Update placeholder favicon * Refactor scripts * Make element types more consistent * More updates * Rename * Simplify file URLs * Rename file * Add descriptions * Rename * Rename * Rename --- test/playwright/visual.spec.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'test/playwright') 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; -- cgit v1.2.3