End-to-end testing with Cypress
Onelink uses Cypress for end-to-end testing. Use the following steps to run the tests on your local machine.Prepare the Test Server
Choose any of the given methods to run your test server for the fork.- Local Installation
- Docker Setup
Using Local Onelink Installation
You have to install the necessary dependencies as described in setup guide for this method to work.
Create a fresh test database
Start Onelink in the test environment
Run Cypress
Loadlocalhost:5050 on your browser and ensure that the Chatwoot server is running.
Navigate to your Chatwoot local directory and execute the following command to run the Cypress tests:
- Choose a browser for running tests
- Select test files to run individual or all tests
- Watch tests run in real-time with step-by-step execution
- Debug failed tests with detailed error information
Getting Help
If you encounter issues with Cypress testing:- Cypress Documentation: Official Cypress Docs
- Cypress Best Practices: Testing Guide
- Common Errors: See Common Errors
- Community Support: Discord
Useful Resources
- Cypress API Reference: https://docs.cypress.io/api/table-of-contents
- Testing Library: Testing utilities for better element selection
- Cypress Examples: Real-world examples
Your Cypress testing environment is now ready for comprehensive end-to-end testing! 🧪