e2e tests

Why bother ?

Automated e2e testing is a core part of an application in production, because without it at some point a bug will appear that will require refactoring, on a level impossible without e2e tests. Maintaining a simple test suite may help avoid daily bugs.

Cypress

Cypress is a next generation front end testing tool built for the modern web. We address the key pain points developers and QA engineers face when testing modern applications. https://docs.cypress.io/guides/overview/why-cypress

Testing library

Material UI provides additional challenges for testing, as elements generated and class names are not guaranteed. To make tests maintainable without adding testing attributes to elements: https://testing-library.com/ The more your tests resemble the way your software is used, the more confidence they can give you. https://github.com/testing-library/cypress-testing-library You want to use DOM Testing Library methods in your Cypress tests. This lib allows the test to target elements as the user sees them.

Tests

Located in /cypress folder Tests code /cypress/integration

Login

cypress/support/index.js Next Auth with Google and Git hub captcha and Strapi backend auth are not easy for automated testing. So hidden login was created

DB

User: username: test@test.com password: 2dG6eFrHbMxE7tEX Workspace: name: test_ws1 App name: test_app1 Page name: test_page1 Subscription (needs to be active and connected to app) test_sub1 or 999 in required fields