Skip to content

Commit

Permalink
Trying out plugin waitUntil
Browse files Browse the repository at this point in the history
  • Loading branch information
megoth-capgemini committed Nov 28, 2023
1 parent f7c685b commit b68035b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
9 changes: 6 additions & 3 deletions cypress/e2e/solid-login.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {v4 as uuid} from 'uuid'

describe('Solid Login', () => {
const timeout = 5000;
const timeout = 10000;
const e2eServer = 'http://localhost:3001';
let email: string, password: string, podName: string

Expand All @@ -21,8 +21,11 @@ describe('Solid Login', () => {
})

// log in page
cy.contains("Sign up", {timeout}).should('exist');
cy.get('#register-link[href]').click()
cy.waitUntil(() => cy.get('#register-link').then(($el) => $el.attr('href')?.length > 0), {
timeout: 2000,
interval: 500,
})
cy.get('#register-link').click()

// register new account page
cy.contains("Register", { timeout }).should('exist')
Expand Down
4 changes: 3 additions & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
// }

import 'cypress-wait-until';
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@vitejs/plugin-react": "^4.0.3",
"concurrently": "^8.2.2",
"cypress": "^13.6.0",
"cypress-wait-until": "^2.0.1",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
Expand Down

0 comments on commit b68035b

Please sign in to comment.