Skip to content

Commit 906c3fa

Browse files
authored
Merge pull request #4891 from JetBrains/add-test-selectors
chore: add test selectors
2 parents 43f8630 + cceae21 commit 906c3fa

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

blocks/main/hero/hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const HeroSection: FC<Props> = ({ children, title }) => {
3737

3838
return (
3939
<ThemeProvider theme={'dark'}>
40-
<section className={cn(styles.heroSection)}>
40+
<section className={cn(styles.heroSection)} data-testid={"hero-block"}>
4141
<div className={cn('ktl-layout', 'ktl-layout--center', 'hero-b')}>
4242
<div className={styles.grid}>
4343
<div className={styles.content}>

blocks/main/kotlin-plus-ai/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function KotlinPlusAI() {
3333

3434
return (
3535
<ThemeProvider theme="dark">
36-
<div className={styles.wrapper} id="kotlin-plus-ai">
36+
<div className={styles.wrapper} id="kotlin-plus-ai" data-testid={"kotlin-plus-ai-block"}>
3737
<h2 className={cn(classTitle, styles.introTitle)}>Kotlin + AI</h2>
3838
<p className={introClass}>JetBrains is investing in AI models tailored for Kotlin, providing open data,
3939
benchmarks, and AI-native tooling integrated into your workflow.</p>
@@ -59,8 +59,9 @@ function KotlinPlusAI() {
5959
developing a simple chat assistant or an advanced multi-step workflow, Koog gives you full
6060
control with clean Kotlin code – no external services are required. Build, extend, and
6161
experiment with AI agents entirely in Kotlin.</p>
62-
<Button mode="rock" size={size} className={styles.getStarted} href="https://docs.koog.ai/">Get
63-
started</Button>
62+
<Button mode="rock" size={size} className={styles.getStarted} href="https://docs.koog.ai/">
63+
Get started
64+
</Button>
6465
</div>
6566
<BlockScheme className={styles.buildAgentsScheme} />
6667
</div>

blocks/main/why-kotlin/why-kotlin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const WhyKotlin: FC<Props> = ({}) => {
8484

8585
return (
8686
<ThemeProvider theme={'dark'}>
87-
<section className={styles.whyKotlin} data-test={'main-page-why-kotlin'}>
87+
<section className={styles.whyKotlin} data-testid={'why-kotlin-block'}>
8888
<div className={cn('ktl-layout', 'ktl-layout--center')}>
8989
<div className={cn(darkTextCn(headerClass), styles.sectionTitle)}>Why Kotlin?</div>
9090
</div>

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function Index() {
243243
className={styles.ctaBlock}
244244
mainTitle={<>Start using{isTS && <br />} Kotlin today!</>}
245245
buttons={
246-
<Button href="/docs/getting-started.html" size="l" mode="rock" theme="light">
246+
<Button href="/docs/getting-started.html" size="l" mode="rock" theme="light" data-testid={'cta-get-started-button'}>
247247
Get started
248248
</Button>
249249
}

test/page/index-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class IndexPage implements PageWithGlobalSearch {
1414

1515
async init() {
1616
await this.page.goto('/');
17-
18-
await this.page.waitForSelector(testSelector('main-page-why-kotlin'));
17+
const whyKotlinBlock = this.page.getByTestId('why-kotlin-block');
18+
await whyKotlinBlock.waitFor();
1919
}
2020
}

0 commit comments

Comments
 (0)