lundi 26 mars 2018

possible to load multiple fixtures in cypress.io?

I know that in cypress.io we can use fixture to import json and using them as objects by doing something like below...

cy.fixture('path/something.json').then((obj) => { do something } )

but this only importing one json what if I want to import multiple?

cy.fixture('path/something.json').then((obj) => { cy.fixture('path/something2.json').then((obj2) => { cy.log(obj); cy.log(obj2) } ) } )

I know something like above would work since I tried it but this will be too much if there are more than 2 I want to import.

Does anyone know possible way to do this?

Thanks in advance for any helps

Aucun commentaire:

Enregistrer un commentaire