Can cypress version 6 handle same api, but diff responses? If yes, is the following correct? If we cannot, will cypress version 9 support this?
// * same api for each test, but diff response
const api = '/v1/test';
it('test 1', () => {
cy.intercept(api, {res: '1'});
// do stuff
});
it('test 2', () => {
cy.intercept(api, {res: '2'});
// do stuff
});
it('test 3', () => {
cy.intercept(api, {res: '2'});
// do stuff
});
There are some hacking, but looking for a proper way.