mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-02 01:48:08 +09:00
test(e2e): fix tenant theme editor prod spec selectors (#1081)
Follow-up to #1080. The production spec failed to find its targets on the live `randy-vild` portal: - `AuthStatus` renders twice, once in the desktop header and once in the mobile header, so `user-menu-trigger` matched two elements. The spec now targets the visible one. - The dialog's corner ✕ is also labelled "Close". The spec now targets the footer button: `exact: true`, then `.first()`. I verified this against production with `DEBUG=pw:api`: every step and assertion passes (both previews render, only the lyrics preview changes after a sung-colour edit, Discard and Close work). Test-only change, so no version bump. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Updated the tenant theme editor end-to-end test to open the user menu and close the editor using more specific controls. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
80f6d34007
commit
342a6793cc
1 file changed
+2
-2
@@ -35,7 +35,7 @@ test.describe("Tenant theme editor", () => {
|
||||
// Consumer credits UI never appears on a tenant portal
|
||||
await expect(page.getByText(/credits available/i)).toHaveCount(0)
|
||||
|
||||
await page.getByTestId("user-menu-trigger").click()
|
||||
await page.locator("[data-testid=user-menu-trigger]:visible").first().click()
|
||||
await page.getByRole("menuitem", { name: "Theme & style" }).click()
|
||||
|
||||
const editor = page.getByTestId("tenant-theme-editor")
|
||||
@@ -58,7 +58,7 @@ test.describe("Tenant theme editor", () => {
|
||||
|
||||
await editor.getByRole("button", { name: "Discard changes" }).click()
|
||||
await expect(editor.getByRole("button", { name: "Save theme" })).toBeDisabled()
|
||||
await editor.getByRole("button", { name: "Close" }).click()
|
||||
await editor.getByRole("button", { name: "Close", exact: true }).first().click()
|
||||
await expect(editor).toBeHidden()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user