BeePong / 42_transcendence

This group project is about creating a website for the mighty Pong contest!🏓
2 stars 4 forks source link

Feature/073 beepong testing and automation #91

Open liocle opened 2 months ago

liocle commented 2 months ago

Pull Request: Add Cypress End-to-End Tests for Mighty Pong

Description

This PR introduces several Cypress end-to-end tests for the Mighty Pong web application. The tests cover basic navigation, user registration, form validation, tournament navigation, and error handling. This PR is not definitive, but to introduce the tests to the project. More test to be added according to your suggestions and needs: @pixelsnow @linhtng @wengcychan @djames9


Tests Added:

1. Basic Navigation and Content Tests

These tests ensure that the main pages of the website are accessible and contain the expected content.

2. User Registration, Login, Logout, and Duplicate Registration Tests

These tests cover user authentication and validation, ensuring proper registration, login, and error handling during duplicate registration attempts.

3. Form Validation Tests

These tests validate form submission behavior and ensure appropriate error messages are displayed for invalid inputs.

4. Accounts Navigation and Form Tests

These tests confirm that the key pages in the accounts section work correctly, including registration, login, and logout.

5. Tournament Navigation and Interaction Tests

These tests ensure that users can navigate the tournament section, create tournaments, and join them.

6. Error Handling Tests

These tests check that the application properly handles non-existent routes and displays appropriate error messages.


Screenshots

During development screenshots have been enabled to capture various stages of each test and can be used to help debug.


Notes:


To-do:

Tests are automatically executed during the docker-compose up process. To manually run tests, use the following command:

make cypress; make cypress_firefox

See the make test section:

make help
liocle commented 2 months ago

I will keep this branch updated with the main, but with ngnix port 443 instead of 8443. Consequently, the pull request will wait until you all have finished working on the school's computers requiring 8443.