Fixture json data will not populate properly for a select value
See original GitHub issueCurrent behavior:
Using fixture data variable from a fixture.json
file, Cypress is unable to locate a select even though it located the exact same value when it was hard coded.
Example: Without Fixture:
cy.get('#expire_month_display').select('11') <---value is actually 11 not the label or name.
With fixture data var:
cy.get('#expire_month_display').select(data.oeMonth)
Here is the json:
"oeMonth": 11,
Desired behavior:
Fixture data should populate properly the value for selects
Test code to reproduce
See above, i am running tests on a payment gateway and prefer not to disclose our credentials in th test code.
Versions
Chrome
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Compare json file and dropdown values displayed in an ...
In the dropdown, the rest of the values are in the JSON file. I have done the below but it is not working....
Read more >Populate a Select Dropdown List using JSON - Code by Amir
A common requirement when developing forms on the web is populating a dropdown list using data from a web service or external file....
Read more >Reading and testing JSON object in Cypress - Filip Hric
Ever got that frustrating Cannot read property 'x' of undefined error? If you are starting with JSON objects, it is easy to get...
Read more >django-admin and manage.py
django-admin is Django's command-line utility for administrative tasks. ... If it's not in your path, ensure you have your virtual environment activated.
Read more >writeFile - Cypress Documentation
If the path to the file does not exist, the file and its path will be created. ... {projectRoot}/path/to/data.json will be created with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @rolu315 how did you make this work… i am facing the same issue.thank you
Hi,@theTestingApproach please help me out resolving this issue