Skip to content

Commit

Permalink
test(playwright): fix all references to docs page link in website (#2684
Browse files Browse the repository at this point in the history
)

* test(playwright): fix all references to docs page link in website

* test(playwright): remove unnecessary get by label
  • Loading branch information
bernardobridge committed Apr 30, 2024
1 parent 1ce4ccd commit af8834b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 18 deletions.
4 changes: 1 addition & 3 deletions examples/browser-load-testing-playwright/flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ async function checkOutArtilleryCoreConceptsFlow(
const req = await requestPromise;
});
await test.step('Go to docs', async () => {
const docs = await page
.getByLabel('Main navigation')
.getByRole('link', { name: 'Documentation' });
const docs = await page.getByRole('link', { name: 'Docs' });
await docs.click();
await page.waitForURL('https://www.artillery.io/docs');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ export const goToDocsAndSearch = async (page: Page, step) => {
});

await step('go_to_docs', async () => {
await page
.getByLabel('Main navigation')
.getByRole('link', { name: 'Documentation' })
.click();
await page.getByRole('link', { name: 'Docs' }).click();
await expect(page).toHaveURL('/docs');
await expect(
page.getByText("What's different about Artillery?")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ async function artilleryPlaywrightFunction(page, vuContext, events, test) {
});

await test.step('go_to_docs', async () => {
await page
.getByLabel('Main navigation')
.getByRole('link', { name: 'Documentation' })
.click();
await page.getByRole('link', { name: 'Docs' }).click();
await expect(page).toHaveURL('/docs');
await expect(
page.getByText("What's different about Artillery?")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ export async function artilleryPlaywrightFunction(
});

await test.step('go_to_docs', async () => {
await page
.getByLabel('Main navigation')
.getByRole('link', { name: 'Documentation' })
.click();
await page.getByRole('link', { name: 'Docs' }).click();
await expect(page).toHaveURL('/docs');
await expect(
page.getByText("What's different about Artillery?")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ async function simpleCheck(page, userContext, events, test) {
const req = await requestPromise;
});
await test.step('Go to docs', async () => {
const docs = await page
.getByLabel('Main navigation')
.getByRole('link', { name: 'Documentation' });
const docs = await page.getByRole('link', { name: 'Docs' });
await docs.click();
await page.waitForURL('https://www.artillery.io/docs');
});
Expand Down

0 comments on commit af8834b

Please sign in to comment.