I am trying to do the following:
Assert the URL path after being redirected.
Here is an example of the Url: https://www.hello.com/test/test-result?testId=100
cy.location("pathname").should("eq", "/test/test-result"
cy.location("search").should("eq","/?testId=/d+/)
The first assertion passes, but the second one fails.
The error I get is the following: expected ?testId=100 to equal /?testId=/d+/
Can someone tell me what I am doing wrong? I thought using d+ would be good since it will match any number.