Skip to content

Commit fa9ca56

Browse files
author
Tiffany Le-Nguyen
authored
chore: move cypress out of demo and fix set up (#766)
* chore: move cypress out of demo * Update package.json * chore: add ci specific config * chore: fix testing library support * chore: fix config file location
1 parent 58bb89f commit fa9ca56

File tree

11 files changed

+19
-8
lines changed

11 files changed

+19
-8
lines changed

cypress/config/all.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"video": false,
3+
"baseUrl": "http://localhost:3000"
4+
}

cypress/config/ci.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"baseUrl": "http://localhost:3000",
3+
"integrationFolder": "../cypress/integration",
4+
"pluginsFile": "../cypress/plugins",
5+
"screenshotsFolder": "../cypress/screenshots",
6+
"supportFile": "../cypress/support/index.js",
7+
"videoFolder": "../cypress/videos"
8+
}
File renamed without changes.

demo/cypress/integration/test.spec.ts renamed to cypress/integration/test.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ describe('TypeScript spec', () => {
44
})
55

66
it('loads home page', () => {
7-
cy.get('h1')
7+
cy.findByText('Next Demo!')
88
})
99
})
File renamed without changes.
File renamed without changes.

cypress/support/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-unassigned-import
2+
import './commands';
Lines changed: 2 additions & 2 deletions
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
}

demo/cypress/config/all.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

demo/netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ package = "@netlify/plugin-local-install-core"
2121
package = "netlify-plugin-cypress"
2222

2323
[context.deploy-preview.plugins.inputs]
24-
configFile = "cypress/config/all.json"
24+
configFile = "../cypress/config/ci.json"

0 commit comments

Comments
 (0)