Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

Commit f74b1bc

Browse files
authored
Test pre build (#2)
* test dev version of the site and after building it * add recording preBuild and postBuild * update netlify toml * use tags * new version * let plugin pick the tags * use official release v1.3.0
1 parent 21d68fe commit f74b1bc

File tree

4 files changed

+68
-6
lines changed

4 files changed

+68
-6
lines changed

cypress.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"baseUrl": "http://localhost:8000"
2+
"baseUrl": "http://localhost:8000",
3+
"projectId": "ih9cap"
34
}

netlify.toml

+12
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,15 @@
1414

1515
[[plugins]]
1616
package = "netlify-plugin-cypress"
17+
# let's first test the site before Gatsby builds it
18+
[plugins.inputs.preBuild]
19+
start = 'npm run develop'
20+
wait-on = 'http://localhost:8000'
21+
wait-on-timeout = '30' # seconds
22+
record = true
23+
group = '1: testing develop site'
24+
# then Netlify builds the site
25+
# and then our tests will run again, testing the built production version
26+
[plugins.inputs]
27+
record = true
28+
group = '2: testing built site'

package-lock.json

+53-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"devDependencies": {
2222
"cypress": "4.2.0",
23-
"netlify-plugin-cypress": "1.2.0",
23+
"netlify-plugin-cypress": "1.3.0",
2424
"prettier": "^1.19.1",
2525
"start-server-and-test": "1.10.11"
2626
},

0 commit comments

Comments
 (0)