fix(e2e): disambiguate Join a channel locator in realtime inspector helper

Now that the Inspector can show MessagesTable's own "Join a channel to
start listening to messages" empty state before a channel is joined,
the loose text locator matches two elements and triggers a Playwright
strict-mode violation. Scope it to the toolbar button.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Joshen LimandClaude Sonnet 5 committed 2026-10-02 13:57:07 +08:00
1 parent d3203f30b7
commit 78d7de1dfd
1 file changed
+3 -1
+3 -1
View File
@@ -3,7 +3,9 @@ import { toUrl } from './to-url.js'
export async function navigateToRealtimeInspector(page: Page, ref: string) {
await page.goto(toUrl(`/project/${ref}/realtime/inspector`))
await expect(page.locator('text=Join a channel')).toBeVisible({ timeout: 30000 })
await expect(page.getByRole('button', { name: 'Join a channel' })).toBeVisible({
timeout: 30000,
})
}
export async function joinChannel(page: Page, channelName: string) {