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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user