aboutsummaryrefslogtreecommitdiff
path: root/test/playwright/visual.spec.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-20 00:31:45 -0500
committerGitHub <noreply@github.com>2023-12-20 05:31:45 +0000
commit0a0994ca64fceafde05997d93e5ca7d6e5baa7b2 (patch)
treec876ddcf63171ff1121f1e46799c2515e63ad370 /test/playwright/visual.spec.js
parent3c226215419ca815712e9568f7d871a96f5ff1cf (diff)
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
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;