This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="Cypress" /> | |
describe('Cypress Test', () => { | |
beforeEach(() => { | |
cy.visit('https://www.cypress.io') | |
}) | |
it('should has text \'npm install cypress\'', () => { | |
cy.get('[class="filler"]').should('contain', 'npm install cypress') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"plugins": ["istanbul"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extension": [".js", ".vue"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="Cypress" /> | |
describe('Add Todo', () => { | |
beforeEach(() => { | |
cy.visit(Cypress.config('baseUrl')) | |
}) | |
it('should be able to add new todo', () => { | |
const firstTodo = 'Writing a blog' | |
const secondTodo = 'Running' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import '@cypress/code-coverage/support' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (on, config) => { | |
on('task', require('@cypress/code-coverage/task')) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"reporter": "dot" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"reporter": "nyan" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"reportDir": "cypress/report/mochawesome-report", | |
"overwrite": true, | |
"html": true, | |
"json": true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const addContext = require('mochawesome/addContext') | |
Cypress.on('test:after:run', (test, runnable) => { | |
if (test.state === 'failed') { | |
const screenshotFileName = `${runnable.parent.title} -- ${test.title} (failed).png` | |
addContext({ test }, `assets/${Cypress.spec.name}/${screenshotFileName}`) | |
} | |
}) |