Skip to content

Commit

Permalink
add mochawesome reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed Dec 6, 2024
1 parent 4f7e63d commit 497374a
Show file tree
Hide file tree
Showing 7 changed files with 3,131 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/example-mochawesome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: example-mochawesome
on:
workflow_dispatch:
jobs:
basic-mochawesome:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress tests
uses: cypress-io/github-action@v6
with:
working-directory: examples/mochawesome
- name: Upload mochawesome report
uses: actions/upload-artifact@v4
with:
name: report
path: examples/mochawesome/cypress/reports
1 change: 1 addition & 0 deletions examples/mochawesome/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reports
10 changes: 10 additions & 0 deletions examples/mochawesome/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { defineConfig } = require('cypress')
module.exports = defineConfig({
reporter: 'cypress-mochawesome-reporter',
fixturesFolder: false,
e2e: {
setupNodeEvents(on) {
require('cypress-mochawesome-reporter/plugin')(on)
},
},
})
6 changes: 6 additions & 0 deletions examples/mochawesome/cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
it('works', () => {
expect(42).to.equal(21 + 21)
cy.visit('https://example.cypress.io').then(() => {
expect('hello').to.equal('hello')
})
})
1 change: 1 addition & 0 deletions examples/mochawesome/cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'cypress-mochawesome-reporter/register';
Loading

0 comments on commit 497374a

Please sign in to comment.