Skip to content

intercept()'s minimatch glob-matching against routeMatcher url property no longer works #9379

@knotthere

Description

@knotthere

Current behavior

In Cypress 4.12.1, matching a route (cy.route()) with a url property that contains a string with minimatch syntax (*) works.

In Cypress 6.0.0, using cy.intercept() with a routeMatcher.url that also contains minimatch syntax fails to match.

The help at https://docs.cypress.io/api/commands/intercept.html#routeMatcher-RouteMatcher says:

All properties are optional. All properties that are set must match for the route to handle a request. If a string is passed to any property, it will be glob-matched against the request using minimatch.The available routeMatcher properties are listed below:

Desired behavior

Glob-matching should succeed with string properties passed to cy.intercept() in a routeMatcher.

Test code to reproduce

Versions

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions