Skip to content

Commit

Permalink
text: move command timeout to cypress config
Browse files Browse the repository at this point in the history
  • Loading branch information
perzeuss committed Oct 13, 2024
1 parent 93d37a5 commit 50cad8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions web/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default defineConfig({
env: {
SLOW_DOWN: false,
},
// it might take a while for nextjs to compile the page on first visit
defaultCommandTimeout: 10000,
async setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
Expand Down
4 changes: 1 addition & 3 deletions web/cypress/e2e/shared-steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ When('I click the {string}', (dataTestId: string) => {
* Expect outcomes that are observable after the user interacts with the system.
*/
Then('I should be redirected to {string}', (path: string) => {
cy.location('pathname').should('eq', path, {
timeout: 10000, // it might take a while for nextjs to compile the page on first visit
})
cy.location('pathname').should('eq', path)
})

Then('I should stay on page {string}', (path: string) => {
Expand Down

0 comments on commit 50cad8e

Please sign in to comment.