pwa-demo icon indicating copy to clipboard operation
pwa-demo copied to clipboard

E2E test by Cypress

Open mercs600 opened this issue 10 months ago • 0 comments

We have discussed with @rogoit and concluded that it's worth implementing E2E tests. We've decided to house the tests in this repository. This decision was based on having the most up-to-date backend/frontend versions and a consistent database, which is essential for conducting E2E tests.

Here are the simplest test cases we can start with:

Core

  • Does the page return 202 code?
  • Does the non-existing page return 404 code?
  • Does the navigation return the correct links (which were added in backend)?
  • Has the language changed after navigating to the localized page?
    • Is the navigation translated?
    • Is the page content translated?
  • Does the redirection work?
  • Is the new frontend layout applied?
  • Is the new backend layout applied?
    • Is the content element displayed in the right column position?
  • Does the frontend render the correct component types?

Content Elements

Shared properties

Given our common approach to handling shared component properties, such as header and headerLayout, we can establish a foundational test for multiple components. This base test can then be used across various test cases.

  • Does the component display the correct header message
  • Does the component display the correct header level
  • Does the component display the correct header link
  • Does the component display the correct sub header

Specific Content Elements

Initially, I'd suggest focusing on the basics, like:

  • Text
  • Textpic
  • Textmedia

The next step will be implementing E2E testing on Github actions.

@rogoit, if there are any critical tests you'd like to add, please do so.

mercs600 avatar Sep 05 '23 13:09 mercs600