Skip to content

Commit 8637696

Browse files
committed
fix: just click on the first Docs link
1 parent 345773d commit 8637696

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/artillery-engine-playwright/test/fixtures/processor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function artilleryPlaywrightFunction(page, vuContext, events, test) {
2828
});
2929

3030
await test.step('go_to_docs', async () => {
31-
await page.getByRole('link', { name: 'Docs' }).click();
31+
await page.getByRole('link', { name: 'Docs' }).first().click();
3232
await expect(page).toHaveURL('/docs');
3333
await expect(page.getByText('Get started')).toBeVisible();
3434
});

packages/artillery-engine-playwright/test/fixtures/processor.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ export async function artilleryPlaywrightFunction(
3232
});
3333

3434
await test.step('go_to_docs', async () => {
35-
await page.getByRole('link', { name: 'Docs' }).click();
35+
await page.getByRole('link', { name: 'Docs' }).first().click();
3636
await expect(page).toHaveURL('/docs');
37-
await expect(
38-
page.getByText('Get started')
39-
).toBeVisible();
37+
await expect(page.getByText('Get started')).toBeVisible();
4038
});
4139

4240
events.emit('counter', 'custom_emitter', 1);

0 commit comments

Comments
 (0)