Skip to content

Commit 76092cb

Browse files
authored
fix: spa parameter and full client-side routing example (#72)
1 parent c28c585 commit 76092cb

File tree

23 files changed

+27171
-13482
lines changed

23 files changed

+27171
-13482
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
cypress/screenshots
33
**/cypress/videos
4+
build

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ SPAs need catch-all redirect setup to make non-root paths accesssible by tests.
166166
# local Cypress plugin will test our site after it is built
167167
package = "netlify-plugin-cypress"
168168
[plugins.inputs]
169+
# can also use "spa = true" to use "index.html" by default
169170
spa = "index.html"
170171
```
171172

172-
See [lws-spa](https://github.com/lwsjs/spa) for more options.
173+
See [lws-spa](https://github.com/lwsjs/spa) for more options and [tests/routing](tests/routing) example.
173174

174175
### testing the site before build
175176

circle.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ jobs:
7575
working_directory: tests/test-twice
7676
environment:
7777
DEBUG: netlify-plugin-cypress
78+
79+
routing:
80+
executor: cypress/base-12-14-0
81+
steps:
82+
# all dependencies were installed in previous job
83+
- attach_workspace:
84+
at: ~/
85+
- run:
86+
name: Netlify Build 🏗
87+
command: npm run netlify:build
88+
working_directory: tests/routing
89+
environment:
90+
DEBUG: netlify-plugin-cypress
91+
7892
workflows:
7993
version: 2
8094
test_and_release:
@@ -93,13 +107,17 @@ workflows:
93107
- 'test-twice':
94108
requires:
95109
- cypress/install
110+
- routing:
111+
requires:
112+
- cypress/install
96113
- release:
97114
requires:
98115
- build
99116
- 'basic test'
100117
- 'recommended test'
101118
- 'recording test'
102119
- 'test-twice'
120+
- 'routing'
103121
filters:
104122
branches:
105123
only:

0 commit comments

Comments
 (0)