Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Support Regex for url #17

Open
Mojo1 opened this issue Mar 8, 2023 · 0 comments
Open

Support Regex for url #17

Mojo1 opened this issue Mar 8, 2023 · 0 comments

Comments

@Mojo1
Copy link

Mojo1 commented Mar 8, 2023

cy.intercept accepts as url type RouteMatcher
Maybe you could do it as well because id like to better not rely on the example id for path params
better have a regex. In my case it's uuid for example

Additional to this:
cy.mockWithOpenAPI({ url: '/accounts/d3a98f9b-03c6-4bca-89e5-aac492a98f71/messages' }).as('messages');

this:
cy.mockWithOpenAPI({ url: new RegExp( /accounts/${UUID_REGEX}/messages).as('messages');

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

No branches or pull requests

1 participant