Skip to content

Commit

Permalink
Upgrade to version of cypress that works & use js config file
Browse files Browse the repository at this point in the history
See issues linked in PR for details
  • Loading branch information
louise-davies committed Nov 3, 2023
1 parent 04e4eb3 commit 13a2f26
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 86 deletions.
80 changes: 45 additions & 35 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { defineConfig } = require('cypress');

module.exports = defineConfig({
chromeWebSecurity: false,
video: false,
retries: {
runMode: 3,
openMode: 0,
},
e2e: {
setupNodeEvents(on) {
// https://github.com/bahmutov/cypress-failed-log
require('cypress-failed-log/on')(on);
},
baseUrl: 'http://127.0.0.1:3000',
},
});
18 changes: 0 additions & 18 deletions cypress.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"chart.js": "4.3.0",
"chartjs-plugin-zoom": "2.0.0",
"cross-env": "7.0.3",
"cypress": "12.0.2",
"cypress": "12.17.3",
"cypress-failed-log": "2.10.0",
"eslint": "8.44.0",
"eslint-config-prettier": "8.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function domElementGetter(): HTMLElement {
const reactLifecycles = singleSpaReact({
React,
ReactDOMClient,
rootComponent: () => document.getElementById(pluginName) ? <App /> : null,
rootComponent: () => (document.getElementById(pluginName) ? <App /> : null),
domElementGetter,
errorBoundary: (error) => {
log.error(`${pluginName} failed with error: ${error}`);
Expand Down
Loading

0 comments on commit 13a2f26

Please sign in to comment.