diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2b62270b1..6b28377d5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -49,6 +49,18 @@ jobs: run: docker ps - name: Run Playwright tests run: pnpm playwright test + - name: Archive Playwright report + if: failure() + uses: actions/upload-artifact@v6 + with: + name: playwright-report + path: | + tests/e2e/playwright-report + tests/e2e/test-results + retention-days: 5 + - name: Dump server logs + if: failure() + run: docker logs mealie-e2e - name: Destroy Test Environment if: always() run: docker compose down --volumes diff --git a/frontend/app/composables/use-mealie-auth.ts b/frontend/app/composables/use-mealie-auth.ts index 63e65588e..7809c3d82 100644 --- a/frontend/app/composables/use-mealie-auth.ts +++ b/frontend/app/composables/use-mealie-auth.ts @@ -41,7 +41,11 @@ export const useMealieAuth = function () { const params = new URLSearchParams(window.location.search); const { data: token } = await $axios.get<{ access_token: string; token_type: "bearer" }>("/api/auth/oauth/callback", { params }); auth.setToken(token.access_token); + await auth.getSession(); + if (auth.status.value !== "authenticated") { + throw new Error("OIDC sign-in succeeded but the session could not be established"); + } } return {