Skip to content

Commit fc64b47

Browse files
committed
refactor: reorder visual test to avoid network issue
1 parent 4994f27 commit fc64b47

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/e2e/Visual.e2e.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,28 @@ test.describe('Visual testing', () => {
1212
await takeSnapshot(page, testInfo);
1313
});
1414

15-
test('should take screenshot of the about page', async ({ page }, testInfo) => {
16-
await page.goto('/about');
15+
test('should take screenshot of the portfolio page', async ({ page }, testInfo) => {
16+
await page.goto('/portfolio');
1717

1818
await expect(
19-
page.getByRole('link', { name: 'About' }),
19+
page.getByText('Welcome to my portfolio page!'),
2020
).toBeVisible();
2121

2222
await takeSnapshot(page, testInfo);
2323
});
2424

25-
test('should take screenshot of the portfolio page', async ({ page }, testInfo) => {
26-
await page.goto('/portfolio');
25+
test('should take screenshot of the about page', async ({ page }, testInfo) => {
26+
await page.goto('/about');
2727

2828
await expect(
29-
page.getByText('Welcome to my portfolio page!'),
29+
page.getByText('Welcome to our About page!'),
3030
).toBeVisible();
3131

3232
await takeSnapshot(page, testInfo);
3333
});
3434

3535
test('should take screenshot of the portfolio details page', async ({ page }, testInfo) => {
36-
await page.goto('/portfolio');
37-
38-
await page.getByRole('link', { name: 'Portfolio 2' }).click();
36+
await page.goto('/portfolio/2');
3937

4038
await expect(
4139
page.getByText('Created a set of promotional'),

0 commit comments

Comments
 (0)