Skip to content

fix: spa parameter and full client-side routing example #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
cypress/screenshots
**/cypress/videos
build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ SPAs need catch-all redirect setup to make non-root paths accesssible by tests.
# local Cypress plugin will test our site after it is built
package = "netlify-plugin-cypress"
[plugins.inputs]
# can also use "spa = true" to use "index.html" by default
spa = "index.html"
```

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

### testing the site before build

Expand Down
18 changes: 18 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ jobs:
working_directory: tests/test-twice
environment:
DEBUG: netlify-plugin-cypress

routing:
executor: cypress/base-12-14-0
steps:
# all dependencies were installed in previous job
- attach_workspace:
at: ~/
- run:
name: Netlify Build 🏗
command: npm run netlify:build
working_directory: tests/routing
environment:
DEBUG: netlify-plugin-cypress

workflows:
version: 2
test_and_release:
Expand All @@ -93,13 +107,17 @@ workflows:
- 'test-twice':
requires:
- cypress/install
- routing:
requires:
- cypress/install
- release:
requires:
- build
- 'basic test'
- 'recommended test'
- 'recording test'
- 'test-twice'
- 'routing'
filters:
branches:
only:
Expand Down
Loading