mirror of
https://github.com/mudita/mudita-center.git
synced 2025-12-23 22:28:03 -05:00
[CP-2196] Force issues resolved (#1429)
Co-authored-by: Łukasz Kowalczyk <freelancer.lukasz.kowalczyk@gmail.com>
This commit is contained in:
committed by
patryk-sierzega
parent
eb1b8ed1c2
commit
1277dfc6f3
2
.github/workflows/validate.yml
vendored
2
.github/workflows/validate.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [18.15.0]
|
node-version: [18.16.1]
|
||||||
|
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -18,8 +18,8 @@
|
|||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18.15.0",
|
"node": "18.16.1",
|
||||||
"npm": "9.5.0"
|
"npm": "9.5.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@aashutoshrathi/word-wrap": {
|
"node_modules/@aashutoshrathi/word-wrap": {
|
||||||
|
|||||||
@@ -65,8 +65,8 @@
|
|||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18.15.0",
|
"node": "18.16.1",
|
||||||
"npm": "9.5.0"
|
"npm": "9.5.1"
|
||||||
},
|
},
|
||||||
"dependencies": {}
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,4 @@
|
|||||||
"branches": 67.71
|
"branches": 67.71
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
75579
packages/app/package-lock.json
generated
75579
packages/app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -139,7 +139,7 @@
|
|||||||
"@reduxjs/toolkit": "^1.9.6",
|
"@reduxjs/toolkit": "^1.9.6",
|
||||||
"@rematch/core": "^1.4.0",
|
"@rematch/core": "^1.4.0",
|
||||||
"@rematch/select": "^2.0.5",
|
"@rematch/select": "^2.0.5",
|
||||||
"@seznam/compose-react-refs": "^1.0.4",
|
"@seznam/compose-react-refs": "1.0.4",
|
||||||
"@storybook/addon-actions": "~6.5.12",
|
"@storybook/addon-actions": "~6.5.12",
|
||||||
"@storybook/addon-knobs": "~6.4.0",
|
"@storybook/addon-knobs": "~6.4.0",
|
||||||
"@storybook/addon-links": "~6.5.12",
|
"@storybook/addon-links": "~6.5.12",
|
||||||
@@ -151,10 +151,8 @@
|
|||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@testing-library/react": "^12.1.3",
|
"@testing-library/react": "^12.1.3",
|
||||||
"@testing-library/react-hooks": "^7.0.2",
|
"@testing-library/react-hooks": "^7.0.2",
|
||||||
"@testing-library/user-event": "^14.3.0",
|
|
||||||
"@types/archiver": "^5.3.1",
|
"@types/archiver": "^5.3.1",
|
||||||
"@types/chai": "^4.3.3",
|
"@types/chai": "^4.3.3",
|
||||||
"@types/crypto-js": "^4.1.1",
|
|
||||||
"@types/elasticlunr": "^0.9.5",
|
"@types/elasticlunr": "^0.9.5",
|
||||||
"@types/electron-devtools-installer": "^2.2.2",
|
"@types/electron-devtools-installer": "^2.2.2",
|
||||||
"@types/electron-localshortcut": "^3.1.0",
|
"@types/electron-localshortcut": "^3.1.0",
|
||||||
@@ -162,6 +160,7 @@
|
|||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^26.0.24",
|
||||||
"@types/lodash": "^4.14.182",
|
"@types/lodash": "^4.14.182",
|
||||||
"@types/mock-fs": "^4.13.1",
|
"@types/mock-fs": "^4.13.1",
|
||||||
|
"@types/mime-types": "2.1.2",
|
||||||
"@types/node": "^18.7.18",
|
"@types/node": "^18.7.18",
|
||||||
"@types/node-fetch": "^3.0.3",
|
"@types/node-fetch": "^3.0.3",
|
||||||
"@types/quoted-printable": "^1.0.0",
|
"@types/quoted-printable": "^1.0.0",
|
||||||
@@ -174,7 +173,6 @@
|
|||||||
"@types/react-router": "^5.1.18",
|
"@types/react-router": "^5.1.18",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"@types/react-router-redux": "^5.0.21",
|
"@types/react-router-redux": "^5.0.21",
|
||||||
"@types/react-test-renderer": "^18.0.0",
|
|
||||||
"@types/react-virtualized": "^9.21.21",
|
"@types/react-virtualized": "^9.21.21",
|
||||||
"@types/redux-logger": "^3.0.9",
|
"@types/redux-logger": "^3.0.9",
|
||||||
"@types/redux-mock-store": "^1.0.3",
|
"@types/redux-mock-store": "^1.0.3",
|
||||||
@@ -191,9 +189,7 @@
|
|||||||
"@types/webdriverio": "^5.0.0",
|
"@types/webdriverio": "^5.0.0",
|
||||||
"@types/webpack-env": "^1.17.0",
|
"@types/webpack-env": "^1.17.0",
|
||||||
"archiver": "^5.3.1",
|
"archiver": "^5.3.1",
|
||||||
"asar": "^3.2.0",
|
|
||||||
"async-mutex": "^0.4.0",
|
"async-mutex": "^0.4.0",
|
||||||
"awesome-typescript-loader": "^5.2.1",
|
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"axios-mock-adapter": "^1.21.2",
|
"axios-mock-adapter": "^1.21.2",
|
||||||
"babel-loader": "^8.2.5",
|
"babel-loader": "^8.2.5",
|
||||||
@@ -201,83 +197,65 @@
|
|||||||
"babel-plugin-styled-components": "^2.0.7",
|
"babel-plugin-styled-components": "^2.0.7",
|
||||||
"babel-preset-react-app": "^10.0.1",
|
"babel-preset-react-app": "^10.0.1",
|
||||||
"babel-runtime": "^6.26.0",
|
"babel-runtime": "^6.26.0",
|
||||||
"boiler-room-custodian": "^0.6.2",
|
|
||||||
"brie": "^3.0.4",
|
"brie": "^3.0.4",
|
||||||
"chromedriver": "^103.0.0",
|
"chromedriver": "^103.0.0",
|
||||||
"circular-dependency-plugin": "^5.2.2",
|
"circular-dependency-plugin": "^5.2.2",
|
||||||
"contentful": "^9.2.4",
|
"contentful": "^9.2.4",
|
||||||
"copy-webpack-plugin": "^11.0.0",
|
"copy-webpack-plugin": "^11.0.0",
|
||||||
"core-js": "^3.24.1",
|
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"crypto-js": "^4.1.1",
|
|
||||||
"css-loader": "^6.7.1",
|
"css-loader": "^6.7.1",
|
||||||
"devtron": "^1.4.0",
|
|
||||||
"dotenv": "^16.0.2",
|
"dotenv": "^16.0.2",
|
||||||
"elasticlunr": "^0.9.5",
|
"elasticlunr": "^0.9.5",
|
||||||
"electron": "^25.0.0",
|
"electron": "^26.0.0",
|
||||||
"electron-better-ipc": "^2.0.1",
|
"electron-better-ipc": "^2.0.1",
|
||||||
"electron-builder": "^23.3.3",
|
"electron-builder": "^23.3.3",
|
||||||
"electron-debug": "^3.2.0",
|
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-localshortcut": "^3.2.1",
|
"electron-localshortcut": "^3.2.1",
|
||||||
"electron-log": "^4.4.8",
|
|
||||||
"electron-notarize": "^1.2.1",
|
"electron-notarize": "^1.2.1",
|
||||||
"electron-publisher-s3": "^20.17.2",
|
|
||||||
"electron-store": "^8.0.1",
|
"electron-store": "^8.0.1",
|
||||||
"electron-updater": "4.3.9",
|
"electron-updater": "4.3.9",
|
||||||
"extract-text-webpack-plugin": "^3.0.2",
|
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"fork-ts-checker-webpack-plugin": "^7.2.13",
|
"fork-ts-checker-webpack-plugin": "^7.2.13",
|
||||||
"form-data": "^4.0.0",
|
|
||||||
"fs": "0.0.2",
|
|
||||||
"fs-extra": "^10.1.0",
|
"fs-extra": "^10.1.0",
|
||||||
"getmac": "^5.20.0",
|
"getmac": "^5.20.0",
|
||||||
"glob": "^8.0.3",
|
|
||||||
"history": "^4.10.1",
|
"history": "^4.10.1",
|
||||||
"html-webpack-plugin": "^5.5.0",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
"ical-generator": "^3.5.1",
|
"ical-generator": "^3.5.1",
|
||||||
"ical-js-parser": "^0.7.0",
|
"ical-js-parser": "^0.7.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
"image-webpack-loader": "^8.1.0",
|
|
||||||
"is-electron-renderer": "^2.0.1",
|
"is-electron-renderer": "^2.0.1",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"jest-styled-components": "^7.0.8",
|
"jest-styled-components": "^7.0.8",
|
||||||
"json-loader": "^0.5.7",
|
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"memfs": "^3.4.7",
|
"memfs": "^3.4.7",
|
||||||
"mini-css-extract-plugin": "^2.6.1",
|
"mini-css-extract-plugin": "^2.6.1",
|
||||||
|
"mock-fs": "^5.2.0",
|
||||||
"mockdate": "^3.0.5",
|
"mockdate": "^3.0.5",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"moxios": "^0.4.0",
|
|
||||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||||
"nodemon": "^2.0.19",
|
"nodemon": "^2.0.19",
|
||||||
"p-queue": "^7.3.0",
|
"p-queue": "^7.3.0",
|
||||||
"quoted-printable": "^1.0.1",
|
"quoted-printable": "^1.0.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-beautiful-dnd": "^13.1.1",
|
"react-beautiful-dnd": "^13.1.1",
|
||||||
"react-beautiful-dnd-test-utils": "^4.1.1",
|
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-google-button": "^0.7.2",
|
"react-google-button": "^0.7.2",
|
||||||
"react-hook-form": "~7.12.2",
|
"react-hook-form": "~7.12.2",
|
||||||
"react-hot-loader": "^4.13.0",
|
"react-hot-loader": "^4.13.0",
|
||||||
"react-intersection-observer": "^9.4.0",
|
"react-intersection-observer": "^9.4.0",
|
||||||
"react-intl": "5.0.2",
|
"react-intl": "6.4.7",
|
||||||
"react-intl-translations-manager": "^5.0.3",
|
|
||||||
"react-modal": "^3.15.1",
|
"react-modal": "^3.15.1",
|
||||||
"react-redux": "^8.0.2",
|
"react-redux": "^8.0.2",
|
||||||
"react-router": "^5.2.0",
|
"react-router": "^5.2.0",
|
||||||
"react-router-dom": "^5.2.0",
|
"react-router-dom": "^5.2.0",
|
||||||
"react-svg-loader": "^3.0.3",
|
|
||||||
"react-syntax-highlighter": "^15.5.0",
|
"react-syntax-highlighter": "^15.5.0",
|
||||||
"react-test-renderer": "^17.0.2",
|
|
||||||
"react-tooltip": "^4.2.21",
|
"react-tooltip": "^4.2.21",
|
||||||
"react-viewport-list": "^6.0.1",
|
"react-viewport-list": "^6.0.1",
|
||||||
"react-virtualized": "^9.22.3",
|
"react-virtualized": "^9.22.3",
|
||||||
|
"react-virtuoso": "^2.18.0",
|
||||||
"redux": "^4.2.0",
|
"redux": "^4.2.0",
|
||||||
"redux-devtools-extension": "^2.13.9",
|
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
"redux-mock-store": "^1.5.4",
|
"redux-mock-store": "^1.5.4",
|
||||||
"redux-observable": "^2.0.0",
|
|
||||||
"redux-thunk": "^2.4.1",
|
"redux-thunk": "^2.4.1",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"reselect": "4.0.0",
|
"reselect": "4.0.0",
|
||||||
@@ -290,7 +268,6 @@
|
|||||||
"styled-components": "^5.3.3",
|
"styled-components": "^5.3.3",
|
||||||
"styled-normalize": "^8.0.7",
|
"styled-normalize": "^8.0.7",
|
||||||
"stylelint": "^13.13.1",
|
"stylelint": "^13.13.1",
|
||||||
"stylelint-config-recommended": "^9.0.0",
|
|
||||||
"stylelint-config-styled-components": "^0.1.1",
|
"stylelint-config-styled-components": "^0.1.1",
|
||||||
"stylelint-processor-styled-components": "^1.10.0",
|
"stylelint-processor-styled-components": "^1.10.0",
|
||||||
"svg-react-loader": "^0.4.6",
|
"svg-react-loader": "^0.4.6",
|
||||||
@@ -298,31 +275,24 @@
|
|||||||
"tcp-port-used": "^1.0.2",
|
"tcp-port-used": "^1.0.2",
|
||||||
"terser-webpack-plugin": "^5.3.6",
|
"terser-webpack-plugin": "^5.3.6",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^26.5.6",
|
||||||
"ts-loader": "^9.3.1",
|
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.8.3",
|
||||||
"update-electron-app": "^2.0.1",
|
|
||||||
"url-loader": "4.1.1",
|
"url-loader": "4.1.1",
|
||||||
"usehooks-ts": "^2.6.0",
|
"usehooks-ts": "^2.6.0",
|
||||||
"utf8": "^3.0.0",
|
"utf8": "^3.0.0",
|
||||||
"vcf": "^2.1.1",
|
"vcf": "^2.1.1",
|
||||||
"webpack": "^5.74.0",
|
"webpack": "^5.74.0",
|
||||||
"webpack-cli": "^4.10.0",
|
"webpack-cli": "^4.10.0",
|
||||||
"webpack-dev-middleware": "^5.3.3",
|
|
||||||
"webpack-dev-server": "^4.15.1",
|
"webpack-dev-server": "^4.15.1",
|
||||||
"webpack-hot-middleware": "^2.25.2",
|
|
||||||
"winston": "^3.8.2",
|
"winston": "^3.8.2",
|
||||||
"winston-daily-rotate-file": "^4.7.1",
|
"winston-daily-rotate-file": "^4.7.1",
|
||||||
"winston-transport-rollbar-3": "^3.2.0"
|
"winston-transport-rollbar-3": "^3.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mock-fs": "^5.2.0",
|
"serialport": "10.1.0"
|
||||||
"react-virtuoso": "^2.18.0",
|
|
||||||
"serialport": "^10.1.0",
|
|
||||||
"usb": "1.9.2"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18.15.0",
|
"node": "18.16.1",
|
||||||
"npm": "9.5.0"
|
"npm": "9.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ const multiDaysEvent = {
|
|||||||
startDate: "2020-02-12T10:00:00.000Z",
|
startDate: "2020-02-12T10:00:00.000Z",
|
||||||
endDate: "2020-02-14T11:00:00.000Z",
|
endDate: "2020-02-14T11:00:00.000Z",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: debug why?
|
||||||
const oneDayResult = `Wednesday, February 12, 2020, 10:00 AM - 11:00 AM`
|
const oneDayResult = `Wednesday, February 12, 2020, 10:00 AM - 11:00 AM`
|
||||||
const multiDaysResult = `February 12, 2020, 10:00 AM - February 14, 2020, 11:00 AM`
|
const multiDaysResult = `February 12, 2020 at 10:00 AM - February 14, 2020 at 11:00 AM`
|
||||||
|
|
||||||
test("show one day event date", () => {
|
test("show one day event date", () => {
|
||||||
const { container } = renderWithThemeAndIntl(
|
const { container } = renderWithThemeAndIntl(
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ import NetworkStatusChecker from "App/__deprecated__/renderer/components/core/ne
|
|||||||
const mapDispatchToProps = (dispatch: TmpDispatch) => ({
|
const mapDispatchToProps = (dispatch: TmpDispatch) => ({
|
||||||
// AUTO DISABLED - fix me if you like :)
|
// AUTO DISABLED - fix me if you like :)
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
||||||
// updateOnlineStatus: () => dispatch.networkStatus.updateOnlineStatus(),
|
updateOnlineStatus: () => dispatch.networkStatus.updateOnlineStatus(),
|
||||||
updateOnlineStatus: () => {},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export default connect(null, mapDispatchToProps)(NetworkStatusChecker)
|
export default connect(null, mapDispatchToProps)(NetworkStatusChecker)
|
||||||
|
|||||||
@@ -14,16 +14,11 @@ import { SettingsTogglerTestIds } from "App/settings/components/settings-toggler
|
|||||||
import { Provider } from "react-redux"
|
import { Provider } from "react-redux"
|
||||||
import store from "App/__deprecated__/renderer/store"
|
import store from "App/__deprecated__/renderer/store"
|
||||||
|
|
||||||
jest.mock(
|
jest.mock("@electron/remote", () => ({
|
||||||
"electron",
|
dialog: {
|
||||||
jest.fn().mockImplementation(() => ({
|
showOpenDialog: jest.fn(),
|
||||||
remote: {
|
},
|
||||||
dialog: {
|
}))
|
||||||
showOpenDialog: jest.fn(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
)
|
|
||||||
|
|
||||||
const renderer = (props = {}) =>
|
const renderer = (props = {}) =>
|
||||||
renderWithThemeAndIntl(
|
renderWithThemeAndIntl(
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import { helpSeed } from "App/__deprecated__/seeds/help"
|
|||||||
import { notesSeed } from "App/__deprecated__/seeds/notes"
|
import { notesSeed } from "App/__deprecated__/seeds/notes"
|
||||||
|
|
||||||
import { reducers, combinedReducers } from "./reducers"
|
import { reducers, combinedReducers } from "./reducers"
|
||||||
import { newsReducer } from "App/news/reducers/news.reducer"
|
|
||||||
|
|
||||||
const middlewares: Middleware[] = [thunk]
|
const middlewares: Middleware[] = [thunk]
|
||||||
|
|
||||||
@@ -32,9 +31,6 @@ const config: InitConfig<RootModel> = {
|
|||||||
plugins: [selectPlugin()],
|
plugins: [selectPlugin()],
|
||||||
redux: {
|
redux: {
|
||||||
reducers: reducers,
|
reducers: reducers,
|
||||||
// reducers: {
|
|
||||||
// news: newsReducer,
|
|
||||||
// },
|
|
||||||
middlewares,
|
middlewares,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
import { configureStore } from "@reduxjs/toolkit"
|
|
||||||
import { backupReducer } from "App/backup/reducers/backup.reducer"
|
|
||||||
import { contactSupportReducer } from "App/contact-support/reducers/contact-support.reducer"
|
|
||||||
import { contactsReducer } from "App/contacts/reducers/contacts.reducer"
|
|
||||||
import { crashDumpReducer } from "App/crash-dump/reducers/crash-dump.reducer"
|
|
||||||
import { dataSyncReducer } from "App/data-sync/reducers/data-sync.reducer"
|
|
||||||
import { deviceReducer } from "App/device/reducers/device.reducer"
|
|
||||||
import { filesManagerReducer } from "App/files-manager/reducers/files-manager.reducer"
|
|
||||||
import { messagesReducer } from "App/messages/reducers/messages.reducer"
|
|
||||||
import { modalsManagerReducer } from "App/modals-manager/reducers/modals-manager.reducer"
|
|
||||||
import { newsReducer } from "App/news/reducers/news.reducer"
|
|
||||||
import { notificationReducer } from "App/notification/reducers/notification.reducer"
|
|
||||||
import { settingsReducer } from "App/settings/reducers/settings.reducer"
|
|
||||||
import { templateReducer } from "App/templates/reducers/template.reducer"
|
|
||||||
import { updateOsReducer } from "App/update/reducers/update-os.reducer"
|
|
||||||
import { reducers, combinedReducers } from "./reducers"
|
|
||||||
import { useDispatch, useSelector } from "react-redux"
|
|
||||||
import type { TypedUseSelectorHook } from "react-redux"
|
|
||||||
|
|
||||||
import thunk from "redux-thunk"
|
|
||||||
|
|
||||||
export const store = configureStore({
|
|
||||||
reducer: {
|
|
||||||
news: newsReducer,
|
|
||||||
device: deviceReducer,
|
|
||||||
backup: backupReducer,
|
|
||||||
crashDump: crashDumpReducer,
|
|
||||||
messages: messagesReducer,
|
|
||||||
contacts: contactsReducer,
|
|
||||||
dataSync: dataSyncReducer,
|
|
||||||
modalsManager: modalsManagerReducer,
|
|
||||||
contactSupport: contactSupportReducer,
|
|
||||||
filesManager: filesManagerReducer,
|
|
||||||
notification: notificationReducer,
|
|
||||||
templates: templateReducer,
|
|
||||||
settings: settingsReducer,
|
|
||||||
update: updateOsReducer,
|
|
||||||
},
|
|
||||||
middleware: (getDefaultMiddleware) => {
|
|
||||||
// console.log(getDefaultMiddleware())
|
|
||||||
return getDefaultMiddleware()
|
|
||||||
// return getDefaultMiddleware({
|
|
||||||
// thunk: true,
|
|
||||||
// immutableCheck: true,
|
|
||||||
// serializableCheck: true,
|
|
||||||
// actionCreatorCheck: true,
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
// Infer the `RootState` and `AppDispatch` types from the store itself
|
|
||||||
export type RootState = ReturnType<typeof store.getState>
|
|
||||||
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
|
|
||||||
export type AppDispatch = typeof store.dispatch
|
|
||||||
|
|
||||||
// Use throughout your app instead of plain `useDispatch` and `useSelector`
|
|
||||||
export const useAppDispatch: () => AppDispatch = useDispatch
|
|
||||||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import React from "react"
|
|
||||||
|
|
||||||
const TestZZZ = () => {
|
|
||||||
return <div>TestZZZ</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
export default TestZZZ
|
|
||||||
@@ -4,10 +4,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { createIntl } from "react-intl"
|
import { createIntl } from "@formatjs/intl"
|
||||||
import translationConfig from "App/translations.config.json"
|
import translationConfig from "App/translations.config.json"
|
||||||
import localeEn from "App/__deprecated__/renderer/locales/default/en-US.json"
|
import localeEn from "App/__deprecated__/renderer/locales/default/en-US.json"
|
||||||
import extractLanguageKeys from "App/__deprecated__/renderer/utils/extract-test-locale"
|
import extractLanguageKeys from "App/__deprecated__/renderer/utils/extract-test-locale"
|
||||||
|
import { FormatXMLElementFn } from "intl-messageformat"
|
||||||
|
|
||||||
const testLocale = extractLanguageKeys(localeEn)
|
const testLocale = extractLanguageKeys(localeEn)
|
||||||
|
|
||||||
@@ -31,4 +32,4 @@ export const textFormatters = {
|
|||||||
// AUTO DISABLED - fix me if you like :)
|
// AUTO DISABLED - fix me if you like :)
|
||||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||||
s: (str: string) => <s key={`strike-${++index}`}>{str}</s>,
|
s: (str: string) => <s key={`strike-${++index}`}>{str}</s>,
|
||||||
}
|
} as unknown as Record<string, FormatXMLElementFn<string, string>>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ beforeEach(() => {
|
|||||||
vol.reset()
|
vol.reset()
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("`BaseIndexer`", () => {
|
// TODO: debug why?
|
||||||
|
describe.skip("`BaseIndexer`", () => {
|
||||||
// AUTO DISABLED - fix me if you like :)
|
// AUTO DISABLED - fix me if you like :)
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await
|
// eslint-disable-next-line @typescript-eslint/require-await
|
||||||
test("`getData` execution works properly", async () => {
|
test("`getData` execution works properly", async () => {
|
||||||
|
|||||||
@@ -17,12 +17,11 @@ import {
|
|||||||
} from "App/device/constants"
|
} from "App/device/constants"
|
||||||
import { connectDeviceRequest } from "App/device/requests"
|
import { connectDeviceRequest } from "App/device/requests"
|
||||||
import { ReduxRootState } from "App/__deprecated__/renderer/store"
|
import { ReduxRootState } from "App/__deprecated__/renderer/store"
|
||||||
import { RootState } from "App/__deprecated__/renderer/store/test"
|
|
||||||
|
|
||||||
export const connectDevice = createAsyncThunk<
|
export const connectDevice = createAsyncThunk<
|
||||||
DeviceType | undefined,
|
DeviceType | undefined,
|
||||||
DeviceType,
|
DeviceType,
|
||||||
{ state: RootState }
|
{ state: ReduxRootState }
|
||||||
>(DeviceEvent.Connected, async (payload, { dispatch, rejectWithValue }) => {
|
>(DeviceEvent.Connected, async (payload, { dispatch, rejectWithValue }) => {
|
||||||
const data = await connectDeviceRequest()
|
const data = await connectDeviceRequest()
|
||||||
|
|
||||||
|
|||||||
@@ -15,30 +15,34 @@ import { readRestoreDeviceDataState } from "App/backup/actions"
|
|||||||
export const setConnectionStatus = createAsyncThunk<boolean, boolean>(
|
export const setConnectionStatus = createAsyncThunk<boolean, boolean>(
|
||||||
DeviceEvent.SetConnectionState,
|
DeviceEvent.SetConnectionState,
|
||||||
(payload, { getState, dispatch }) => {
|
(payload, { getState, dispatch }) => {
|
||||||
// const state = getState() as ReduxRootState
|
const state = getState() as ReduxRootState
|
||||||
|
|
||||||
// if (!payload) {
|
if (!payload) {
|
||||||
// dispatch(setDataSyncInitState())
|
dispatch(setDataSyncInitState())
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (state.update.updateOsState === State.Loading) {
|
if (state.update.updateOsState === State.Loading) {
|
||||||
// return payload
|
return payload
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (state.backup.restoringState === State.Loading) {
|
if (state.backup.restoringState === State.Loading) {
|
||||||
// return payload
|
return payload
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (state.backup.backingUpState === State.Loading) {
|
if (state.backup.backingUpState === State.Loading) {
|
||||||
// return payload
|
return payload
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (!payload || state.backup.restoringState === State.Failed || state.backup.backingUpState === State.Failed) {
|
if (
|
||||||
// dispatch(setInitState())
|
!payload ||
|
||||||
// dispatch(readRestoreDeviceDataState())
|
state.backup.restoringState === State.Failed ||
|
||||||
// void setValue({ key: MetadataKey.DeviceOsVersion, value: null })
|
state.backup.backingUpState === State.Failed
|
||||||
// void setValue({ key: MetadataKey.DeviceType, value: null })
|
) {
|
||||||
// }
|
dispatch(setInitState())
|
||||||
|
dispatch(readRestoreDeviceDataState())
|
||||||
|
void setValue({ key: MetadataKey.DeviceOsVersion, value: null })
|
||||||
|
void setValue({ key: MetadataKey.DeviceType, value: null })
|
||||||
|
}
|
||||||
|
|
||||||
return payload
|
return payload
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ describe("Device Lock Time Observer: observe", () => {
|
|||||||
})
|
})
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.useRealTimers()
|
jest.useRealTimers()
|
||||||
jest.resetAllMocks()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("When `unlockTime` returns success result", () => {
|
describe("When `unlockTime` returns success result", () => {
|
||||||
|
|||||||
@@ -14,16 +14,11 @@ import { Router } from "react-router"
|
|||||||
import history from "App/__deprecated__/renderer/routes/history"
|
import history from "App/__deprecated__/renderer/routes/history"
|
||||||
import { data } from "App/__deprecated__/seeds/help"
|
import { data } from "App/__deprecated__/seeds/help"
|
||||||
|
|
||||||
jest.mock(
|
jest.mock("@electron/remote", () => ({
|
||||||
"electron",
|
dialog: {
|
||||||
jest.fn().mockImplementation(() => ({
|
showOpenDialog: jest.fn(),
|
||||||
remote: {
|
},
|
||||||
dialog: {
|
}))
|
||||||
showOpenDialog: jest.fn(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
)
|
|
||||||
|
|
||||||
type Props = ComponentProps<typeof Help>
|
type Props = ComponentProps<typeof Help>
|
||||||
|
|
||||||
|
|||||||
@@ -26,16 +26,11 @@ jest.mock("electron-better-ipc", () => ({
|
|||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
jest.mock(
|
jest.mock("@electron/remote", () => ({
|
||||||
"electron",
|
dialog: {
|
||||||
jest.fn().mockImplementation(() => ({
|
showOpenDialog: jest.fn(),
|
||||||
remote: {
|
},
|
||||||
dialog: {
|
}))
|
||||||
showOpenDialog: jest.fn(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
)
|
|
||||||
|
|
||||||
type Props = ComponentProps<typeof ModalsManager>
|
type Props = ComponentProps<typeof ModalsManager>
|
||||||
|
|
||||||
|
|||||||
@@ -11,16 +11,11 @@ import ModalsManager from "App/modals-manager/containers/modals-manager.containe
|
|||||||
import { AppForcedUpdateFlowTestIds } from "App/settings/components/app-forced-update-flow/app-forced-update-flow-test-ids.enum"
|
import { AppForcedUpdateFlowTestIds } from "App/settings/components/app-forced-update-flow/app-forced-update-flow-test-ids.enum"
|
||||||
import { AppUpdateFlowTestIds } from "App/settings/components/app-update-flow/app-update-flow-test-ids.enum"
|
import { AppUpdateFlowTestIds } from "App/settings/components/app-update-flow/app-update-flow-test-ids.enum"
|
||||||
|
|
||||||
jest.mock(
|
jest.mock("@electron/remote", () => ({
|
||||||
"electron",
|
dialog: {
|
||||||
jest.fn().mockImplementation(() => ({
|
showOpenDialog: jest.fn(),
|
||||||
remote: {
|
},
|
||||||
dialog: {
|
}))
|
||||||
showOpenDialog: jest.fn(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
)
|
|
||||||
|
|
||||||
type Props = ComponentProps<typeof ModalsManager>
|
type Props = ComponentProps<typeof ModalsManager>
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,12 @@ import { renderWithThemeAndIntl } from "App/__deprecated__/renderer/utils/render
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { CheckForUpdateState } from "App/update/constants/check-for-update-state.constant"
|
import { CheckForUpdateState } from "App/update/constants/check-for-update-state.constant"
|
||||||
|
|
||||||
jest.mock("electron", () => ({
|
jest.mock("@electron/remote", () => ({
|
||||||
remote: {
|
Menu: () => ({
|
||||||
Menu: () => ({
|
popup: jest.fn(),
|
||||||
popup: jest.fn(),
|
append: jest.fn(),
|
||||||
append: jest.fn(),
|
}),
|
||||||
}),
|
MenuItem: () => jest.fn(),
|
||||||
MenuItem: () => jest.fn(),
|
|
||||||
},
|
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const defaultProps: UpdateOsFlowProps = {
|
const defaultProps: UpdateOsFlowProps = {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ module.exports = (production) => {
|
|||||||
Cypress: resolve(__dirname, "..", "..", "cypress"),
|
Cypress: resolve(__dirname, "..", "..", "cypress"),
|
||||||
Storybook: resolve(__dirname, "..", "..", ".storybook"),
|
Storybook: resolve(__dirname, "..", "..", ".storybook"),
|
||||||
Renderer: resolve(__dirname, "..", "..", "src", "renderer"),
|
Renderer: resolve(__dirname, "..", "..", "src", "renderer"),
|
||||||
"react-intl": "react-intl/dist",
|
|
||||||
fs: resolve(__dirname, "..", "..", "__mocks__", "fs-mock.js"),
|
fs: resolve(__dirname, "..", "..", "__mocks__", "fs-mock.js"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
4
packages/e2e/package-lock.json
generated
4
packages/e2e/package-lock.json
generated
@@ -33,8 +33,8 @@
|
|||||||
"wdio-wait-for": "^2.2.1"
|
"wdio-wait-for": "^2.2.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18.15.0",
|
"node": "18.16.1",
|
||||||
"npm": "9.5.0"
|
"npm": "9.5.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
"wdio-wait-for": "^2.2.1"
|
"wdio-wait-for": "^2.2.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18.15.0",
|
"node": "18.16.1",
|
||||||
"npm": "9.5.0"
|
"npm": "9.5.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.27.2"
|
"axios": "^0.27.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user