describe("Generation Wizard", () => {
  beforeEach(() => {
    cy.devLogin("admin@oliver.com");
  });

  it("navigates through wizard steps", () => {
    cy.visit("/generate/upload");
    // Step 1: Upload page loads
    cy.contains("Upload Your Content").should("be.visible");

    // Add brief text
    cy.get("textarea").type("This is a test presentation about AI in healthcare.");

    // Click Next
    cy.contains("button", "Next").click();

    // Step 2: Configure page
    cy.url().should("include", "/generate/configure");
    cy.contains("Slide Count").should("be.visible");
  });

  it("preserves wizard state via localStorage", () => {
    cy.visit("/generate/upload");
    cy.get("textarea").type("State persistence test");

    // Reload page
    cy.reload();

    // Brief text should be restored from localStorage
    cy.get("textarea").should("have.value", "State persistence test");
  });
});
