Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: (driver) - Fix for introduced regression in cy.route #8215

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

przemuh
Copy link
Contributor

@przemuh przemuh commented Aug 7, 2020

Fix for introduced regression from #7983 in cy.route fixture inside the route command

First of all I'm sorry for introduced regression. I didn't mean to and I hope you will forgive me :) I've decided to revert some of my changes related to load fixture in cy.route. The only thing I left is a improved error message in case when fixture doesn't exist.

User facing changelog

Revert the code that tries to load a fixture inside a cy.route command.

Additional details

We don't need to try load a fixture inside a cy.route. Error message has been improved, but it will show up only when user waits for a stubbed route or returns a rejected promise from custom command.

In every other case, test will be not marked as failed (even when fixture has not been found).

How has the user experience changed?

Previous behaviour of cy.route has been restored. Error message in case of missing fixture has been improved.

PR Tasks

  • [ x ] Have tests been added/updated?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 7, 2020

Thanks for taking the time to open a PR!

@przemuh przemuh changed the title fix(driver) - Fix for introduced regression in cy.route fix: (driver) - Fix for introduced regression in cy.route Aug 7, 2020
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually verified that this is working now in cases of a non-existent file and a larger file as expected. Would maybe be nice to have a test for the larger files, but I know this has been challenging before because we don't want to check in large files into the repo.

May be tangentially related to this issue, but not really a concern of this PR. Just wanted to mention: #8164

@chrisbreiding
Copy link
Contributor

It should be possible to dynamically generate a large fixture file in the test so it doesn't need to be committed to the repo. I think we have an example of something like that, but I haven't been able to find it yet.

@bahmutov
Copy link
Contributor

Good, tried it, shows an error

Screen Shot 2020-08-10 at 2 19 36 PM

Copy link
Contributor

@bahmutov bahmutov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixture files defined in cy.route with fx and fixture shortcut take longer to load, sometimes timeout.
4 participants