Closed jamesbhobbs closed 4 years ago
@PriyaKR To verify whether refactoring of cookieBanner.canonical.js
and cookieBanner.amp.js
into one test file would still have the second domain issue.
Can't refactor think the cookieBanner.canonical.js
and cookieBanner.amp.js
into one test file as the cookie banner in canonical and amp page seem to behave differently(AMP doesn’t do first-party cookies, the data is stored in localstorage).
Also @benjaminhobbs Amp Cookie Banner Test and Canonical Cookie Banner Test fail no more on non local environments if you're in the UK as this was fixed by this PR https://github.com/bbc/simorgh/pull/2038 some changes has been done to the config
file.
So this issue will then basically be are we able to fix the domain issue for articleBodyspec.js
where in a single test file looping through the news article(domain .co.uk) and then the persian(domain .com) article.
Relates to https://github.com/bbc/simorgh/issues/2046
Are we able to do something like this https://github.com/cypress-io/cypress/issues/2671#issuecomment-444069577 as mentioned here try adding some fake geolocation to the visit
command.
The fix was reverted due to cypress clearCookies not clearing all cookies, creating flakey tests.
Describe the bug Run all E2E tests on test, stage or live and three different groups of tests will fail:
newsBodyspec.js
andpersianBodyspec.js
into one article body tests This is because we are redirecting to .co.uk and there is this "CypressError: cy.visit() failed because you are attempting to visit a second unique domain."To Reproduce Steps to reproduce the behavior:
Expected behavior Tests pass
Screenshots n/a
Desktop (please complete the following information): n/a
Smartphone (please complete the following information): n/a
Additional context