Enable 5 previously skipped e2e tests
All checks were successful
Deploy / deploy (push) Successful in 1m37s
All checks were successful
Deploy / deploy (push) Successful in 1m37s
- Fix OIDC tests with route interception for auth-methods API - Add data-testid to DecisionCard for reliable test selection - Fix /api/today to fetch fresh user data instead of stale cookie data - Fix period logging test timing with proper API wait patterns - Fix decision engine test with waitForResponse instead of timeout - Simplify mobile viewport test locator All 206 e2e tests now pass with 0 skipped. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -192,9 +192,7 @@ test.describe("period logging flow - onboarding user", () => {
|
||||
await onboardingPage.getByRole("button", { name: /cancel/i }).click();
|
||||
});
|
||||
|
||||
// TODO: This test is flaky - the save succeeds but the dashboard doesn't
|
||||
// always refresh in time. Needs investigation into React state updates.
|
||||
test.skip("logging period from modal updates dashboard cycle info", async ({
|
||||
test("logging period from modal updates dashboard cycle info", async ({
|
||||
onboardingPage,
|
||||
}) => {
|
||||
await onboardingPage.goto("/");
|
||||
@@ -220,19 +218,20 @@ test.describe("period logging flow - onboarding user", () => {
|
||||
const dateInput = onboardingPage.locator('input[type="date"]');
|
||||
await dateInput.fill(dateStr);
|
||||
|
||||
// Click Save
|
||||
// Click Save button
|
||||
await onboardingPage.getByRole("button", { name: /save/i }).click();
|
||||
|
||||
// Modal should close
|
||||
await expect(modalTitle).not.toBeVisible();
|
||||
// Modal should close after successful save
|
||||
await expect(modalTitle).not.toBeVisible({ timeout: 10000 });
|
||||
|
||||
// Wait for data to refresh after successful save
|
||||
// The dashboard refetches data and should show cycle info
|
||||
// Wait for network activity to settle
|
||||
await onboardingPage.waitForLoadState("networkidle");
|
||||
|
||||
// Look for cycle day display (e.g., "Day 8 · Follicular" or similar)
|
||||
// This appears after the dashboard refetches data post-save
|
||||
const cycleInfo = onboardingPage.getByText(/day\s+\d+\s+·/i);
|
||||
// The page fetches /api/cycle/period, then /api/today and /api/user
|
||||
// Content only renders when both todayData and userData are available
|
||||
// Use .first() as the pattern may match multiple elements on the page
|
||||
const cycleInfo = onboardingPage.getByText(/day\s+\d+\s+·/i).first();
|
||||
await expect(cycleInfo).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user