busy-wall-71096
11/15/2022, 3:22 PMcy.wait('...') is blocking pretty much every call that is happening and in consequence times out 😮 I think it only passes if MP3 stream is fast enough to fulfill before waiting begins. Otherwise, it always fails. See screenshots. Could this be related to problems Cypress has with intercepting binary/stream data (https://github.com/cypress-io/cypress/issues/24278 )? Does anyone have any idea what I'm doing incorrectly?
Using:
* Cypress 11.0.1
* NodeJS: 16
* Chrome E2E
Code for reproduction:
describe('E2E: Intercept', () => {
it('Can intercept player related requests without getting blocked', () => {
cy.intercept({
url: 'https://api.energy.ch/sts/energych-player',
}).as('audioStreamRelatedRequest');
cy.visit('https://energy.ch/on-air');
cy.wait(5000);
cy.visit('https://energy.ch/on-air');
cy.wait(5000);
cy.get('button.flex-shrink-0.w-12.h-12.p-2.cursor-pointer')
.filter(':visible')
.click();
// This randomly causes https://energyzuerich.mp3.energy.ch/energyzuerich-high.mp3?ua=energy+website+desktop
// request to hang and consecutive awaited @audioStreamRelatedRequest request never fires, then timeout happens
cy.wait('@audioStreamRelatedRequest')
.its('response.statusCode')
.should('eq', 200);
cy.wait(3000);
});
});