Skip to content

chore: move cypress out of demo and fix set up #766

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 5 commits into from
Nov 5, 2021
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
4 changes: 4 additions & 0 deletions cypress/config/all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"video": false,
"baseUrl": "http://localhost:3000"
}
8 changes: 8 additions & 0 deletions cypress/config/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"baseUrl": "http://localhost:3000",
"integrationFolder": "../cypress/integration",
"pluginsFile": "../cypress/plugins",
"screenshotsFolder": "../cypress/screenshots",
"supportFile": "../cypress/support/index.js",
"videoFolder": "../cypress/videos"
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ describe('TypeScript spec', () => {
})

it('loads home page', () => {
cy.get('h1')
cy.findByText('Next Demo!')
})
})
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/no-unassigned-import
import './commands';
4 changes: 2 additions & 2 deletions demo/cypress/tsconfig.json → cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"extends": "../../tsconfig.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"noEmit": true,
// be explicit about types included
// to avoid clashing with Jest types
"types": ["cypress", "mocha", "@testing-library/cypress"]
},
"include": [
"../../node_modules/cypress",
"../node_modules/cypress",
"./**/*.ts"
]
}
3 changes: 0 additions & 3 deletions demo/cypress/config/all.json

This file was deleted.

2 changes: 1 addition & 1 deletion demo/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ package = "@netlify/plugin-local-install-core"
package = "netlify-plugin-cypress"

[context.deploy-preview.plugins.inputs]
configFile = "cypress/config/all.json"
configFile = "../cypress/config/ci.json"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"build:demo": "next build demo",
"cy:open": "cypress open --config-file cypress/config/all.json",
"cy:run": "cypress run --config-file cypress/config/all.json",
"cy:run": "cypress run --config-file ../cypress/config/ci.json",
"dev:demo": "next dev demo",
"format": "run-s format:check-fix:*",
"format:ci": "run-s format:check:*",
Expand Down