Created
November 6, 2020 20:51
-
-
Save Nxtra/34352c408c06c17612697be9f6c09a59 to your computer and use it in GitHub Desktop.
Call custom signIn command before cypress test suite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("Example test", () => { | |
before(() => { | |
cy.signIn(); | |
}); | |
after(() => { | |
cy.clearLocalStorageSnapshot(); | |
cy.clearLocalStorage(); | |
}); | |
beforeEach(() => { | |
cy.restoreLocalStorage(); | |
}); | |
afterEach(() => { | |
cy.saveLocalStorage(); | |
}); | |
it("should be logged in", () => { | |
cy.visit("/"); | |
cy.get(".App-logo").should("be.visible"); | |
it("Should talk about react", () => { | |
cy.visit("/") | |
cy.contains("React") | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment