Fails to automatically load fixture files if more than one . is in file name
See original GitHub issue- Operating System: OSX High Sierra 10.13.3
- Cypress Version: 2.1.0
Is this a Feature or Bug?
Bug
Current behavior:
cy.fixture
function does not look up files without extension correctly if they have several dots. Is probably looking for first element after first “.”, but should look for element after last “.”
How to reproduce:
Check this code: tiny test fork
Create a fixture file with several dots in name (e.g. parent.child.info.json
, and use cy.fixture('parent.child.info')
in your test.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Load Multiple Fixtures at Once - django - Stack Overflow
Using $ python manage.py loaddata myfixtures/*.json would work as Bash will substitute the wildcard to a list of matching filenames.
Read more >fixture | Cypress Documentation
Load a fixed set of data located in a file. ... When no extension is passed to cy.fixture() , Cypress will search for...
Read more >How to use fixtures — pytest documentation
When pytest goes to run a test, it looks at the parameters in that test function's signature, and then searches for fixtures that...
Read more >Set model name in fixtures as metadata - BigBinary Blog
When automatic detection of model name from fixture file name fails, we can specify the table name using the set_fixture_class method.
Read more >How to provide initial data for models - Django documentation
If you want to automatically load initial data for an app, create a data ... The most straightforward way of creating a fixture...
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
@bahmutov That’s what I was looking for! For anyone that also needs something like this - from within the
plugin/index.js
file you invoke anon
method, so the file looks like this:So in the app you can then simply do:
Released in
3.2.0
.