Skip to content

Commit 6a5bf6d

Browse files
jvorcakclaude
andcommitted
test(e2e): fix consumer-group tooltip selector after registry migration
The migrated partition action buttons use the registry (base-ui) tooltip, which renders a `[data-slot="tooltip-content"]` popup without role="tooltip" (the old Chakra tooltip had it). Match on the slot + text instead of getByRole('tooltip'). No app code changed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 05f9f28 commit 6a5bf6d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

frontend/tests/test-variant-console/consumers/consumer-group-unconsumed-partitions.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,21 @@ test.describe('Consumer Group Details - Unconsumed Partitions', () => {
134134
const btn = page.getByTestId('partition-edit-1');
135135
await expect(btn).toBeVisible({ timeout: 5000 });
136136
await btn.hover();
137-
await expect(page.getByRole('tooltip', { name: 'No committed offset' }).first()).toBeVisible({ timeout: 5000 });
137+
// Registry (base-ui) tooltip renders a `[data-slot="tooltip-content"]` popup
138+
// without role="tooltip", so match on the slot + text instead of the role.
139+
await expect(
140+
page.locator('[data-slot="tooltip-content"]').filter({ hasText: 'No committed offset' }).first()
141+
).toBeVisible({ timeout: 5000 });
138142
await page.mouse.move(0, 0);
139143
});
140144

141145
await test.step('Edit button on partition 2 (never consumed) is disabled with tooltip', async () => {
142146
const btn = page.getByTestId('partition-edit-2');
143147
await expect(btn).toBeVisible({ timeout: 5000 });
144148
await btn.hover();
145-
await expect(page.getByRole('tooltip', { name: 'No committed offset' }).first()).toBeVisible({ timeout: 5000 });
149+
await expect(
150+
page.locator('[data-slot="tooltip-content"]').filter({ hasText: 'No committed offset' }).first()
151+
).toBeVisible({ timeout: 5000 });
146152
});
147153
});
148154
});

0 commit comments

Comments
 (0)