You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I want to pass the sponsor inside the command and then assert that the element contains name's value from the sponsor fixture. Anyone has an idea how to make this work? Thanks in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! I am trying to use the argument in the custom command for the fixture inside that command, but it is not working that well.
Cypress.Commands.add('checkHeader', (sponsor) => {
cy.fixture('sponsors').then(({ sponsor }) => {
cy.get('.some-class')
.contains(sponsor.name)
.click()
})
So I want to pass the sponsor inside the command and then assert that the element contains name's value from the sponsor fixture. Anyone has an idea how to make this work? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions