Skip to content

The wildcard for routes RegExp fails on optional parameters #75

@whitespacecode

Description

@whitespacecode

Right now the RegExp for wildcard parameters requires the wildcard to be exact

Using your example:

 cy.visit({
        route: 'team.dashboard',
        parameters: { team: 1 }
});

This will replace following
/teams/{team}/dashboard to /teams/1/dashboard

What if you have a route that have optional parameters

 cy.visit({
        route: 'team.dashboard.style',
        parameters: { team: 1, style: 3 }
});

/teams/{team}/dashboard/{style?} to /teams/1/dashboard/%7Bstyle%7D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions