Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
feat: add e2e test coverage (#1015)
Browse files Browse the repository at this point in the history
Co-authored-by: Ismail Tlemcani <ismail.tlemcani@gmail.com>
  • Loading branch information
Ismailtlem and Ismail Tlemcani committed Apr 21, 2022
1 parent df8e4ab commit c5b160e
Show file tree
Hide file tree
Showing 7 changed files with 6,374 additions and 134 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ jobs:
wait-on: 'http://localhost:3000, http://localhost:5000/graphql'
config: baseUrl=http://localhost:3000
browser: ${{ matrix.browsers }}

- name: Print Cypress coverage report
run: npm run cypress:coverage:report
2 changes: 1 addition & 1 deletion client/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var config = {
presets: ['next/babel'],
plugins: [],
plugins: ['istanbul'],
};

if (process.env.NODE_ENV === 'development' && process.env.CODESEE === 'true') {
Expand Down
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"@testing-library/dom": "8.13.0",
"@testing-library/react": "12.1.5",
"prettier": "2.6.2",
"typescript": "4.6.3"
"typescript": "4.6.3",
"babel-plugin-istanbul": "6.1.1"
},
"license": "MIT"
}
1 change: 1 addition & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ module.exports = (on, config) => {
on('before:run', () => {
execSync('npm run db:reset');
});
require('@cypress/code-coverage/task')(on, config);
return config;
};
2 changes: 1 addition & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

// Import commands.js using ES2015 syntax:
import './commands';

import '@cypress/code-coverage/support';
// Alternatively you can use CommonJS syntax:
// require('./commands')
Loading

0 comments on commit c5b160e

Please sign in to comment.