corona-warn-app / cwa-website

Corona-Warn-App website. The CWA development ended on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
521 stars 224 forks source link

Improve check_links Cypress test to block hostnames not URLs #3404

Closed MikeMcC399 closed 1 year ago

MikeMcC399 commented 1 year ago

This PR improves the Cypress test cypress/e2e/hybrid/check_links.cy.js regarding maintaining the list of link targets which cannot be checked due to their network or security setup.

In the past there were two separate lists, one for the main check and one for the blog checks. The lists were complete URLs.

Reason for PR

The motivation for this PR is to enable this Cypress test spec to be called successfully from a GitHub workflow. Some websites which allowed testing from a local environment cannot be automatically tested from GitHub, meaning that the list was getting longer and less manageable.

Changes

Benefits

The advantages are:

Verification

Local test

npm run test:open

select check_links and ensure that the test runs successfully. Repeat the test twice more.

GitHub verification

This PR will be verified as part of PR https://github.com/corona-warn-app/cwa-website/pull/3402. It has already been checked to run on GitHub.


Internal Tracking ID: EXPOSUREAPP-14842

MikeMcC399 commented 1 year ago

I ran this yesterday several times successfully and today once, so from my point of view this PR is ready for review and merge.