From 89967ea1e400a4da84e76ad3317cd4d56df9e6fe Mon Sep 17 00:00:00 2001 From: German Osin Date: Sat, 6 Sep 2025 15:02:07 +0200 Subject: [PATCH] Fixed tests --- e2e-playwright/src/features/navigation.feature | 2 +- e2e-playwright/src/pages/Connectors/ConnectorsLocators.ts | 6 ++---- e2e-playwright/src/pages/Topics/TopicsCreateLocators.ts | 4 ++-- e2e-playwright/src/steps/navigation.steps.ts | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/e2e-playwright/src/features/navigation.feature b/e2e-playwright/src/features/navigation.feature index 645f8e81e..f57124489 100644 --- a/e2e-playwright/src/features/navigation.feature +++ b/e2e-playwright/src/features/navigation.feature @@ -28,7 +28,7 @@ Feature: Navigation panel links Given Kafka Connect is visible When click on Kafka Connect link Then Kafka Connect heading visible - Then the end of current URL should be "connectors" + Then the end of current URL should be "kafka-connect/clusters" Scenario: Navigate to KSQL DB Given KSQL DB is visible diff --git a/e2e-playwright/src/pages/Connectors/ConnectorsLocators.ts b/e2e-playwright/src/pages/Connectors/ConnectorsLocators.ts index 66e8cc0ac..6e21e0b33 100644 --- a/e2e-playwright/src/pages/Connectors/ConnectorsLocators.ts +++ b/e2e-playwright/src/pages/Connectors/ConnectorsLocators.ts @@ -7,7 +7,5 @@ export default class ConnectorsLocators { this.page = page; } - get heading(): Locator { return this.page.getByRole('heading', { name: 'Connectors' })}; - get searchBox(): Locator { return this.page.getByRole('textbox', { name: 'SSearch by Connect Name' })}; - get createConnectorButton(): Locator { return this.page.getByRole('button', { name: 'Create Schema' })}; -} \ No newline at end of file + get clustersTab(): Locator { return this.page.getByRole('link', { name: 'Clusters' })}; +} diff --git a/e2e-playwright/src/pages/Topics/TopicsCreateLocators.ts b/e2e-playwright/src/pages/Topics/TopicsCreateLocators.ts index 927c741e7..e4c176f94 100644 --- a/e2e-playwright/src/pages/Topics/TopicsCreateLocators.ts +++ b/e2e-playwright/src/pages/Topics/TopicsCreateLocators.ts @@ -14,7 +14,7 @@ export default class TopicCreateLocators { get minInSyncReplicas(): Locator { return this.page.getByRole('spinbutton', { name: 'Min In Sync Replicas' }); } get replicationFactor(): Locator { return this.page.getByRole('spinbutton', { name: 'Replication Factor' }); } get timeToRetainData(): Locator { return this.page.getByRole('spinbutton', { name: 'Time to retain data (in ms)' }); } - get button12Hours(): Locator { return this.page.getByRole('button', { name: 'hours' }); } + get button12Hours(): Locator { return this.page.getByRole('button', { name: '12 hours' }); } get button1Day(): Locator { return this.page.getByRole('button', { name: '1 day' }); } get button2Day(): Locator { return this.page.getByRole('button', { name: '2 days' }); } get button7Day(): Locator { return this.page.getByRole('button', { name: '7 days' }); } @@ -27,4 +27,4 @@ export default class TopicCreateLocators { maxPartitionSizeSelect(value: string): Locator { return this.page.getByRole('option', { name: value }); } cleanupPolicySelect(value: string): Locator { return this.page.getByRole('list').getByRole('option', { name: value, exact: true }); } -} \ No newline at end of file +} diff --git a/e2e-playwright/src/steps/navigation.steps.ts b/e2e-playwright/src/steps/navigation.steps.ts index cbd6bf2fb..fce37a920 100644 --- a/e2e-playwright/src/steps/navigation.steps.ts +++ b/e2e-playwright/src/steps/navigation.steps.ts @@ -67,7 +67,7 @@ When('click on Kafka Connect link', async function() { }); Then('Kafka Connect heading visible', async function() { - await this.locators.connectors.heading.waitFor({ state: 'visible' }); + await this.locators.connectors.clustersTab.waitFor({ state: 'visible' }); }); Given('KSQL DB is visible', async function() {