bahmutov / cypress-data-session

Cypress command for flexible test data setup

Home Page:https://glebbahmutov.com/blog/cypresss-data-session/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We should setup the data session if any of the parameters have changed values

bahmutov opened this issue ยท comments

Imagine data session like this

cy.dataSession({
  name: 'user session',
  setup() {
    cy.log('**log in**')
    ...
  },
  expires: 9_000, // 9 seconds
  // the argument is the memory value of this data session
  recreate(userCookie: Cypress.Cookie) {
    ...
  },
  shareAcrossSpecs: true,
})

We automatically recompute the data session IF the setup method source code SHA changes. But we should recompute the data session if the user removes or adds or changes other parameters like expires and shareAcrossSpecs

๐ŸŽ‰ This issue has been resolved in version 2.5.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€