Skip to content

When mulitple routes aliased with same url, 2nd route is never matched to 2nd alias. #85

@jennifer-shehane

Description

@jennifer-shehane

My app hits the same route more than once (GET's initial folders, then GET's again on search). When I try to assert off of the second alias (@getFoldersWithSearch), it's giving me the request from the initial aliased route (@getFolder).

Example Code

it "searches for accounts when typed [4b7]", ->
    cy
      .server()
      .route(/^\/folders\?/, "fixture:folders").as("getFolders")
      .wait("@getFolders")

      .route(/^\/folders\?/, "fixture:folders").as("getFoldersWithSearch")

      .get(".account-search").find("[name='nameNum']").type("Echo")
      .get("#search-form").find(".form-vertical").submit()

      .wait("@getFoldersWithSearch").its("url")
      .should("contain", "Echo")

Metadata

Metadata

Assignees

No one assigned

    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