Skip to content

Commit

Permalink
Add screenshot of welcome page in visual test
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

<rikaitan.link>ZjAyYmUxOGJkMzcyZjMwYTYxM2Y5OWZiNmI5ZjZkNWJhMTIwNjRmMQo=</rikaitan.link>
  • Loading branch information
jason-ojisan committed Oct 13, 2024
1 parent 5773eac commit 2c3b462
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 Rikaitan by Ajatt-Tools!')).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 2c3b462

Please sign in to comment.