I am trying to intercept an a request. This request has a specific endpoint and I would like to change this endpoint.
I have now solved it with the following code:
cy.intercept('**/i18n/nl.json', { fixture: 'LanguageForItemEditorENG.json' }).as('Language')
As you can see I have used a fixture, but I don't think that this is the best practice. My testcode would be more robust if I can route the request to
'**/i18n/en.json'
and not use a fixture.
So, at this moment the application is making a request to **/nl.json but I want to simulate this so the application gets the response of the **/en.json. How can I make this work?