You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+40-6
Original file line number
Diff line number
Diff line change
@@ -827,18 +827,52 @@ See the [example-custom-ci-build-id.yml](./.github/workflows/example-custom-ci-b
827
827
828
828
### Working directory
829
829
830
-
In a monorepo, the end-to-end test might be placed in a different sub-folder from the application itself, like this
830
+
In a monorepo, the end-to-end or component test might be placed in a different sub-folder from the application itself.
831
+
832
+
Using a [Cypress legacy configuration](https://docs.cypress.io/guides/references/legacy-configuration) (Version 9 or earlier) the structure could look like this:
831
833
832
834
```text
833
835
repo/
834
836
app/
835
-
e2e/
836
-
cypress
837
+
app-test/
838
+
cypress/
839
+
fixtures/
840
+
integration/
841
+
plugins/
842
+
support/
837
843
cypress.json
838
844
package.json
839
845
```
840
846
841
-
You can specify the `e2e` working directory when running Cypress tests using `working-directory` parameter
847
+
For End-to-End testing using a [Cypress configuration](https://docs.cypress.io/guides/references/configuration) for Version 10 and later, the structure could look like this :
848
+
849
+
```text
850
+
repo/
851
+
app/
852
+
app-test/
853
+
cypress/
854
+
e2e/
855
+
fixtures/
856
+
support/
857
+
cypress.config.js
858
+
package.json
859
+
```
860
+
861
+
Similarly for Component Testing with a [Cypress configuration](https://docs.cypress.io/guides/references/configuration) for Version 10 and later, the structure could look like this:
862
+
863
+
```text
864
+
repo/
865
+
app/
866
+
app-test/
867
+
cypress/
868
+
component/
869
+
fixtures/
870
+
support/
871
+
cypress.config.js
872
+
package.json
873
+
```
874
+
875
+
You can specify the `app-test` working directory when running Cypress tests using the `working-directory` parameter
842
876
843
877
```yml
844
878
on: [push]
@@ -850,10 +884,10 @@ jobs:
850
884
- uses: cypress-io/github-action@v5
851
885
with:
852
886
start: npm start
853
-
working-directory: e2e
887
+
working-directory: app-test
854
888
```
855
889
856
-
See [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) for a running example
890
+
See [example-basic.yml](.github/workflows/example-basic.yml) for an End-to-End test example and [example-component-test.yml](.github/workflows/example-component-test.yml) for a Component test example, using the parameter `working-directory`.
0 commit comments