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
+7-33Lines changed: 7 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -920,24 +920,9 @@ See the [example-custom-ci-build-id.yml](.github/workflows/example-custom-ci-bui
920
920
921
921
### Working directory
922
922
923
-
In a monorepo, the end-to-end or component test might be placed in a different sub-folder from the application itself.
923
+
In a monorepo, the end-to-end or component test might be placed in a different sub-folder from the application itself. This sub-folder is the Cypress "working directory" which you can specify using the `working-directory` parameter.
924
924
925
-
Using a [Cypress legacy configuration](https://docs.cypress.io/guides/references/legacy-configuration) (Version 9 or earlier) the structure could look like this:
926
-
927
-
```text
928
-
repo/
929
-
app/
930
-
app-test/
931
-
cypress/
932
-
fixtures/
933
-
integration/
934
-
plugins/
935
-
support/
936
-
cypress.json
937
-
package.json
938
-
```
939
-
940
-
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 :
925
+
In the following example of a directory layout for end-to-end testing, the Cypress working directory is `app-test`. The working directory contains the Cypress tests and a package manager lock file:
941
926
942
927
```text
943
928
repo/
@@ -949,23 +934,10 @@ repo/
949
934
support/
950
935
cypress.config.js
951
936
package.json
937
+
package-lock.json
952
938
```
953
939
954
-
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:
955
-
956
-
```text
957
-
repo/
958
-
app/
959
-
app-test/
960
-
cypress/
961
-
component/
962
-
fixtures/
963
-
support/
964
-
cypress.config.js
965
-
package.json
966
-
```
967
-
968
-
You can specify the `app-test` working directory when running Cypress tests using the `working-directory` parameter
940
+
We use `working-directory: app-test` to match the above example directory structure:
969
941
970
942
```yml
971
943
on: push
@@ -980,7 +952,9 @@ jobs:
980
952
working-directory: app-test
981
953
```
982
954
983
-
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`.
955
+
See the Cypress documentation [Folder structure](https://on.cypress.io/guides/core-concepts/writing-and-organizing-tests#Folder-Structure) section for examples of standard directory layouts, covering end-to-end testing and component testing with both JavaScript and TypeScript options.
956
+
957
+
Each of the examples in this monorepo is separated from other examples by using different working directories. See [example-basic.yml](.github/workflows/example-basic.yml) for one end-to-end test example using the parameter `working-directory` and [example-component-test.yml](.github/workflows/example-component-test.yml) for a component test example.
0 commit comments