File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments