Created
June 26, 2023 02:05
-
-
Save lmiller1990/936aafdbf6a83b06e44eb7ce624fd6ad to your computer and use it in GitHub Desktop.
Cypress Conditional Runs
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
before(() => { | |
const isHeadless = Cypress.config('isTextTerminal') | |
if (isHeadless) { | |
// do something | |
} | |
}) | |
// Or ... | |
before(() => { | |
// depends on provider. Could be GITHUB_ACTIONS, CIRCLE_CI, etc. | |
const isCi = Cypress.env('CI') | |
if (isCi) { | |
// do something | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment