Skip to content

Commit 7ca290b

Browse files
committed
test(e2e): assert grouped Configuration layout (sidebar + section headings)
The new-topic-page Configuration tab replaced the flat '.configGroupTitle' list with a category sidebar and titled sections. Update the navigation spec and topic-page helpers to match (navigation landmark + category buttons + section headings).
1 parent bc3b054 commit 7ca290b

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

frontend/tests/test-variant-console/topics/topic-navigation.spec.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,17 @@ test.describe('Topic Details - Navigation and Tabs', () => {
8686
await expect(page.getByRole('tablist')).toBeVisible({ timeout: 10_000 });
8787
await expect(page.getByTestId('config-group-table')).toBeVisible({ timeout: 15_000 });
8888

89-
// Verify that configuration groups are present
90-
// Note: This test is flexible and will pass even if new groups are added
91-
const configGroups = page.locator('.configGroupTitle');
92-
const groupCount = await configGroups.count();
89+
// The grouped layout shows a category sidebar plus titled sections.
90+
// Note: This test is flexible and will pass even if new categories are added.
91+
const sidebar = page.getByRole('navigation', { name: 'Configuration categories' });
92+
await expect(sidebar).toBeVisible();
93+
const categoryCount = await sidebar.getByRole('button').count();
9394

94-
// At least some configuration groups should be visible
95-
expect(groupCount).toBeGreaterThan(0);
95+
// At least some configuration categories should be visible
96+
expect(categoryCount).toBeGreaterThan(0);
9697

9798
// Verify Retention group is present (a core group that should always exist)
98-
await expect(page.locator('.configGroupTitle').filter({ hasText: 'Retention' })).toBeVisible();
99+
await expect(page.getByRole('heading', { name: 'Retention' })).toBeVisible();
99100
});
100101

101102
await topicPage.deleteTopic(topicName);

frontend/tests/test-variant-console/utils/topic-page.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,14 @@ export class TopicPage {
177177
}
178178

179179
async verifyConfigurationGroup(groupName: string) {
180-
await expect(this.page.locator('.configGroupTitle').filter({ hasText: groupName })).toBeVisible();
180+
await expect(this.page.getByRole('heading', { name: groupName })).toBeVisible();
181181
}
182182

183183
async getConfigurationGroups(): Promise<string[]> {
184-
return await this.page.locator('.configGroupTitle').allTextContents();
184+
return await this.page
185+
.getByRole('navigation', { name: 'Configuration categories' })
186+
.getByRole('button')
187+
.allTextContents();
185188
}
186189

187190
/**

0 commit comments

Comments
 (0)