diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-16 19:37:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 00:37:01 +0000 |
commit | 4e77741d22778bd09b772fc53f1cbd64107e3d24 (patch) | |
tree | e8010d42ccba5341afd98177d3c1d69d856cbcbd /test/playwright/visual.spec.js | |
parent | 1e69210b53151f31140bb1fbdc9f3d71fa181630 (diff) |
Even more eslint rules (#696)
* capitalized-comments
* Turn rules on
* Add miscellaneous rules
* More rules
Diffstat (limited to 'test/playwright/visual.spec.js')
-rw-r--r-- | test/playwright/visual.spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/playwright/visual.spec.js b/test/playwright/visual.spec.js index fc8bb8df..157cedc7 100644 --- a/test/playwright/visual.spec.js +++ b/test/playwright/visual.spec.js @@ -22,7 +22,7 @@ import {expect, root, test} from './playwright-util.js'; test.beforeEach(async ({context}) => { // Wait for the on-install welcome.html tab to load, which becomes the foreground tab const welcome = await context.waitForEvent('page'); - welcome.close(); // close the welcome tab so our main tab becomes the foreground tab -- otherwise, the screenshot can hang + welcome.close(); // Close the welcome tab so our main tab becomes the foreground tab -- otherwise, the screenshot can hang }); test('visual', async ({page, extensionId}) => { @@ -63,9 +63,9 @@ test('visual', async ({page, extensionId}) => { if (typeof popup_frame === 'undefined') { frame_attached = page.waitForEvent('frameattached'); } - await page.mouse.move(box.x + offset.x, box.y + offset.y, {steps: 10}); // hover over the test + await page.mouse.move(box.x + offset.x, box.y + offset.y, {steps: 10}); // Hover over the test if (typeof popup_frame === 'undefined') { - popup_frame = await frame_attached; // wait for popup to be attached + popup_frame = await frame_attached; // Wait for popup to be attached } try { // Some tests don't have a popup, so don't fail if it's not there @@ -75,11 +75,11 @@ test('visual', async ({page, extensionId}) => { console.log(test_name + ' has no popup'); } - await page.bringToFront(); // bring the page to the foreground so the screenshot doesn't hang; for some reason the frames result in page being in the background + await page.bringToFront(); // Bring the page to the foreground so the screenshot doesn't hang; for some reason the frames result in page being in the background await expect.soft(page).toHaveScreenshot(test_name + '.png'); - await page.mouse.click(0, 0); // click away so popup disappears - await (await /** @type {import('@playwright/test').Frame} */ (popup_frame).frameElement()).waitForElementState('hidden'); // wait for popup to disappear + await page.mouse.click(0, 0); // Click away so popup disappears + await (await /** @type {import('@playwright/test').Frame} */ (popup_frame).frameElement()).waitForElementState('hidden'); // Wait for popup to disappear }; // Test document 1 |