mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-31 09:11:19 -07:00
Adding Cypress for e2e testing (#85)
* using the higher-level react-testing-library, and regenerating snapshot - renders real DOM elements * Basic e2e testing with Cypress, following the guide here: https://www.gatsbyjs.com/docs/how-to/testing/end-to-end-testing/ ; needed to install cypress-local to avoid jest-cypress collision * Adding accessibility testing support and basic a11y tests * adding failure logging * Adding nightly test run * Fix misc stuff from lighthouse (#81) * Removing local-cypress, relying instead on a combination of type reference and eslint-plugin-cypress; adding cypress to jest ignore paths to avoid conflict - `npm test` is now jest-only, use `npm run test:e2e` to run cypress tests * updating comment to clarify timezone
This commit is contained in:
parent
7e6144c96f
commit
426f596c7a
16 changed files with 2584 additions and 890 deletions
34
client/cypress/plugins/index.js
Normal file
34
client/cypress/plugins/index.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
// / <reference types="cypress" />
|
||||
// ***********************************************************
|
||||
// This example plugins/index.js can be used to load plugins
|
||||
//
|
||||
// You can change the location of this file or turn off loading
|
||||
// the plugins file with the 'pluginsFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/plugins-guide
|
||||
// ***********************************************************
|
||||
|
||||
// This function is called when a project is opened or re-opened (e.g. due to
|
||||
// the project's config changing)
|
||||
|
||||
/**
|
||||
* @type {Cypress.PluginConfig}
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = (on, config) => {
|
||||
// `on` is used to hook into various events Cypress emits
|
||||
// `config` is the resolved Cypress config
|
||||
on('task', {
|
||||
log(message) {
|
||||
console.log(message);
|
||||
|
||||
return null;
|
||||
},
|
||||
table(message) {
|
||||
console.table(message);
|
||||
|
||||
return null;
|
||||
},
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue