Skip to content

Commit 5ada7e9

Browse files
committed
add enable
1 parent 6b33926 commit 5ada7e9

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

tests/test-twice/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# routing example
2+
> Client-side routing with fallback
3+
4+
This example tests the redirect fallback that makes client-side routing defined in [src/App.js](src/App.js) work. See [netlify.toml](netlify.toml)
5+
6+
![Test screenshot](images/routing.png)
7+
8+
These tests run:
9+
- [x] before the build
10+
- [x] after the build
11+
- [ ] on deploy success
12+
13+
## Local build
14+
15+
Use command `DEBUG=netlify-plugin-cypress npm run netlify:build` to try the plugin locally

tests/test-twice/netlify.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@ TERM = "xterm"
1717
# run Cypress tests once on the site before it is built
1818
# and then after building the static folder
1919

20+
# do not run tests after deploy
21+
[plugins.inputs]
22+
enable = false
23+
2024
# let's run tests against development server
2125
# before building it (and testing the built site)
2226
[plugins.inputs.preBuild]
27+
enable = true
2328
start = 'npx serve public'
2429
wait-on = 'http://localhost:5000'
2530
wait-on-timeout = '30' # seconds
2631
record = true
2732
group = "test twice: 1 - before build"
2833
tag = "test twice"
2934

30-
# and test after
31-
[plugins.inputs]
35+
# and test after build
36+
[plugins.inputs.postBuild]
3237
record = true
3338
group = "test twice: 2 - after build"
3439
tag = "test twice"

0 commit comments

Comments
 (0)