Extend Cypress testing to check video links
See original GitHub issueFeature description
Add video link testing to the Cypress suite in https://github.com/corona-warn-app/cwa-website/tree/master/cypress/integration.
Problem and motivation
Problem
- PR https://github.com/corona-warn-app/cwa-website/pull/2434 has implemented a redesign of the CWA FAQs on https://www.coronawarn.app/en/faq/ and https://www.coronawarn.app/de/faq/.
- The redesign has caused a video link to fail. See issue https://github.com/corona-warn-app/cwa-website/issues/2588.
- The Cypress test suite, run using
npm test
, did not identify this issue prior to Move-To-Production.
One of the missed bad links was in https://www.coronawarn.app/en/faq/results/index.html with the contents
<video src='../../assets/video/erklaerfilm_en.mp4' class='w-100' controls='' alt='Corona-Warn-App - explanatory film'></video>
.
Although at the time the Cypress test suite was not scanning in the the /faq/results
directory, even if it had have been scanning there, it was not actually checking video links.
Motivation
Running the Cypress test suite should give a high level of confidence that the website performs as needed, including ensuring that links to videos are correct.
Is this something you’re interested in working on
I don’t have the skills to write Cypress tests. I’m happy to review any PR which adds this functionality though.
Issue Analytics
- State:
- Created a year ago
- Comments:14 (14 by maintainers)
@MikeMcC399
I did see the thread related to the Cypress update. Thank you for the heads up!
My plan is to have it make sure the video is playable, which does not require it to play the entire video. My roadblocks have been related to my inexperience with the particular syntax. I think with some help from the community (PR still on course for this weekend) and/or some additional research, I should have a solution ready to test videos efficiently 😁.
@ahodzic2
Please note that the Cypress version has been updated to 9.6.1.
I’m not sure which tests you are implementing. It would be good if they are quick to run and do not try to run each video, which would take longer. In my opinion it would be sufficient if the tests just make sure that the videos exist at the location which tries to call them.