If you have multiple "data-..." attributes on your HTML element, you can grab them all using the "dataset" property. This property has all camel-cased string values. If you want to confirm the entire set, you first convert it into a plain object and then use "deep.equal" assertion
cy.get('article#electric-cars')
.should('have.prop', 'dataset')
.then(JSON.stringify)
.then(JSON.parse)
.should('deep.include', {
columns: '3',
indexNumber: '12314',
})
This recipe is at http://glebbahmutov.com/cypress-examp...
In questa pagina del sito puoi guardare il video online Confirm All HTML data- Attributes At Once By Using The dataset Property della durata di ore minuti seconda in buona qualità , che l'utente ha caricato gleb bahmutov 10 aprile 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 931 volte e gli è piaciuto 31 spettatori. Buona visione!