orc-shared 1.2.0-dev.3 → 1.2.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/makeApiAction.js +2 -2
- package/dist/actions/makeOrcApiAction.js +2 -2
- package/dist/actions/metadata.js +2 -2
- package/dist/actions/navigation.js +2 -2
- package/dist/actions/scopes.js +4 -2
- package/dist/buildStore.js +2 -2
- package/dist/components/AppFrame/About.js +2 -2
- package/dist/components/AppFrame/Preferences.js +2 -2
- package/dist/components/ApplicationModuleLoader.js +7 -8
- package/dist/components/Form/FieldList.js +2 -2
- package/dist/components/Form/Inputs/Translation.js +2 -2
- package/dist/components/List/enhanceColumnDefs.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/Notification.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Translations.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/useTableSelection.js +2 -2
- package/dist/components/MaterialUI/Inputs/Autocomplete.js +2 -2
- package/dist/components/MaterialUI/Inputs/Select.js +2 -2
- package/dist/components/MaterialUI/Inputs/Switch.js +2 -2
- package/dist/components/MaterialUI/Inputs/createInput.js +2 -2
- package/dist/components/MaterialUI/Navigation/ExternalLink.js +113 -0
- package/dist/components/MaterialUI/muiThemes.js +7 -2
- package/dist/components/Navigation/Bar.js +2 -2
- package/dist/components/Navigation/useNavigationState.js +2 -2
- package/dist/components/Routing/withWaypointing.js +2 -2
- package/dist/components/Scope/index.js +2 -2
- package/dist/components/Treeview/Node.js +2 -2
- package/dist/components/Treeview/index.js +2 -2
- package/dist/content/iconsSheet.svg +3 -0
- package/dist/getThemeOverrides.js +2 -2
- package/dist/hocs/withUpdateHandler.js +2 -2
- package/dist/hooks/useEditState.js +2 -2
- package/dist/hooks/useEntityLoader.js +2 -2
- package/dist/hooks/useFullEntityEditState.js +2 -2
- package/dist/hooks/useLabelMessage.js +2 -2
- package/dist/hooks/useMultipleFieldEditState.js +2 -2
- package/dist/hooks/useNotificationRequestState.js +2 -2
- package/dist/reducers/settings.js +16 -3
- package/dist/selectors/metadata.js +2 -2
- package/dist/selectors/modules.js +2 -2
- package/dist/utils/flatten.js +2 -2
- package/package.json +1 -1
- package/src/actions/scopes.js +18 -7
- package/src/actions/scopes.test.js +38 -0
- package/src/components/ApplicationModuleLoader.js +8 -9
- package/src/components/ApplicationModuleLoader.test.js +61 -22
- package/src/components/MaterialUI/Navigation/ExternalLink.js +25 -0
- package/src/components/MaterialUI/Navigation/ExternalLink.test.js +26 -0
- package/src/components/MaterialUI/muiThemes.js +5 -0
- package/src/content/iconsSheet.svg +3 -0
- package/src/reducers/settings.js +19 -5
- package/src/reducers/settings.test.js +39 -2
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import Immutable from "immutable";
|
|
2
2
|
import reducer from "./settings";
|
|
3
3
|
import { GET_MY_APPLICATION_SUCCESS, SET_MY_APPLICATION_SUCCESS } from "../actions/applications";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
GET_APPLICATION_MODULES_SUCCESS,
|
|
6
|
+
GET_MY_SCOPE_SUCCESS,
|
|
7
|
+
GET_SCOPES_FAILURE,
|
|
8
|
+
GET_SCOPES_SUCCESS,
|
|
9
|
+
} from "../actions/scopes";
|
|
5
10
|
|
|
6
11
|
describe("settings", () => {
|
|
7
12
|
const initialState = Immutable.fromJS({
|
|
@@ -83,7 +88,7 @@ describe("settings", () => {
|
|
|
83
88
|
});
|
|
84
89
|
});
|
|
85
90
|
|
|
86
|
-
it("stores
|
|
91
|
+
it("stores module as loaded when it is a success", () => {
|
|
87
92
|
const oldState = Immutable.fromJS({
|
|
88
93
|
loadedModulesScope: [],
|
|
89
94
|
});
|
|
@@ -96,4 +101,36 @@ describe("settings", () => {
|
|
|
96
101
|
loadedModulesScope: ["Order"],
|
|
97
102
|
});
|
|
98
103
|
});
|
|
104
|
+
|
|
105
|
+
it("stores module as loaded when it is a failure with status 500", () => {
|
|
106
|
+
const oldState = Immutable.fromJS({
|
|
107
|
+
loadedModulesScope: [],
|
|
108
|
+
});
|
|
109
|
+
const action = {
|
|
110
|
+
type: GET_SCOPES_FAILURE,
|
|
111
|
+
payload: {
|
|
112
|
+
status: 500,
|
|
113
|
+
},
|
|
114
|
+
meta: { module: "Order" },
|
|
115
|
+
};
|
|
116
|
+
const newState = reducer(oldState, action);
|
|
117
|
+
expect(newState, "not to be", oldState).and("to satisfy", {
|
|
118
|
+
loadedModulesScope: ["Order"],
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
it("does not store module as loaded when it is a failure with other errors", () => {
|
|
123
|
+
const oldState = Immutable.fromJS({
|
|
124
|
+
loadedModulesScope: [],
|
|
125
|
+
});
|
|
126
|
+
const action = {
|
|
127
|
+
type: GET_SCOPES_FAILURE,
|
|
128
|
+
payload: {
|
|
129
|
+
status: 404,
|
|
130
|
+
},
|
|
131
|
+
meta: { module: "Order" },
|
|
132
|
+
};
|
|
133
|
+
const newState = reducer(oldState, action);
|
|
134
|
+
expect(newState, "to be", oldState);
|
|
135
|
+
});
|
|
99
136
|
});
|