cypress icon indicating copy to clipboard operation
cypress copied to clipboard

Yaml/yml support in fixtures folder in cypress

Open Rahuifcnja4 opened this issue 2 years ago • 3 comments

What would you like?

Support for yaml fiel inside fixtures, so that we can utilize data in our tests by node and keyname

Why is this needed?

Fixtures support only json format, what if users need to store data in yaml /yml file...

Other

No

Rahuifcnja4 avatar Nov 20 '22 07:11 Rahuifcnja4

Are you looking for native support with Cypress? Otherwise, you can easily use a library like https://www.npmjs.com/package/js-yaml and create a cy.task to load the file.

samtsai avatar Nov 21 '22 15:11 samtsai

Please help me out how to yae yml data in cypress

Rahuifcnja4 avatar Nov 23 '22 14:11 Rahuifcnja4

Are you looking for native support with Cypress? Otherwise, you can easily use a library like https://www.npmjs.com/package/js-yaml and create a cy.task to load the file.

Please help me how can we read yml by cy. task not getting any solution

Rahuifcnja4 avatar Nov 23 '22 15:11 Rahuifcnja4

Are you looking for native support with Cypress? Otherwise, you can easily use a library like https://www.npmjs.com/package/js-yaml and create a cy.task to load the file.

You mean instead of using cy.fixture method? It would indeed be very handy if Cypress could natively support .yaml files.

Nevertheless, thank you for that great tool

placid2000 avatar Jun 14 '23 12:06 placid2000