simorgh icon indicating copy to clipboard operation
simorgh copied to clipboard

Cypress test failure on FIX for AMP ads tests - unhandled promise rejection

Open jroebu14 opened this issue 4 years ago • 1 comments

Describe the bug Cypress v7 introduced a new feature that fails tests when the test runner detects any unhandled promise rejections. This is failing AMP ads tests for FIX pages.

Screenshot 2021-06-11 at 11 20 57

To move forward with the Cypress v7 upgrade, we have decided to disable tests failing on unhandled promise rejections and revisit this error when we have more time to.

To Reproduce Steps to reproduce the behaviour:

  1. Remove these lines of code
  2. Run Cypress
  3. Observe failing featureIndexPage tests

Expected behaviour There should be no unhandled promise rejections.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Testing notes

  • [ ] This bug fix is expected to need manual testing.

Checklist

Additional context Add any other context about the problem here.

jroebu14 avatar Jun 11 '21 11:06 jroebu14

Reopening this as the previous attempt to remove the promise exception handler seems to have introduced E2E failures on Test/Live in CodePipeline, see issue #9465.

I can't narrow down the errors being reported in #9465 locally. I've tried running the test suites in local, test and live with various combinations of the CYPRESS_ flags, but to avail, they all complete and pass as expected. The tests on CodePipeline aren't consistently failing either, which compounds the issue of debugging further.

Latest PR for reverting #9457 https://github.com/bbc/simorgh/pull/9521

amoore108 avatar Oct 07 '21 16:10 amoore108