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

feat(route2): dynamic request aliasing #8974

Merged
merged 4 commits into from
Nov 3, 2020
Merged

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Oct 26, 2020

TR-369

User facing changelog

  • Added the capability to dynamically add aliases for requests intercepted via cy.route2.

Additional details

How has the user experience changed?

PR Tasks

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 26, 2020

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Oct 26, 2020



Test summary

8667 0 118 3


Run details

Project cypress
Status Passed
Commit caa820a
Started Nov 2, 2020 8:54 PM
Ended Nov 2, 2020 9:06 PM
Duration 11:08 💡
OS Linux Debian - 10.2
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@@ -497,19 +497,6 @@ describe('src/cy/commands/aliasing', () => {
.get('input:first').as('firstInput')
.get('@lastDiv')
})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test was duplicated b/t waiting_spec and aliasing_spec

@bahmutov
Copy link
Contributor

bahmutov commented Nov 2, 2020

question: from the types it seems we can do cy.route2({ url: '/users', alias: 'users' }) right? But there is no test there

@flotwig
Copy link
Contributor Author

flotwig commented Nov 2, 2020

Nope, that's not a thing with this PR. That's the RouteMatcher type, which doesn't have an alias property, since it's supposed to match incoming HTTP requests.

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.

super, it will make graphql matching much simpler

@flotwig flotwig merged commit d2b8806 into develop Nov 3, 2020
@flotwig flotwig deleted the TR-369-alias-intercepted branch January 24, 2022 18:19
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.

Allow dynamically matching requests with a function
2 participants