diff --git a/package-lock.json b/package-lock.json index eafb5f0a..4fc5ad22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,22 +23,13 @@ "@openedx/frontend-plugin-framework": "^1.2.0", "@openedx/frontend-slot-footer": "^1.0.2", "@openedx/paragon": "^22.2.2", - "@redux-beacon/segment": "^1.1.0", "@redux-devtools/extension": "3.3.0", "@reduxjs/toolkit": "^2.0.0", - "@testing-library/user-event": "^13.5.0", "classnames": "^2.3.1", "core-js": "3.38.1", - "dompurify": "^3.0.0", - "email-prop-type": "^3.0.1", - "file-saver": "^2.0.5", "filesize": "^10.0.0", "font-awesome": "4.7.0", "history": "5.3.0", - "html-react-parser": "^1.3.0", - "jest": "^29.7.0", - "jest-environment-jsdom": "29.7.0", - "jest-when": "^3.6.0", "lodash": "^4.17.21", "moment": "^2.29.4", "prop-types": "15.8.1", @@ -47,20 +38,17 @@ "react-dom": "^17.0.2", "react-helmet": "^6.1.0", "react-intl": "6.8.7", - "react-pdf": "^7.0.0", "react-redux": "^7.2.4", "react-router-dom": "6.27.0", "react-share": "^4.4.0", "react-zendesk": "^0.1.13", "redux": "4.2.1", - "redux-beacon": "^2.1.0", "redux-logger": "3.0.6", "redux-thunk": "2.4.2", "regenerator-runtime": "^0.14.0", "reselect": "^4.0.0", "universal-cookie": "^4.0.4", - "util": "^0.12.4", - "whatwg-fetch": "^3.6.2" + "util": "^0.12.4" }, "devDependencies": { "@edx/reactifex": "^2.1.1", @@ -70,7 +58,10 @@ "copy-webpack-plugin": "^12.0.0", "husky": "^9.0.0", "identity-obj-proxy": "^3.0.0", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", "jest-expect-message": "^1.1.3", + "jest-when": "^3.6.0", "react-dev-utils": "^12.0.0", "react-test-renderer": "^17.0.2", "redux-mock-store": "^1.5.4", @@ -4260,17 +4251,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@redux-beacon/segment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@redux-beacon/segment/-/segment-1.1.0.tgz", - "integrity": "sha512-NLRoP3Jfx5z99YX6TFFznwXIMjqjD6/qdMZIKFRgGO8NtMWrCruA8EeQYPJZUBnuOjw6RtOA1UdjbqyRmdhc/Q==", - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "redux-beacon": "2.x" - } - }, "node_modules/@redux-devtools/extension": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/@redux-devtools/extension/-/extension-3.3.0.tgz", @@ -4875,25 +4855,6 @@ "url": "https://github.com/sponsors/gregberge" } }, - "node_modules/@testing-library/dom": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", - "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.3.0", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/@testing-library/jest-dom": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", @@ -5014,21 +4975,6 @@ "deep-equal": "^2.0.5" } }, - "node_modules/@testing-library/user-event": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.5.0.tgz", - "integrity": "sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==", - "dependencies": { - "@babel/runtime": "^7.12.5" - }, - "engines": { - "node": ">=10", - "npm": ">=6" - }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" - } - }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -7399,14 +7345,6 @@ "node": ">=0.10.0" } }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "engines": { - "node": ">=6" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -8731,12 +8669,6 @@ "url": "https://github.com/fb55/domhandler?sponsor=1" } }, - "node_modules/dompurify": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz", - "integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==", - "license": "(MPL-2.0 OR Apache-2.0)" - }, "node_modules/domutils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", @@ -10302,11 +10234,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/file-saver": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", - "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" - }, "node_modules/file-selector": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz", @@ -11368,15 +11295,6 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/html-dom-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/html-dom-parser/-/html-dom-parser-1.2.0.tgz", - "integrity": "sha512-2HIpFMvvffsXHFUFjso0M9LqM+1Lm22BF+Df2ba+7QHJXjk63pWChEnI6YG27eaWqUdfnh5/Vy+OXrNTtepRsg==", - "dependencies": { - "domhandler": "4.3.1", - "htmlparser2": "7.2.0" - } - }, "node_modules/html-encoding-sniffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", @@ -11436,20 +11354,6 @@ "node": ">= 12" } }, - "node_modules/html-react-parser": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-1.4.14.tgz", - "integrity": "sha512-pxhNWGie8Y+DGDpSh8cTa0k3g8PsDcwlfolA+XxYo1AGDeB6e2rdlyv4ptU9bOTiZ2i3fID+6kyqs86MN0FYZQ==", - "dependencies": { - "domhandler": "4.3.1", - "html-dom-parser": "1.2.0", - "react-property": "2.0.0", - "style-to-js": "1.1.1" - }, - "peerDependencies": { - "react": "0.14 || 15 || 16 || 17 || 18" - } - }, "node_modules/html-webpack-plugin": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz", @@ -11481,35 +11385,6 @@ } } }, - "node_modules/htmlparser2": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", - "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.2", - "domutils": "^2.8.0", - "entities": "^3.0.1" - } - }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -11870,11 +11745,6 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, - "node_modules/inline-style-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", - "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" - }, "node_modules/inquirer": { "version": "8.2.6", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", @@ -13537,6 +13407,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/jest-when/-/jest-when-3.6.0.tgz", "integrity": "sha512-+cZWTy0ekAJo7M9Om0Scdor1jm3wDiYJWmXE8U22UVnkH54YCXAuaqz3P+up/FdtOg8g4wHOxV7Thd7nKhT6Dg==", + "dev": true, "peerDependencies": { "jest": ">= 25" } @@ -14171,14 +14042,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-cancellable-promise": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.2.tgz", - "integrity": "sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww==", - "funding": { - "url": "https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1" - } - }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -14204,14 +14067,6 @@ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" }, - "node_modules/make-event-props": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/make-event-props/-/make-event-props-1.6.2.tgz", - "integrity": "sha512-iDwf7mA03WPiR8QxvcVHmVWEPfMY1RZXerDVNCRYW7dUr2ppH3J58Rwb39/WG39yTZdRSxr3x+2v22tvI0VEvA==", - "funding": { - "url": "https://github.com/wojtekmaj/make-event-props?sponsor=1" - } - }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -14388,22 +14243,6 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, - "node_modules/merge-refs": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.3.0.tgz", - "integrity": "sha512-nqXPXbso+1dcKDpPCXvwZyJILz+vSLqGGOnDrYHQYE+B8n9JTCekVLC65AfCpR4ggVyA/45Y0iR9LDyS2iI+zA==", - "funding": { - "url": "https://github.com/wojtekmaj/merge-refs?sponsor=1" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -17922,27 +17761,6 @@ "node": ">=8" } }, - "node_modules/path2d-polyfill": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz", - "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA==", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pdfjs-dist": { - "version": "3.11.174", - "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.11.174.tgz", - "integrity": "sha512-TdTZPf1trZ8/UFu5Cx/GXB7GZM30LT+wWUNfsi6Bq8ePLnb+woNKtDymI2mxZYBpMbonNFqKmiz684DIfnd8dA==", - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "canvas": "^2.11.2", - "path2d-polyfill": "^2.0.1" - } - }, "node_modules/picocolors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", @@ -19690,35 +19508,6 @@ "react-dom": ">=16.3.0" } }, - "node_modules/react-pdf": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.7.3.tgz", - "integrity": "sha512-a2VfDl8hiGjugpqezBTUzJHYLNB7IS7a2t7GD52xMI9xHg8LdVaTMsnM9ZlNmKadnStT/tvX5IfV0yLn+JvYmw==", - "dependencies": { - "clsx": "^2.0.0", - "dequal": "^2.0.3", - "make-cancellable-promise": "^1.3.1", - "make-event-props": "^1.6.0", - "merge-refs": "^1.2.1", - "pdfjs-dist": "3.11.174", - "prop-types": "^15.6.2", - "tiny-invariant": "^1.0.0", - "warning": "^4.0.0" - }, - "funding": { - "url": "https://github.com/wojtekmaj/react-pdf?sponsor=1" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/react-popper": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.3.0.tgz", @@ -19733,11 +19522,6 @@ "react-dom": "^16.8.0 || ^17 || ^18" } }, - "node_modules/react-property": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/react-property/-/react-property-2.0.0.tgz", - "integrity": "sha512-kzmNjIgU32mO4mmH5+iUyrqlpFQhF8K2k7eZ4fdLSOPFrD1XgEuSBv9LDEgxRXTMBqMd8ppT0x6TIzqE5pdGdw==" - }, "node_modules/react-proptype-conditional-require": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/react-proptype-conditional-require/-/react-proptype-conditional-require-1.0.4.tgz", @@ -20242,22 +20026,6 @@ "@babel/runtime": "^7.9.2" } }, - "node_modules/redux-beacon": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/redux-beacon/-/redux-beacon-2.1.0.tgz", - "integrity": "sha512-KMbopAM7YLnQdospn5ClG3o8c4uhYkLBDEWSmxNbvQb4MGAJJh3sbbPKoEB00qU5rTXbwKuaaqZlWdgrY1Twxw==", - "dependencies": { - "array-flatten": "2.1.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/redux-beacon/node_modules/array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha512-Ylfqm/V1V/VKGazsJeRDZ31wV9gdNeK3ZsvwbYBAVSNgH8o8CMLfdx/ofn9pnMVsvTMfvC3yfcBYzGpD1vxnlw==" - }, "node_modules/redux-logger": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", @@ -22036,22 +21804,6 @@ "webpack": "^5.0.0" } }, - "node_modules/style-to-js": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.1.tgz", - "integrity": "sha512-RJ18Z9t2B02sYhZtfWKQq5uplVctgvjTfLWT7+Eb1zjUjIrWzX5SdlkwLGQozrqarTmEzJJ/YmdNJCUNI47elg==", - "dependencies": { - "style-to-object": "0.3.0" - } - }, - "node_modules/style-to-object": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", - "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", - "dependencies": { - "inline-style-parser": "0.1.1" - } - }, "node_modules/stylehacks": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.1.1.tgz", @@ -23788,11 +23540,6 @@ "node": ">=0.10.0" } }, - "node_modules/whatwg-fetch": { - "version": "3.6.20", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", - "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==" - }, "node_modules/whatwg-mimetype": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", diff --git a/package.json b/package.json index eca8e1db..0979f2b7 100755 --- a/package.json +++ b/package.json @@ -40,22 +40,13 @@ "@openedx/frontend-plugin-framework": "^1.2.0", "@openedx/frontend-slot-footer": "^1.0.2", "@openedx/paragon": "^22.2.2", - "@redux-beacon/segment": "^1.1.0", "@redux-devtools/extension": "3.3.0", "@reduxjs/toolkit": "^2.0.0", - "@testing-library/user-event": "^13.5.0", "classnames": "^2.3.1", "core-js": "3.38.1", - "dompurify": "^3.0.0", - "email-prop-type": "^3.0.1", - "file-saver": "^2.0.5", "filesize": "^10.0.0", "font-awesome": "4.7.0", "history": "5.3.0", - "html-react-parser": "^1.3.0", - "jest": "^29.7.0", - "jest-environment-jsdom": "29.7.0", - "jest-when": "^3.6.0", "lodash": "^4.17.21", "moment": "^2.29.4", "prop-types": "15.8.1", @@ -64,20 +55,17 @@ "react-dom": "^17.0.2", "react-helmet": "^6.1.0", "react-intl": "6.8.7", - "react-pdf": "^7.0.0", "react-redux": "^7.2.4", "react-router-dom": "6.27.0", "react-share": "^4.4.0", "react-zendesk": "^0.1.13", "redux": "4.2.1", - "redux-beacon": "^2.1.0", "redux-logger": "3.0.6", "redux-thunk": "2.4.2", "regenerator-runtime": "^0.14.0", "reselect": "^4.0.0", "universal-cookie": "^4.0.4", - "util": "^0.12.4", - "whatwg-fetch": "^3.6.2" + "util": "^0.12.4" }, "devDependencies": { "@edx/reactifex": "^2.1.1", @@ -87,7 +75,10 @@ "copy-webpack-plugin": "^12.0.0", "husky": "^9.0.0", "identity-obj-proxy": "^3.0.0", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", "jest-expect-message": "^1.1.3", + "jest-when": "^3.6.0", "react-dev-utils": "^12.0.0", "react-test-renderer": "^17.0.2", "redux-mock-store": "^1.5.4", diff --git a/src/test/app.test.jsx b/src/test/app.test.jsx index cb7f66cf..f3380a2b 100644 --- a/src/test/app.test.jsx +++ b/src/test/app.test.jsx @@ -9,7 +9,6 @@ import { within, prettyDOM, } from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; import { initialize, mergeConfig,