Enable 5 previously skipped e2e tests
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:
2026-01-15 06:30:51 +00:00
parent ff3d8fad2c
commit 4a874476c3
7 changed files with 103 additions and 68 deletions

View File

@@ -14,7 +14,22 @@ let currentMockDailyLog: DailyLog | null = null;
// Create mock PocketBase client
const mockPb = {
collection: vi.fn(() => ({
collection: vi.fn((collectionName: string) => ({
// Mock getOne for fetching fresh user data
getOne: vi.fn(async () => {
if (collectionName === "users" && currentMockUser) {
// Return user data in PocketBase record format
return {
id: currentMockUser.id,
email: currentMockUser.email,
lastPeriodDate: currentMockUser.lastPeriodDate?.toISOString(),
cycleLength: currentMockUser.cycleLength,
activeOverrides: currentMockUser.activeOverrides,
garminConnected: currentMockUser.garminConnected,
};
}
throw new Error("Record not found");
}),
getFirstListItem: vi.fn(async () => {
if (!currentMockDailyLog) {
const error = new Error("No DailyLog found");