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")
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