diff --git a/cypress/integration/simple.spec.ts b/cypress/integration/simple.spec.ts index 1ad9435..3b72d99 100644 --- a/cypress/integration/simple.spec.ts +++ b/cypress/integration/simple.spec.ts @@ -5,6 +5,11 @@ describe('test extension', () => { // TODO: Add more e2e tests when youtube webapp is not a nightmare to work with cypress anymore // as today, it's near impossible to do anything close to end user interactions (like login) it('extension load and set run attr to tag', () => { + // mock youtube website to avoid redirect to 'https://consent.youtube.com' + cy.intercept('https://www.youtube.com', { + statusCode: 200, + body: '
mocked youtube
', + }) cy.visit('https://www.youtube.com') cy.get('html').should('have.attr', `data-${U.id}-has-run`) })