Skip to content

Commit a5df900

Browse files
committed
test(main-page-buttons): refine selector structure for better readability
- Simplify and improve the chaining of Kotlin blog button selectors - Enhance clarity and maintainability of the test logic
1 parent 636ba0e commit a5df900

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test.describe('Main page buttons', () => {
2828
});
2929

3030
test('Kotlin blog button', async ({ page }) => {
31-
const blogButton = page.locator(testSelector('button')).getByRole('link', { name: 'Kotlin blog' });
31+
const blogButton = page.getByRole('link', { name: 'Kotlin blog' }).and(page.locator(testSelector('button')));
3232
await expect(blogButton).toBeVisible();
3333
await blogButton.click();
3434
await expect(page.url()).toContain('https://blog.jetbrains.com/kotlin/');

0 commit comments

Comments
 (0)