Fix German signup E2E, Escape menu stacking, and Heute rhythm click

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-10-06 12:20:29 +00:00
parent a9a251b80a
commit c5b2ebc2b3
No known key found for this signature in database
4 changed files with 17 additions and 8 deletions

View File

@ -307,6 +307,10 @@ test("group chats share every context-menu action", async ({ page }, testInfo) =
await group.click({ button: "right" }); await group.click({ button: "right" });
await captureScreenshot(page, testInfo, "group-context-menu-mobile"); await captureScreenshot(page, testInfo, "group-context-menu-mobile");
await page.keyboard.press("Escape"); await page.keyboard.press("Escape");
if ((await page.getByRole("menu").count()) > 0) {
await page.keyboard.press("Escape");
}
await expect(page.getByRole("menu")).toHaveCount(0);
await page.setViewportSize({ width: 1280, height: 800 }); await page.setViewportSize({ width: 1280, height: 800 });
await group.click({ button: "right" }); await group.click({ button: "right" });

View File

@ -186,15 +186,17 @@ export async function signup(
) { ) {
await expect(async () => { await expect(async () => {
await page.goto("/sign-up", { waitUntil: "domcontentloaded" }); await page.goto("/sign-up", { waitUntil: "domcontentloaded" });
await expect(page.getByRole("heading", { name: "Create your evOo" })).toBeVisible({ await expect(
page.getByRole("heading", { name: /Create your evOo|Dein evOo erstellen/i }),
).toBeVisible({
timeout: 5_000, timeout: 5_000,
}); });
}).toPass({ timeout: 45_000 }); }).toPass({ timeout: 45_000 });
if (testInfo) await captureScreenshot(page, testInfo, "01-sign-up"); if (testInfo) await captureScreenshot(page, testInfo, "01-sign-up");
await page.getByPlaceholder("Your name").fill(name); await page.getByPlaceholder(/Your name|Dein Name/i).fill(name);
await page.getByPlaceholder("Your email address").fill(email); await page.getByPlaceholder(/Your email address|Deine E-Mail-Adresse/i).fill(email);
await page.getByPlaceholder("Password").fill(password); await page.getByPlaceholder(/^Password$|^Passwort$/i).fill(password);
await page.getByRole("button", { name: "Create account" }).click(); await page.getByRole("button", { name: /Create account|Konto erstellen/i }).click();
} }
export async function captureScreenshot(page: Page, testInfo: TestInfo, name: string) { export async function captureScreenshot(page: Page, testInfo: TestInfo, name: string) {

View File

@ -90,9 +90,13 @@ test("Heute shows the coach's brief, habits and goals, checks habits off and set
await expect(page.getByTestId(`heute-habit-${habit.id}`).getByRole("checkbox")).toBeChecked(); await expect(page.getByTestId(`heute-habit-${habit.id}`).getByRole("checkbox")).toBeChecked();
// Check-in times live behind one compact control. // Check-in times live behind one compact control.
await page.getByTestId("heute-rhythm").click(); const rhythm = page.getByTestId("heute-rhythm");
await expect(rhythm).toBeVisible();
await expect(async () => {
await rhythm.click();
await expect(page.getByTestId("heute-rhythm-panel")).toBeVisible();
}).toPass({ timeout: 15_000 });
const panel = page.getByTestId("heute-rhythm-panel"); const panel = page.getByTestId("heute-rhythm-panel");
await expect(panel).toBeVisible();
const morning = panel.getByTestId("heute-rhythm-morning"); const morning = panel.getByTestId("heute-rhythm-morning");
await expect(morning.getByRole("switch")).not.toBeChecked(); await expect(morning.getByRole("switch")).not.toBeChecked();
const enabled = page.waitForResponse( const enabled = page.waitForResponse(

View File

@ -22,7 +22,6 @@ export function useMobileSidebar() {
function onKeyDown(event: KeyboardEvent) { function onKeyDown(event: KeyboardEvent) {
if (event.key !== "Escape" || window.matchMedia("(min-width: 768px)").matches) return; if (event.key !== "Escape" || window.matchMedia("(min-width: 768px)").matches) return;
event.preventDefault(); event.preventDefault();
event.stopPropagation();
setMobileSidebarOpen(false); setMobileSidebarOpen(false);
queueMicrotask(() => { queueMicrotask(() => {
document.querySelector<HTMLElement>('[data-testid="open-navigation"]')?.focus(); document.querySelector<HTMLElement>('[data-testid="open-navigation"]')?.focus();