Skip to content

Commit

Permalink
first attempt to catch malformed JSON error
Browse files Browse the repository at this point in the history
  • Loading branch information
mahula committed May 7, 2024
1 parent 1fed44d commit 528fcb9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cypress/cypress/e2e/steps/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ When('I submit the credentials {string} {string}', (username: string, password:
'http://localhost:9000/if/flow/dreammallearth-authentication-flow/',
{ args: { username, password } },
({ username, password }) => {
cy.on('uncaught:exception', (e) => {
if (e.message.includes('JSON')) {
// we expected this error, so let's ignore it
// and let the test continue
return false
}
})
// loginPage.submitUsername(username)
cy.get('input[name="uidField"]').type(username)
cy.get('button[type="submit"]').click()
Expand Down

0 comments on commit 528fcb9

Please sign in to comment.