https://cypress.io logo
Okay, that helped in this particular example I did...
# e2e-testing
b
Okay, that helped in this particular example I did. Thx! But I guess it didn't reproduce my problem enough. Please, have a looks at this instead:
Copy code
describe('E2E: Radio stream & Playouts', () => {
  it('Can play radio station from player', () => {
    cy.intercept({
      url: 'https://energyzuerich.mp3.energy.ch/energyzuerich-high.mp3?ua=energy+website+desktop',
    }).as('audioStream');

    cy.visit('https://energy.ch');
    // eslint-disable-next-line cypress/no-unnecessary-waiting
    cy.wait(5000);
    cy.visit('https://energy.ch');
    // eslint-disable-next-line cypress/no-unnecessary-waiting
    cy.wait(5000);

    cy.get('button.flex-shrink-0.w-12.h-12.p-2.cursor-pointer')
      .filter(':visible')
      .click();

    // (fetch) GET 200 https://energyzuerich.mp3.energy.ch/energyzuerich-high.mp3?ua=energy+website+desktop

    // This makes request hang and never fulfill. Later time-outs after 30s. Why?
    cy.wait('@audioStream').its('response.statusCode').should('eq', 200);

    // eslint-disable-next-line cypress/no-unnecessary-waiting
    cy.wait(3000);
  });
});