From aba16d63afe8ea40a88c16a06c155e9a5952be5b Mon Sep 17 00:00:00 2001 From: socratic617 Date: Wed, 13 Mar 2024 16:01:37 -0400 Subject: [PATCH] Added documentation on to test cypress --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4583bb..0bed8d1 100644 --- a/README.md +++ b/README.md @@ -75,4 +75,26 @@ To run Cypress for your project, follow these steps: bashCopy code - `npx cypress open` \ No newline at end of file + `npx cypress open` + +## Running Cypress Tests + +1. After executing the command `npx cypress open`, the Cypress Test Runner interface will open. + +2. In the Cypress Test Runner, you'll see a list of available tests under the "Specs" section. + +3. Click on the test suite labeled "e2e" or any other relevant label depending on your project structure. This test suite should be configured for end-to-end testing. + +4. Next, you'll be prompted to choose a browser to run the tests in. Select "Electron" from the dropdown menu. This is typically under the "Run all specs" button. + +5. After selecting "Start E2E Testing in Electron", Cypress will open a new window or tab containing the page where all the end-to-end tests are executed. + +6. In the Cypress Test Runner interface, you'll see a list of available test files under the "specs" section. Select the specific test file you want to run by clicking on it. + +7. The selected test will begin execution. During execution, you'll see the test steps being performed in the browser window/tab that Cypress opened. + +8. If the test passes, the screen will turn green. If it fails, the screen will turn red, indicating which test step failed. + +9. To continue testing other specs, click on the "specs" label in the sidebar to return to the main page of the Cypress Test Runner. + +10. From the main page, you can select and run other test files one by one, following the same process as described above.