Skip to content

Commit d494cd8

Browse files
author
Tiffany Le-Nguyen
authored
Merge pull request #41 from netlify/test
Integrate netlify-plugin-cypress
2 parents f283814 + 5a95d84 commit d494cd8

File tree

12 files changed

+3483
-114
lines changed

12 files changed

+3483
-114
lines changed

Diff for: cypress/config/all.json

-4
This file was deleted.

Diff for: cypress/integration/test.spec.ts

-9
This file was deleted.

Diff for: demo/cypress/config/all.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"video": false
3+
}
File renamed without changes.

Diff for: demo/cypress/integration/test.spec.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
describe('TypeScript spec', () => {
2+
beforeEach(() => {
3+
cy.visit('/')
4+
})
5+
6+
it('loads home page', () => {
7+
cy.get('h1')
8+
})
9+
})
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"extends": "../tsconfig.json",
2+
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"noEmit": true,
55
// be explicit about types included
66
// to avoid clashing with Jest types
77
"types": ["cypress", "mocha", "@testing-library/cypress"]
88
},
99
"include": [
10-
"../node_modules/cypress",
10+
"../../node_modules/cypress",
1111
"./**/*.ts"
1212
]
1313
}

Diff for: demo/netlify.toml

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ command = "next build"
33
publish = ".next"
44
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../"
55

6+
[build.environment]
7+
# cache Cypress binary in local "node_modules" folder
8+
# so Netlify caches it
9+
CYPRESS_CACHE_FOLDER = "../node_modules/CypressBinary"
10+
611
[dev]
712
framework = "#static"
813

@@ -11,3 +16,8 @@ package = "./local-plugin"
1116

1217
[[plugins]]
1318
package = "@netlify/plugin-local-install-core"
19+
20+
[[plugins]]
21+
package = "netlify-plugin-cypress"
22+
[plugins.inputs]
23+
configFile = "cypress/config/all.json"

Diff for: netlify.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[build]
2-
base="demo/"
3-
2+
base="demo/"

0 commit comments

Comments
 (0)