feat: setup cypress tests
This commit is contained in:
1 parent
ed00348799
commit
83d126b9a4
7 files changed
+818
No files matched your search
@@ -0,0 +1,37 @@
|
||||
|
||||
context('Basic', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
it('basic nav', () => {
|
||||
cy.url()
|
||||
.should('eq', 'http://localhost:3333/')
|
||||
|
||||
cy.contains('[Home Layout]')
|
||||
.should('exist')
|
||||
|
||||
cy.get('#input')
|
||||
.type('Vitesse{Enter}')
|
||||
.url()
|
||||
.should('eq', 'http://localhost:3333/hi/Vitesse')
|
||||
|
||||
cy.contains('[Default Layout]')
|
||||
.should('exist')
|
||||
|
||||
cy.get('.btn')
|
||||
.click()
|
||||
.url()
|
||||
.should('eq', 'http://localhost:3333/')
|
||||
})
|
||||
|
||||
it('markdown', () => {
|
||||
cy.get('[title="About"]')
|
||||
.click()
|
||||
.url()
|
||||
.should('eq', 'http://localhost:3333/about')
|
||||
|
||||
cy.get('pre.language-js')
|
||||
.should('exist')
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
// be explicit about types included
|
||||
// to avoid clashing with Jest types
|
||||
"types": ["cypress"]
|
||||
},
|
||||
"include": [
|
||||
"../node_modules/cypress",
|
||||
"./**/*.ts"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user