clerk / example-cypress-nextjs

Example repo using Clerk, Cypress and NextJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

signs out after the first test

vasco3 opened this issue · comments

I have a test.cy.js

context("context", () => {
  before(() => {
    cy.login();
    cy.visit("/");
  }); 
  beforeEach(() => {
    Cypress.Cookies.preserveOnce("__session", "__client_uat");
  });
  it("should #1", () => {
    // signed in and passes tests
  });

  it("should #2", () => {
    // fails because signed out
  });

  it("should #3", () => {
   // fails because signed out
  });
});

but after running the first it() it signs out and fails the next it()

any suggestions?