-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
experimental: cy.prompttype: featureNew feature that does not currently existNew feature that does not currently exist
Description
What would you like?
The selector's or assertions of the prompt should be updated so that the intent of the test is achieved.
cy.prompt([
'The first product should be "Backpack"',
'The last product should be "Hat"',
])Sometimes this results in something like:
cy.get('#backpack').should('have.text', 'Backpack')
cy.get('#hat').should('have.text', 'Hat')But the intent of the test really should result in something like below:
cy.get('#products').first().should('have.text', 'Backpack')
// or
cy.get('#products').eq(0).should('have.text', 'Backpack')
// or
cy.get('#products:first').should('have.text', 'Backpack')
// or
cy.get('#products:nth-child(0)').should('have.text', 'Backpack')Why is this needed?
No response
Other
No response
Metadata
Metadata
Assignees
Labels
experimental: cy.prompttype: featureNew feature that does not currently existNew feature that does not currently exist