Skip to content

Commit

Permalink
chore(SPV-1000): test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
swierzbicki committed Oct 11, 2024
1 parent ccb917c commit 5d0fc7f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import { GitHubActionOptions } from '@estruyf/github-actions-reporter';
/**
* See https://playwright.dev/docs/test-configuration.
*/

console.log('process.env.CI: ', process.env.CI);

export default defineConfig({
testDir: './src/__tests__',
snapshotPathTemplate: '{testDir}/{testFileDir}/__screenshoots__/{testName}/{platform}/{arg}{ext}',
Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 6 additions & 2 deletions src/__tests__/visual/login-page/login-page.visual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ test.describe('login page', () => {
const loginPage = new LoginPage(page);
await loginPage.open();

await expect(loginPage.page).toHaveScreenshot();
await expect(async () => {
await expect(loginPage.page).toHaveScreenshot();
}).toPass();
});

test('login with invalid credentials', async ({ page }) => {
const loginPage = new LoginPage(page);
await loginPage.login('invalid-xpriv-key');

await expect(loginPage.page).toHaveScreenshot();
await expect(async () => {
await expect(loginPage.page).toHaveScreenshot();
}).toPass();
});
});
Binary file not shown.
4 changes: 3 additions & 1 deletion src/__tests__/visual/xpubs/xpubs-page.visual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ test.describe('xpubs page', () => {
await route.fulfill({ json });
});

await expect(loginPage.page).toHaveScreenshot();
await expect(async () => {
await expect(loginPage.page).toHaveScreenshot();
}).toPass();
});
});

0 comments on commit 5d0fc7f

Please sign in to comment.