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:
parent
a9a251b80a
commit
c5b2ebc2b3
@ -307,6 +307,10 @@ test("group chats share every context-menu action", async ({ page }, testInfo) =
|
||||
await group.click({ button: "right" });
|
||||
await captureScreenshot(page, testInfo, "group-context-menu-mobile");
|
||||
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 group.click({ button: "right" });
|
||||
|
||||
@ -186,15 +186,17 @@ export async function signup(
|
||||
) {
|
||||
await expect(async () => {
|
||||
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,
|
||||
});
|
||||
}).toPass({ timeout: 45_000 });
|
||||
if (testInfo) await captureScreenshot(page, testInfo, "01-sign-up");
|
||||
await page.getByPlaceholder("Your name").fill(name);
|
||||
await page.getByPlaceholder("Your email address").fill(email);
|
||||
await page.getByPlaceholder("Password").fill(password);
|
||||
await page.getByRole("button", { name: "Create account" }).click();
|
||||
await page.getByPlaceholder(/Your name|Dein Name/i).fill(name);
|
||||
await page.getByPlaceholder(/Your email address|Deine E-Mail-Adresse/i).fill(email);
|
||||
await page.getByPlaceholder(/^Password$|^Passwort$/i).fill(password);
|
||||
await page.getByRole("button", { name: /Create account|Konto erstellen/i }).click();
|
||||
}
|
||||
|
||||
export async function captureScreenshot(page: Page, testInfo: TestInfo, name: string) {
|
||||
|
||||
@ -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();
|
||||
|
||||
// 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");
|
||||
await expect(panel).toBeVisible();
|
||||
const morning = panel.getByTestId("heute-rhythm-morning");
|
||||
await expect(morning.getByRole("switch")).not.toBeChecked();
|
||||
const enabled = page.waitForResponse(
|
||||
|
||||
@ -22,7 +22,6 @@ export function useMobileSidebar() {
|
||||
function onKeyDown(event: KeyboardEvent) {
|
||||
if (event.key !== "Escape" || window.matchMedia("(min-width: 768px)").matches) return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
setMobileSidebarOpen(false);
|
||||
queueMicrotask(() => {
|
||||
document.querySelector<HTMLElement>('[data-testid="open-navigation"]')?.focus();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user