lundi 9 décembre 2019

Cypress Assertion

I have a question regarding Cypress assertions, just recently start playing with this testing platform, but got stucked when the URL returns a random number as shown below.

/Geocortex/Essentials/REST/sites/SITE?f=json&deep=true&token=SK42f-DZ_iCk2oWE8DVNnr6gAArG277W3X0kGJL1gTZ7W5oQAAV9iC4Zng4mf0BlulglN-10NK&dojo.preventCache=1575947662312

As you can see token is random and dojo.preventCache is also a random string. I want to detect this url and check if deep=true regardless the token number, but I don't know how to achieve this.

cy.location('origin', {timeout: 20000}).should('contain', '/Geocortex/Essentials/REST/sites/SITE?f=json&deep=true&token=**&dojo.preventCache=**');

Anyone any idea?

Aucun commentaire:

Enregistrer un commentaire