@@ -8,7 +8,7 @@ test.describe('Main page buttons', () => {
8
8
} ) ;
9
9
10
10
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' } ) ;
12
12
await expect ( getStartedButton ) . toBeVisible ( ) ;
13
13
await getStartedButton . click ( ) ;
14
14
await expect ( page . url ( ) ) . toContain ( '/docs/getting-started.html' ) ;
@@ -26,7 +26,7 @@ test.describe('Main page buttons', () => {
26
26
} ) ;
27
27
28
28
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' } ) ;
30
30
await expect ( whyKotlinButton ) . toBeVisible ( ) ;
31
31
await whyKotlinButton . click ( ) ;
32
32
await expect ( page . url ( ) ) . toContain ( '/docs/getting-started.html' ) ;
@@ -62,7 +62,7 @@ test.describe('Main page buttons', () => {
62
62
} ) ;
63
63
64
64
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' } ) ;
66
66
await expect ( getStartedKoogButton ) . toBeVisible ( ) ;
67
67
await getStartedKoogButton . click ( ) ;
68
68
await expect ( page . url ( ) ) . toContain ( '/docs.koog.ai/' )
0 commit comments