Skip to content

Commit 7789683

Browse files
authored
set up cypress testing and toml (#3)
* set up cypress testing and added plugin within toml * removed cypress plugin inputs * removed cypress plugin from toml
1 parent 8cb4d53 commit 7789683

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

cypress.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from "cypress";
2+
3+
export default defineConfig({
4+
e2e: {
5+
baseUrl: "http://localhost:8888/",
6+
supportFile: false,
7+
setupNodeEvents(on, config) {
8+
// implement node event listeners here
9+
},
10+
},
11+
});

cypress/e2e/basic.cy.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
describe('empty spec', () => {
2+
beforeEach(() => {
3+
cy.visit('/')
4+
})
5+
6+
it('display header text', () => {
7+
cy.get('h1')
8+
.contains('Hello World!', { matchCase: false })
9+
})
10+
11+
it('displays Click button', () => {
12+
cy.get('button')
13+
.contains('Clicks');
14+
})
15+
})

netlify.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
command = "solid-start build"
3+
functions = "netlify/functions"
4+
publish = "netlify"
5+
6+
## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"type": "module",
99
"devDependencies": {
10+
"cypress": "^10.11.0",
1011
"solid-start-netlify": "^0.1.0",
1112
"typescript": "^4.8.3",
1213
"vite": "^3.1.0"
@@ -21,4 +22,4 @@
2122
"engines": {
2223
"node": ">=16"
2324
}
24-
}
25+
}

0 commit comments

Comments
 (0)