import { Given } from "@badeball/cypress-cucumber-preprocessor"; // Shared across auth.feature (signup) and onboarding.feature (wizard) — both // need the diets/allergies reference lists mocked before reaching a step // that reads them, in either their "has options" or "is empty" shape. Given("the diets reference list has options", () => { cy.intercept("GET", "**/reference/diets", { statusCode: 200, body: [ { id: 1, key: "omnivore" }, { id: 2, key: "vegetarian" }, ], }); }); Given("the diets reference list is empty", () => { cy.intercept("GET", "**/reference/diets", { statusCode: 200, body: [] }); }); Given("the allergies reference list has options", () => { cy.intercept("GET", "**/reference/allergies", { statusCode: 200, body: [ { id: 1, key: "peanuts", kind: "ALLERGY" }, { id: 2, key: "gluten", kind: "INTOLERANCE" }, ], }); }); Given("the allergies reference list is empty", () => { cy.intercept("GET", "**/reference/allergies", { statusCode: 200, body: [] }); });