Skip to content

Commit

Permalink
Add screenshot of welcome page in visual test (#1477)
Browse files Browse the repository at this point in the history
* Add screenshot of welcome page in visual test

* Await #full-permissions-enabled div visible

* Try getByText
  • Loading branch information
MarvNC authored Oct 12, 2024
1 parent 7acf87e commit f02be18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/playwright/visual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ test.beforeEach(async ({context}) => {
});

test('visual', async ({page, extensionId}) => {
// Open welcome page
await page.goto(`chrome-extension://${extensionId}/welcome.html`);
await expect(page.getByText('Welcome to Yomitan!')).toBeVisible();

// Take a screenshot of the welcome page
await expect.soft(page).toHaveScreenshot('welcome-page.png');

// Open settings
await page.goto(`chrome-extension://${extensionId}/settings.html`);

Expand Down

0 comments on commit f02be18

Please sign in to comment.