Skip to content

Commit 537e885

Browse files
authored
Merge pull request #5055 from JetBrains/e2e-fix
test(main): enhance selector for fix conflict with blog news
2 parents 714aa97 + 83e0dc0 commit 537e885

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/production/solutions-tab.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { test, expect } from '@playwright/test';
2+
import { testSelector } from '../utils';
23

34
test.describe('Solutions tab', () => {
45
test.beforeEach(async ({ page }) => {
@@ -12,21 +13,21 @@ test.describe('Solutions tab', () => {
1213
});
1314

1415
test('Click on "Multiplatform" button should open the related page', async ({ page }) => {
15-
const multiplatformButton = page.getByText('Multiplatform').first();
16+
const multiplatformButton = page.locator(testSelector("header")).getByText('Multiplatform').first();
1617
await expect(multiplatformButton).toBeVisible();
1718
await multiplatformButton.click();
1819
await expect(page.url()).toContain('https://www.jetbrains.com/kotlin-multiplatform/');
1920
});
2021

2122
test('Click on "Server-side" button should open the related page', async ({ page }) => {
22-
const serverSideButton = page.getByText('Server-side').first();
23+
const serverSideButton = page.locator(testSelector("header")).getByText('Server-side').first();
2324
await expect(serverSideButton).toBeVisible();
2425
await serverSideButton.click();
2526
await expect(page.url()).toContain('/server-side/');
2627
});
2728

2829
test('Click on "Data science" button should open the related page', async ({ page }) => {
29-
const dataScienceButton = page.getByText('Data science');
30+
const dataScienceButton = page.locator(testSelector("header")).getByText('Data science');
3031
await expect(dataScienceButton).toBeVisible();
3132
await dataScienceButton.click();
3233
// We need a timeout here because of redirect to another URL.
@@ -35,7 +36,7 @@ test.describe('Solutions tab', () => {
3536
});
3637

3738
test('Click on "Android" button should open the related page', async ({ page }) => {
38-
const androidButton = page.getByText('Android').first();
39+
const androidButton = page.locator(testSelector("header")).getByText('Android').first();
3940
await expect(androidButton).toBeVisible();
4041
await androidButton.click();
4142
await expect(page.url()).toContain('/docs/android-overview.html');

0 commit comments

Comments
 (0)