Skip to content

Commit

Permalink
chore: fix async issue by moving cy.task to cy.then in login flow
Browse files Browse the repository at this point in the history
  • Loading branch information
adeldhis2 committed Oct 4, 2024
1 parent adb9dac commit d6134c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ before(() => {

cy.getAllCookies()
.should((cookies) => {
expect(cookies.length).to.be.at.least(1)
})
.then((cookies) => {
cy.task(
'log',
`Cookies after login attempt: ${JSON.stringify(cookies)}`
)
expect(cookies.length).to.be.at.least(1)
})
.then((cookies) => {

const sessionCookieForBaseUrl = findSessionCookieForBaseUrl(
baseUrl,
cookies
Expand Down

0 comments on commit d6134c4

Please sign in to comment.