|
| 1 | +# e2e test for local playwright app mode |
| 2 | + |
| 3 | +Currently we have the original e2e tests for the web mode in the `e2e-tests` directory. We are adding new tests for the app mode in the `app-e2e-tests` directory for local testing. Unlike the other tests, these tests do not require a token to run so the setup is as followed: |
| 4 | + |
| 5 | +## Running app mode tests |
| 6 | + |
| 7 | +## Setup |
| 8 | + |
| 9 | +- Before running the tests, be sure to have an instance of Minikube running with the name `minikube` |
| 10 | + |
| 11 | +### Running the tests |
| 12 | + |
| 13 | +To run the tests for the app mode, follow the steps below: |
| 14 | + |
| 15 | +- cd into the e2e-tests directory within the headlamp repository |
| 16 | + `cd headlamp/app/e2e-tests` |
| 17 | + |
| 18 | +- npm install the needed packages |
| 19 | + `npm install` |
| 20 | + |
| 21 | +- run the following command |
| 22 | + `npm run test-app` |
| 23 | + (optional: include `-- --headed` to run the tests in headed mode) |
| 24 | + (optional: include `-- --ui` to run the tests in ui mode) |
| 25 | + |
| 26 | +## Running web mode tests |
| 27 | + |
| 28 | +Running the tests for the web mode requires the backend and frontend to be running. Follow the steps below to run the tests for the web mode: |
| 29 | + |
| 30 | +Note: You may encouter issues switching from the app mode tests to the web mode tests. If you do, search for any running headlamp server processes and end them before running the web mode tests or app mode tests. |
| 31 | + |
| 32 | +## Setup |
| 33 | + |
| 34 | +- Before running the tests, be sure to have an instance of Minikube running with the name `minikube` |
| 35 | + |
| 36 | +### Backend |
| 37 | + |
| 38 | +To run the tests for the web mode, you will need to have the backend running. Follow the steps below to run the backend: |
| 39 | + |
| 40 | +- cd into the headlamp directory in a singular terminal |
| 41 | + `cd headlamp` |
| 42 | + |
| 43 | +- run the following command |
| 44 | + `make backend` followed by `make run-backend` |
| 45 | + |
| 46 | +### Frontend |
| 47 | + |
| 48 | +To run the tests for the web mode, you will need to have the frontend running. Follow the steps below to run the frontend: |
| 49 | + |
| 50 | +- cd into the headlamp directory in a separate terminal |
| 51 | + `cd headlamp/frontend` |
| 52 | + |
| 53 | +- run the following command |
| 54 | + `make frontend` followed by `make run-frontend` |
| 55 | + |
| 56 | +### Running the tests |
| 57 | + |
| 58 | +To run the tests for the web mode, follow the steps below: |
| 59 | + |
| 60 | +- cd into the e2e-tests directory within the headlamp repository in a separate terminal |
| 61 | + `cd headlamp/app/e2e-tests` |
| 62 | + |
| 63 | +- npm install the needed packages |
| 64 | + `npm install` |
| 65 | + |
| 66 | +- run the following command |
| 67 | + `npm run test-web` |
| 68 | + (optional: include `-- --headed` to run the tests in headed mode) |
| 69 | + (optional: include `-- --ui` to run the tests in ui mode) |
0 commit comments