bahmutov / cypress-map

Cypress query commands for v12+

Home Page:https://glebbahmutov.com/blog/cypress-v12/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add cy.difference query

bahmutov opened this issue ยท comments

const names = ['price', 'shipping', 'handling', 'tips', 'total']
const selectors = names.map((name) => `[data-cy=${name}] dd`)
cy.getInOrder(...selectors)
  .map('innerText')
  // partially apply the zip callback
  .apply(Cypress._.zipObject.bind(null, names))
  .difference({
    price: '$10.99',
    shipping: '$6.99',
    handling: '$1.39',
    tips: '$0.99',
    total: '$25.36',
  })
  .should('be.empty')

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

The release is available on:

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