diff --git a/apps/web/cypress/e2e/preferences.cy.ts b/apps/web/cypress/e2e/preferences.cy.ts index 698a219..fcaaa64 100644 --- a/apps/web/cypress/e2e/preferences.cy.ts +++ b/apps/web/cypress/e2e/preferences.cy.ts @@ -28,6 +28,14 @@ describe("Dietary preferences (/parametres/preferences) — hot saving", () => { ], }); cy.intercept("GET", "**/profile/allergies", { statusCode: 200, body: [2] }); + // The page also loads the reference ingredient list + the profile's + // disliked-ingredients selection for `DislikedIngredientsField` — added + // alongside `getDiets`/`getAllergies` in the same `Promise.all` (see + // PreferencesPage.tsx), so both need mocking here too or that `Promise.all` + // rejects and the whole page renders its error state instead of the form, + // taking `#diet`/the allergy checkboxes down with it. + cy.intercept("GET", "**/reference/ingredients", { statusCode: 200, body: [] }); + cy.intercept("GET", "**/profile/disliked-ingredients", { statusCode: 200, body: [] }); }); it("loads the current regime, and shows allergies/intolerances as two groups", () => {