Skip to content

Commit 20a2a8c

Browse files
authored
chore: upgrade redux and react-redux packages (#1251)
* chore: upgrade react and react-redux packages Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com> * fixup! chore: upgrade react and react-redux packages * fixup! fixup! chore: upgrade react and react-redux packages * fixup! fixup! fixup! chore: upgrade react and react-redux packages * fixup! fixup! fixup! fixup! chore: upgrade react and react-redux packages * fixup! fixup! fixup! fixup! fixup! chore: upgrade react and react-redux packages * fixup! fixup! fixup! fixup! fixup! fixup! chore: upgrade react and react-redux packages * fix: adding git configuration Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com> * fix: workspace startup * fixup! fix: workspace startup --------- Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
1 parent b3201ef commit 20a2a8c

File tree

399 files changed

+18101
-17313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+18101
-17313
lines changed

.deps/dev.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,19 @@
106106
| [`@types/lodash@4.14.200`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #4131 |
107107
| [`@types/minimist@1.2.4`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10839 |
108108
| [`@types/normalize-package-data@2.4.3`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10792 |
109+
| [`@types/prop-types@15.7.9`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #16176 |
109110
| [`@types/qs@6.9.9`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #13991 |
110111
| [`@types/react-copy-to-clipboard@5.0.7`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
111112
| [`@types/react-dom@18.3.0`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
112113
| [`@types/react-router-dom@5.3.3`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
113114
| [`@types/react-router@5.1.20`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
114115
| [`@types/react-test-renderer@18.3.0`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
115-
| [`@types/redux-mock-store@1.0.5`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
116+
| [`@types/react@18.2.36`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8234 |
117+
| [`@types/redux-logger@3.0.13`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
118+
| [`@types/redux-mock-store@1.0.6`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
116119
| [`@types/request@2.48.12`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
117120
| [`@types/sanitize-html@2.9.3`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
121+
| [`@types/scheduler@0.16.5`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #7582 |
118122
| [`@types/semver@7.5.4`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10842 |
119123
| [`@types/stack-utils@2.0.2`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
120124
| [`@types/webpack@5.28.5`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
@@ -242,6 +246,7 @@
242246
| `cssom@0.3.8` | MIT | clearlydefined |
243247
| `cssom@0.5.0` | MIT | clearlydefined |
244248
| [`cssstyle@2.3.0`](https://github.com/jsdom/cssstyle) | MIT | clearlydefined |
249+
| `csstype@3.1.2` | MIT | #11847 |
245250
| `data-urls@3.0.2` | MIT | clearlydefined |
246251
| `debounce@1.2.1` | MIT | clearlydefined |
247252
| [`debug@4.3.4`](git://github.com/debug-js/debug.git) | MIT | clearlydefined |
@@ -250,6 +255,7 @@
250255
| `decamelize@5.0.1` | MIT | clearlydefined |
251256
| [`decimal.js@10.4.3`](https://github.com/MikeMcl/decimal.js.git) | MIT | clearlydefined |
252257
| [`dedent@1.5.1`](git://github.com/dmnd/dedent.git) | MIT | #14381 |
258+
| [`deep-diff@0.3.8`](git://github.com/flitbit/diff.git) | MIT | clearlydefined |
253259
| [`deep-is@0.1.4`](http://github.com/thlorenz/deep-is.git) | MIT | #2130 |
254260
| `default-browser-id@3.0.0` | MIT | clearlydefined |
255261
| `default-browser@4.0.0` | MIT | clearlydefined |
@@ -610,6 +616,7 @@
610616
| [`pure-rand@6.0.4`](git+https://github.com/dubzzz/pure-rand.git) | MIT | #8423 |
611617
| [`queue-microtask@1.2.3`](git://github.com/feross/queue-microtask.git) | MIT | clearlydefined |
612618
| `quick-lru@5.1.1` | MIT | clearlydefined |
619+
| [`react-is@17.0.2`](https://github.com/facebook/react.git) | MIT | clearlydefined |
613620
| [`react-is@18.2.0`](https://github.com/facebook/react.git) | MIT | clearlydefined |
614621
| [`react-is@18.3.1`](https://github.com/facebook/react.git) | MIT | clearlydefined |
615622
| [`react-shallow-renderer@16.15.0`](https://reactjs.org/) | MIT | clearlydefined |
@@ -620,7 +627,9 @@
620627
| `rechoir@0.8.0` | MIT | clearlydefined |
621628
| `redent@3.0.0` | MIT | clearlydefined |
622629
| `redent@4.0.0` | MIT | clearlydefined |
630+
| [`redux-logger@3.0.6`](git+https://github.com/theaqua/redux-logger.git) | MIT | clearlydefined |
623631
| [`redux-mock-store@1.5.4`](git+https://github.com/arnaudbenard/redux-mock-store.git) | MIT | clearlydefined |
632+
| [`redux@4.2.1`](http://redux.js.org) | MIT | #7046 |
624633
| [`reflect.getprototypeof@1.0.4`](git+https://github.com/es-shims/Reflect.getPrototypeOf.git) | MIT | #13910 |
625634
| [`regexp.prototype.flags@1.5.1`](git://github.com/es-shims/RegExp.prototype.flags.git) | MIT | #8199 |
626635
| [`relateurl@0.2.7`](git://github.com/stevenvachon/relateurl.git) | MIT | clearlydefined |

.deps/prod.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Packages | License | Resolved CQs |
44
| --- | --- | --- |
55
| [`@babel/runtime@7.23.2`](https://github.com/babel/babel.git) | MIT | #10718 |
6-
| [`@babel/runtime@7.24.5`](https://github.com/babel/babel.git) | MIT | #13900 |
76
| [`@codemirror/autocomplete@6.18.1`](https://github.com/codemirror/autocomplete.git) | MIT | clearlydefined |
87
| [`@codemirror/lang-yaml@6.1.1`](git+https://github.com/codemirror/lang-yaml.git) | MIT | clearlydefined |
98
| [`@codemirror/language@6.10.3`](https://github.com/codemirror/language.git) | MIT | clearlydefined |
@@ -52,6 +51,7 @@
5251
| [`@patternfly/react-table@4.113.6`](https://github.com/patternfly/patternfly-react.git) | MIT | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@patternfly/react-table/4.113.6) |
5352
| [`@patternfly/react-tokens@4.94.7`](https://github.com/patternfly/patternfly-react.git) | MIT | clearlydefined |
5453
| [`@pkgjs/parseargs@0.11.0`](git@github.com:pkgjs/parseargs.git) | MIT | #8236 |
54+
| [`@reduxjs/toolkit@2.2.7`](git+https://github.com/reduxjs/redux-toolkit.git) | MIT | #14170 |
5555
| [`@remix-run/router@1.19.1`](https://github.com/remix-run/react-router) | MIT | clearlydefined |
5656
| `@sideway/address@4.1.5` | BSD-3-Clause | #3098 |
5757
| `@sideway/formula@3.0.1` | BSD-3-Clause | clearlydefined |
@@ -62,21 +62,17 @@
6262
| [`@types/estree@1.0.4`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8266 |
6363
| [`@types/estree@1.0.6`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8266 |
6464
| [`@types/hast@3.0.4`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
65-
| [`@types/hoist-non-react-statics@3.3.5`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
6665
| [`@types/js-yaml@4.0.8`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
6766
| [`@types/mdast@4.0.4`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
6867
| [`@types/ms@0.7.34`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10811 |
6968
| [`@types/node-fetch@2.6.9`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #11004 |
7069
| [`@types/node@20.8.10`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10804 |
7170
| [`@types/node@22.8.2`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
72-
| [`@types/prop-types@15.7.9`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #16176 |
73-
| [`@types/react-redux@7.1.33`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10970 |
74-
| [`@types/react@18.2.36`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8234 |
7571
| [`@types/request@2.48.11`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
76-
| [`@types/scheduler@0.16.5`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #7582 |
7772
| [`@types/tough-cookie@4.0.4`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10798 |
7873
| [`@types/unist@2.0.11`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
7974
| [`@types/unist@3.0.3`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
75+
| [`@types/use-sync-external-store@0.0.3`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
8076
| [`@types/ws@8.5.8`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #6016 |
8177
| [`@ungap/structured-clone@1.2.0`](git+https://github.com/ungap/structured-clone.git) | ISC | clearlydefined |
8278
| [`abbrev@2.0.0`](https://github.com/npm/abbrev-js.git) | ISC | clearlydefined |
@@ -153,9 +149,8 @@
153149
| [`create-ecdh@4.0.4`](https://github.com/crypto-browserify/createECDH.git) | MIT | clearlydefined |
154150
| [`create-hash@1.2.0`](git@github.com:crypto-browserify/createHash.git) | MIT | clearlydefined |
155151
| [`create-hmac@1.1.7`](https://github.com/crypto-browserify/createHmac.git) | MIT | clearlydefined |
156-
| [`cross-spawn@7.0.3`](git@github.com:moxystudio/node-cross-spawn.git) | MIT | clearlydefined |
152+
| [`cross-spawn@7.0.3`](git@github.com:moxystudio/node-cross-spawn.git) | MIT | #17146 |
157153
| [`crypto-browserify@3.12.0`](git://github.com/crypto-browserify/crypto-browserify.git) | MIT | #1033 |
158-
| `csstype@3.1.2` | MIT | #11847 |
159154
| [`dashdash@1.14.1`](git://github.com/trentm/node-dashdash.git) | MIT | #14596 |
160155
| `date-fns@3.6.0` | MIT | #14000 |
161156
| [`dateformat@4.6.3`](https://github.com/felixge/node-dateformat.git) | MIT | clearlydefined |
@@ -250,7 +245,6 @@
250245
| [`help-me@4.2.0`](https://github.com/mcollina/help-me.git) | MIT | clearlydefined |
251246
| `history@4.10.1` | MIT | clearlydefined |
252247
| [`hmac-drbg@1.0.1`](git+ssh://git@github.com/indutny/hmac-drbg.git) | MIT | clearlydefined |
253-
| [`hoist-non-react-statics@3.3.2`](git://github.com/mridgway/hoist-non-react-statics.git) | BSD-3-Clause | clearlydefined |
254248
| `html-url-attributes@3.0.1` | MIT | clearlydefined |
255249
| [`htmlparser2@8.0.2`](git://github.com/fb55/htmlparser2.git) | MIT | clearlydefined |
256250
| `http-cache-semantics@4.1.1` | BSD-2-Clause | clearlydefined |
@@ -261,6 +255,7 @@
261255
| `https@1.0.0` | ISC | clearlydefined |
262256
| [`iconv-lite@0.6.3`](git://github.com/ashtuchkin/iconv-lite.git) | MIT | clearlydefined |
263257
| [`ieee754@1.2.1`](git://github.com/feross/ieee754.git) | BSD-3-Clause | clearlydefined |
258+
| [`immer@10.1.1`](https://github.com/immerjs/immer.git) | MIT | clearlydefined |
264259
| [`imurmurhash@0.1.4`](https://github.com/jensyt/imurmurhash-js) | MIT | clearlydefined |
265260
| `indent-string@4.0.0` | MIT | clearlydefined |
266261
| [`inflight@1.0.6`](https://github.com/npm/inflight.git) | ISC | clearlydefined |
@@ -434,10 +429,9 @@
434429
| [`react-fast-compare@3.2.2`](https://github.com/FormidableLabs/react-fast-compare) | MIT | clearlydefined |
435430
| [`react-helmet@6.1.0`](https://github.com/nfl/react-helmet) | MIT | clearlydefined |
436431
| [`react-is@16.13.1`](https://github.com/facebook/react.git) | MIT | clearlydefined |
437-
| [`react-is@17.0.2`](https://github.com/facebook/react.git) | MIT | clearlydefined |
438432
| `react-markdown@9.0.1` | MIT | clearlydefined |
439433
| [`react-pluralize@1.6.3`](https://github.com/tsmith123/react-pluralize) | MIT | clearlydefined |
440-
| [`react-redux@7.2.9`](https://github.com/reduxjs/react-redux) | MIT | #2978 |
434+
| [`react-redux@9.1.2`](https://github.com/reduxjs/react-redux) | MIT | #13913 |
441435
| [`react-router-dom@6.26.1`](https://github.com/remix-run/react-router) | MIT | #15860 |
442436
| [`react-router@6.26.1`](https://github.com/remix-run/react-router) | MIT | clearlydefined |
443437
| [`react-side-effect@2.1.2`](https://github.com/gaearon/react-side-effect.git) | MIT | clearlydefined |
@@ -447,8 +441,8 @@
447441
| [`readable-stream@4.4.2`](git://github.com/nodejs/readable-stream) | MIT | #8426 |
448442
| [`real-require@0.2.0`](git+https://github.com/pinojs/real-require.git) | MIT | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/real-require/0.2.0) |
449443
| [`reconnecting-websocket@4.4.0`](git+https://github.com/pladaria/reconnecting-websocket.git) | MIT | #940 |
450-
| [`redux-thunk@2.4.2`](https://github.com/reduxjs/redux-thunk) | MIT | clearlydefined |
451-
| [`redux@4.2.1`](http://redux.js.org) | MIT | #7046 |
444+
| [`redux-thunk@3.1.0`](https://github.com/reduxjs/redux-thunk) | MIT | clearlydefined |
445+
| [`redux@5.0.1`](http://redux.js.org) | MIT | clearlydefined |
452446
| [`reflect-metadata@0.1.13`](https://github.com/rbuckton/reflect-metadata.git) | Apache-2.0 | clearlydefined |
453447
| [`reflect-metadata@0.1.14`](https://github.com/rbuckton/reflect-metadata.git) | Apache-2.0 | clearlydefined |
454448
| [`reflect-metadata@0.2.2`](https://github.com/rbuckton/reflect-metadata.git) | Apache-2.0 | clearlydefined |
@@ -458,7 +452,7 @@
458452
| [`request@2.88.2`](https://github.com/request/request.git) | Apache-2.0 | #997 |
459453
| `require-from-string@2.0.2` | MIT | clearlydefined |
460454
| [`requires-port@1.0.0`](https://github.com/unshiftio/requires-port) | MIT | clearlydefined |
461-
| [`reselect@4.1.8`](https://github.com/reduxjs/reselect.git) | MIT | clearlydefined |
455+
| [`reselect@5.1.1`](https://github.com/reduxjs/reselect.git) | MIT | clearlydefined |
462456
| `resolve-pathname@3.0.0` | MIT | clearlydefined |
463457
| [`ret@0.5.0`](git://github.com/fent/ret.js.git) | MIT | clearlydefined |
464458
| [`retry@0.12.0`](git://github.com/tim-kos/node-retry.git) | MIT | clearlydefined |
@@ -543,6 +537,7 @@
543537
| [`universalify@2.0.1`](git+https://github.com/RyanZim/universalify.git) | MIT | clearlydefined |
544538
| [`uri-js@4.4.1`](http://github.com/garycourt/uri-js) | BSD-2-Clause | #1086 |
545539
| [`url-parse@1.5.10`](https://github.com/unshiftio/url-parse.git) | MIT | clearlydefined |
540+
| [`use-sync-external-store@1.2.2`](https://github.com/facebook/react.git) | MIT | clearlydefined |
546541
| [`util-deprecate@1.0.2`](git://github.com/TooTallNate/util-deprecate.git) | MIT | #5885 |
547542
| [`uuid@3.4.0`](https://github.com/uuidjs/uuid.git) | MIT | #2733 |
548543
| [`uuid@7.0.3`](https://github.com/uuidjs/uuid.git) | MIT | #57 |

packages/dashboard-backend/jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ module.exports = {
4141
setupFilesAfterEnv: ['./jest.setup.js'],
4242
coverageThreshold: {
4343
global: {
44-
statements: 81,
45-
branches: 78,
46-
functions: 78,
47-
lines: 81,
44+
statements: 86,
45+
branches: 80,
46+
functions: 86,
47+
lines: 86,
4848
},
4949
},
5050
};

packages/dashboard-frontend/jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ module.exports = {
5050
],
5151
coverageThreshold: {
5252
global: {
53-
statements: 90,
54-
branches: 86,
55-
functions: 85,
56-
lines: 90,
53+
statements: 92,
54+
branches: 88,
55+
functions: 87,
56+
lines: 92,
5757
},
5858
},
5959
};

packages/dashboard-frontend/jest.setup.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ jest.mock('react-markdown', () => {
4444
return React.createElement('a', null, props.children, props.content);
4545
});
4646
});
47+
48+
jest.mock('gravatar-url', () => {
49+
return function () {
50+
return 'avatar/source/location';
51+
};
52+
});

packages/dashboard-frontend/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@patternfly/react-core": "^4.276.11",
4141
"@patternfly/react-icons": "^4.93.7",
4242
"@patternfly/react-table": "^4.113.3",
43+
"@reduxjs/toolkit": "^2.2.7",
4344
"axios": "^1.7.0",
4445
"buffer": "^6.0.3",
4546
"crypto-browserify": "^3.12.0",
@@ -61,14 +62,12 @@
6162
"react-helmet": "^6.1.0",
6263
"react-markdown": "^9.0.1",
6364
"react-pluralize": "^1.6.3",
64-
"react-redux": "^7.2.9",
65+
"react-redux": "^9.1.2",
6566
"react-router-dom": "^6.26.1",
6667
"react-tooltip": "^4.5.1",
6768
"reconnecting-websocket": "^4.4.0",
68-
"redux": "^4.2.1",
69-
"redux-thunk": "^2.4.2",
69+
"redux": "^5.0.1",
7070
"reflect-metadata": "^0.1.13",
71-
"reselect": "^4.1.8",
7271
"sanitize-html": "^2.11.0"
7372
},
7473
"devDependencies": {
@@ -89,7 +88,8 @@
8988
"@types/react-dom": "^18.3.0",
9089
"@types/react-router-dom": "^5.3.3",
9190
"@types/react-test-renderer": "^18.3.0",
92-
"@types/redux-mock-store": "^1.0.2",
91+
"@types/redux-logger": "^3.0.13",
92+
"@types/redux-mock-store": "^1.0.6",
9393
"@types/sanitize-html": "^2.9.0",
9494
"@types/webpack": "^5.28.5",
9595
"@typescript-eslint/eslint-plugin": "^6.4.0",
@@ -118,6 +118,7 @@
118118
"mini-css-extract-plugin": "^2.7.6",
119119
"prettier": "^3.2.5",
120120
"react-test-renderer": "^18.3.1",
121+
"redux-logger": "^3.0.6",
121122
"redux-mock-store": "^1.5.4",
122123
"source-map-loader": "^4.0.1",
123124
"speed-measure-webpack-plugin": "^1.5.0",

packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/__tests__/index.spec.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@ import { fireEvent, render, screen } from '@testing-library/react';
1515
import React from 'react';
1616
import { Provider } from 'react-redux';
1717
import renderer from 'react-test-renderer';
18-
import { Action, Store } from 'redux';
18+
import { Store } from 'redux';
1919

20+
import { AboutMenu } from '@/Layout/Header/Tools/AboutMenu';
2021
import { BRANDING_DEFAULT, BrandingData } from '@/services/bootstrap/branding.constant';
21-
import { che } from '@/services/models';
2222
import { AppThunk } from '@/store';
23-
import { FakeStoreBuilder } from '@/store/__mocks__/storeBuilder';
23+
import { MockStoreBuilder } from '@/store/__mocks__/mockStore';
2424
import { selectBranding } from '@/store/Branding/selectors';
25-
import * as InfrastructureNamespacesStore from '@/store/InfrastructureNamespaces';
26-
27-
import { AboutMenu } from '..';
25+
import { infrastructureNamespacesActionCreators } from '@/store/InfrastructureNamespaces';
2826

2927
jest.mock('gravatar-url', () => {
3028
return function () {
@@ -35,12 +33,10 @@ jest.mock('gravatar-url', () => {
3533
jest.mock('@/store/InfrastructureNamespaces', () => {
3634
return {
3735
actionCreators: {
38-
requestNamespaces:
39-
(): AppThunk<Action, Promise<che.KubernetesNamespace[]>> =>
40-
async (): Promise<che.KubernetesNamespace[]> => {
41-
return Promise.resolve([]);
42-
},
43-
} as InfrastructureNamespacesStore.ActionCreators,
36+
requestNamespaces: (): AppThunk => async (): Promise<void> => {
37+
return Promise.resolve();
38+
},
39+
} as typeof infrastructureNamespacesActionCreators,
4440
};
4541
});
4642

@@ -131,7 +127,7 @@ describe('About Menu', () => {
131127
});
132128

133129
function createStore(cheCliTool: string, name: string, email: string): Store {
134-
return new FakeStoreBuilder()
130+
return new MockStoreBuilder()
135131
.withUserProfile({
136132
username: name,
137133
email,

packages/dashboard-frontend/src/Layout/Header/Tools/ApplicationsMenu/__tests__/index.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Provider } from 'react-redux';
1616
import renderer from 'react-test-renderer';
1717
import { Store } from 'redux';
1818

19-
import { FakeStoreBuilder } from '@/store/__mocks__/storeBuilder';
19+
import { MockStoreBuilder } from '@/store/__mocks__/mockStore';
2020
import { selectApplications } from '@/store/ClusterInfo/selectors';
2121

2222
import { ApplicationsMenu } from '..';
@@ -89,7 +89,7 @@ describe('About Menu', () => {
8989
});
9090

9191
function createStore(): Store {
92-
return new FakeStoreBuilder()
92+
return new MockStoreBuilder()
9393
.withClusterInfo({
9494
applications: [
9595
{

packages/dashboard-frontend/src/Layout/Header/Tools/UserMenu/__tests__/index.spec.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,22 @@ import { createHashHistory } from 'history';
1616
import React from 'react';
1717
import { Provider } from 'react-redux';
1818
import renderer from 'react-test-renderer';
19-
import { Action, Store } from 'redux';
19+
import { Store } from 'redux';
2020

21+
import UserMenu from '@/Layout/Header/Tools/UserMenu';
2122
import { BRANDING_DEFAULT, BrandingData } from '@/services/bootstrap/branding.constant';
22-
import { che } from '@/services/models';
2323
import { AppThunk } from '@/store';
24-
import { FakeStoreBuilder } from '@/store/__mocks__/storeBuilder';
24+
import { MockStoreBuilder } from '@/store/__mocks__/mockStore';
2525
import { selectBranding } from '@/store/Branding/selectors';
26-
import * as InfrastructureNamespacesStore from '@/store/InfrastructureNamespaces';
27-
28-
import UserMenu from '..';
26+
import { infrastructureNamespacesActionCreators } from '@/store/InfrastructureNamespaces';
2927

3028
jest.mock('@/store/InfrastructureNamespaces', () => {
3129
return {
3230
actionCreators: {
33-
requestNamespaces:
34-
(): AppThunk<Action, Promise<che.KubernetesNamespace[]>> =>
35-
async (): Promise<che.KubernetesNamespace[]> => {
36-
return Promise.resolve([]);
37-
},
38-
} as InfrastructureNamespacesStore.ActionCreators,
31+
requestNamespaces: (): AppThunk => async () => {
32+
return Promise.resolve();
33+
},
34+
} as typeof infrastructureNamespacesActionCreators,
3935
};
4036
});
4137

@@ -87,7 +83,7 @@ describe('User Menu', () => {
8783
});
8884

8985
function createStore(name: string, email: string): Store {
90-
return new FakeStoreBuilder()
86+
return new MockStoreBuilder()
9187
.withUserProfile({
9288
username: name,
9389
email,

0 commit comments

Comments
 (0)