Skip to content

Commit ffdc9b9

Browse files
committed
chore: use testId for test selectors
1 parent fb91387 commit ffdc9b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/production/main-page-buttons.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test.describe('Main page buttons', () => {
88
});
99

1010
test('Hero section Get started button', async ({ page }) => {
11-
const getStartedButton = page.getByRole('link', { name: 'Get started' }).first();
11+
const getStartedButton = page.getByTestId('hero-block').getByRole('link', { name: 'Get started' });
1212
await expect(getStartedButton).toBeVisible();
1313
await getStartedButton.click();
1414
await expect(page.url()).toContain('/docs/getting-started.html');
@@ -26,7 +26,7 @@ test.describe('Main page buttons', () => {
2626
});
2727

2828
test('Why Kotlin Get started button', async ({ page }) => {
29-
const whyKotlinButton = page.locator('a[class*=\'why-kotlin\']');
29+
const whyKotlinButton = page.getByTestId('why-kotlin-block').getByRole('link', { name: 'Get started' });
3030
await expect(whyKotlinButton).toBeVisible();
3131
await whyKotlinButton.click();
3232
await expect(page.url()).toContain('/docs/getting-started.html');
@@ -62,7 +62,7 @@ test.describe('Main page buttons', () => {
6262
});
6363

6464
test('Get started in AI section', async ({ page }) => {
65-
const getStartedKoogButton = page.locator('a[class*=\'kotlin-plus-ai\'] span[data-test=\'button__content\']');
65+
const getStartedKoogButton = page.getByTestId('kotlin-plus-ai-block').getByRole('link', { name: 'Get started' });
6666
await expect(getStartedKoogButton).toBeVisible();
6767
await getStartedKoogButton.click();
6868
await expect(page.url()).toContain('/docs.koog.ai/')

0 commit comments

Comments
 (0)