orc-shared 5.10.0-dev.2 → 5.10.0-dev.21
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/metadata.js +30 -11
- package/dist/actions/requestsApi.js +10 -1
- package/dist/components/AppFrame/About.js +136 -100
- package/dist/components/AppFrame/Anchor.js +45 -21
- package/dist/components/AppFrame/AppFrame.js +53 -31
- package/dist/components/AppFrame/Help.js +35 -15
- package/dist/components/AppFrame/MenuItem.js +148 -114
- package/dist/components/AppFrame/Preferences.js +136 -97
- package/dist/components/AppFrame/Sidebar.js +51 -28
- package/dist/components/AppFrame/Topbar.js +61 -36
- package/dist/components/ColumnWrapper.js +28 -5
- package/dist/components/Culture.js +33 -14
- package/dist/components/DropMenu/Menu.js +79 -45
- package/dist/components/DropMenu/index.js +34 -29
- package/dist/components/Form/Combination.js +45 -16
- package/dist/components/Form/Field.js +57 -38
- package/dist/components/Form/FieldElements.js +0 -11
- package/dist/components/Form/Fieldset.js +47 -19
- package/dist/components/Form/Form.js +22 -9
- package/dist/components/Form/FormElement.js +40 -7
- package/dist/components/Form/Inputs/Button.js +63 -18
- package/dist/components/Form/Inputs/ReadOnly.js +50 -27
- package/dist/components/{AppFrame/ApplicationSelector/Header.js → Form/Inputs/Selector.js} +30 -31
- package/dist/components/Form/Inputs/Text.js +20 -37
- package/dist/components/Form/Inputs/Toggles.js +39 -40
- package/dist/components/Form/Inputs/index.js +2 -13
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +31 -11
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/SectionToolbar.js +89 -0
- package/dist/components/MaterialUI/DataDisplay/Table.js +109 -18
- package/dist/components/MaterialUI/DataDisplay/TableProps.js +5 -1
- package/dist/components/MaterialUI/DataDisplay/TableWithInMemoryPaging.js +198 -0
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.js +4 -1
- package/dist/components/MaterialUI/Inputs/DatePicker.js +14 -14
- package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +1 -0
- package/dist/components/MaterialUI/Inputs/Select.js +2 -0
- package/dist/components/MaterialUI/Inputs/SelectProps.js +2 -0
- package/dist/components/MaterialUI/Inputs/Switch.js +17 -1
- package/dist/components/MaterialUI/Inputs/SwitchProps.js +2 -0
- package/dist/components/MaterialUI/Inputs/TimePicker.js +14 -21
- package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +3 -1
- package/dist/components/MaterialUI/muiThemes.js +2 -1
- package/dist/components/Provision.js +1 -1
- package/dist/constants.js +2 -1
- package/dist/content/iconsSheet.svg +740 -116
- package/dist/hocs/withScrollBox.js +27 -12
- package/dist/hooks/useDaysAndMonthsLocalization.js +77 -0
- package/dist/hooks/useInMemoryPaging.js +135 -0
- package/dist/hooks/useMultipleFieldEditState.js +12 -3
- package/dist/reducers/metadata.js +6 -0
- package/dist/schemas/metadata.js +9 -1
- package/dist/selectors/locale.js +1 -0
- package/dist/selectors/metadata.js +14 -11
- package/dist/sharedMessages.js +184 -0
- package/dist/utils/ListHelper.js +271 -0
- package/dist/utils/comparisonHelper.js +185 -0
- package/dist/utils/propertyBagHelper.js +3 -1
- package/dist/utils/timezoneHelper.js +18 -31
- package/package.json +4 -3
- package/src/actions/metadata.js +11 -0
- package/src/actions/metadata.test.js +27 -0
- package/src/actions/requestsApi.js +6 -0
- package/src/components/AppFrame/About.js +97 -117
- package/src/components/AppFrame/About.test.js +128 -90
- package/src/components/AppFrame/Anchor.js +34 -36
- package/src/components/AppFrame/Anchor.test.js +5 -68
- package/src/components/AppFrame/AppFrame.js +31 -40
- package/src/components/AppFrame/AppFrame.test.js +424 -445
- package/src/components/AppFrame/Help.js +23 -20
- package/src/components/AppFrame/Help.test.js +3 -3
- package/src/components/AppFrame/MenuItem.js +106 -126
- package/src/components/AppFrame/MenuItem.test.js +78 -169
- package/src/components/AppFrame/Preferences.js +110 -98
- package/src/components/AppFrame/Preferences.test.js +115 -219
- package/src/components/AppFrame/Sidebar.js +39 -41
- package/src/components/AppFrame/Sidebar.test.js +88 -168
- package/src/components/AppFrame/Topbar.js +59 -52
- package/src/components/AppFrame/Topbar.test.js +31 -39
- package/src/components/ColumnWrapper.js +18 -9
- package/src/components/Culture.js +20 -10
- package/src/components/Culture.test.js +27 -16
- package/src/components/DropMenu/DropMenu.test.js +185 -224
- package/src/components/DropMenu/Menu.js +73 -80
- package/src/components/DropMenu/Menu.test.js +35 -86
- package/src/components/DropMenu/index.js +19 -15
- package/src/components/Form/Combination.js +35 -28
- package/src/components/Form/Combination.test.js +6 -19
- package/src/components/Form/Field.js +53 -66
- package/src/components/Form/Field.test.js +29 -51
- package/src/components/Form/FieldElements.js +0 -14
- package/src/components/Form/FieldElements.test.js +104 -111
- package/src/components/Form/Fieldset.js +42 -37
- package/src/components/Form/Fieldset.test.js +14 -7
- package/src/components/Form/Form.js +11 -7
- package/src/components/Form/Form.test.js +75 -56
- package/src/components/Form/FormElement.js +24 -16
- package/src/components/Form/InputField.test.js +24 -30
- package/src/components/Form/Inputs/Button.js +58 -14
- package/src/components/Form/Inputs/Button.test.js +32 -7
- package/src/components/Form/Inputs/Inputs.test.js +0 -7
- package/src/components/Form/Inputs/ReadOnly.js +34 -28
- package/src/components/Form/Inputs/ReadOnly.test.js +45 -7
- package/src/components/Form/Inputs/Selector.js +22 -0
- package/src/components/Form/Inputs/Selector.test.js +105 -0
- package/src/components/Form/Inputs/Text.js +15 -44
- package/src/components/Form/Inputs/Text.test.js +20 -29
- package/src/components/Form/Inputs/Toggles.js +27 -26
- package/src/components/Form/Inputs/Toggles.test.js +22 -28
- package/src/components/Form/Inputs/index.js +4 -15
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.test.js +1 -4
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +32 -6
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.test.js +3 -1
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/SectionToolbar.js +39 -0
- package/src/components/MaterialUI/DataDisplay/Table.js +190 -114
- package/src/components/MaterialUI/DataDisplay/Table.test.js +246 -1
- package/src/components/MaterialUI/DataDisplay/TableProps.js +4 -0
- package/src/components/MaterialUI/DataDisplay/TableProps.test.js +2 -0
- package/src/components/MaterialUI/DataDisplay/TableWithInMemoryPaging.js +145 -0
- package/src/components/MaterialUI/DataDisplay/TableWithInMemoryPaging.test.js +457 -0
- package/src/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.js +5 -1
- package/src/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.test.js +7 -1
- package/src/components/MaterialUI/Inputs/DatePicker.js +19 -20
- package/src/components/MaterialUI/Inputs/DatePicker.test.js +11 -6
- package/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +1 -0
- package/src/components/MaterialUI/Inputs/Select.js +2 -0
- package/src/components/MaterialUI/Inputs/SelectProps.js +2 -0
- package/src/components/MaterialUI/Inputs/SelectProps.test.js +2 -0
- package/src/components/MaterialUI/Inputs/Switch.js +22 -1
- package/src/components/MaterialUI/Inputs/Switch.test.js +23 -0
- package/src/components/MaterialUI/Inputs/SwitchProps.js +2 -0
- package/src/components/MaterialUI/Inputs/SwitchProps.test.js +2 -0
- package/src/components/MaterialUI/Inputs/TimePicker.js +10 -19
- package/src/components/MaterialUI/Inputs/TimePicker.test.js +278 -117
- package/src/components/MaterialUI/hocs/withDeferredTooltip.js +4 -1
- package/src/components/MaterialUI/hocs/withDeferredTooltip.test.js +27 -0
- package/src/components/MaterialUI/muiThemes.js +1 -0
- package/src/components/Navigation/Bar.test.js +92 -87
- package/src/components/Provision.js +1 -1
- package/src/components/TaskDetailsModal.test.js +1 -3
- package/src/constants.js +1 -0
- package/src/content/iconsSheet.svg +740 -116
- package/src/hocs/withScrollBox.js +32 -19
- package/src/hocs/withScrollBox.test.js +15 -3
- package/src/hooks/useDaysAndMonthsLocalization.js +79 -0
- package/src/hooks/useDaysAndMonthsLocalization.test.js +107 -0
- package/src/hooks/useInMemoryPaging.js +78 -0
- package/src/hooks/useInMemoryPaging.test.js +515 -0
- package/src/hooks/useMultipleFieldEditState.js +11 -4
- package/src/hooks/useMultipleFieldEditState.test.js +49 -1
- package/src/reducers/metadata.js +6 -1
- package/src/reducers/metadata.test.js +31 -0
- package/src/requests +1 -0
- package/src/schemas/metadata.js +3 -0
- package/src/selectors/locale.js +1 -1
- package/src/selectors/metadata.js +12 -9
- package/src/selectors/metadata.test.js +92 -11
- package/src/sharedMessages.js +184 -0
- package/src/timezones.json +883 -0
- package/src/translations/en-US.json +46 -0
- package/src/translations/fr-CA.json +46 -0
- package/src/utils/ListHelper.js +203 -0
- package/src/utils/ListHelper.test.js +710 -0
- package/src/utils/comparisonHelper.js +135 -0
- package/src/utils/comparisonHelper.test.js +334 -0
- package/src/utils/propertyBagHelper.js +2 -0
- package/src/utils/propertyBagHelper.test.js +6 -0
- package/src/utils/timezoneHelper.js +10 -135
- package/src/utils/timezoneHelper.test.js +7 -7
- package/dist/components/Form/FieldList.js +0 -270
- package/dist/components/Form/Inputs/FieldButtons.js +0 -66
- package/dist/components/Form/Inputs/Number.js +0 -117
- package/dist/components/Form/Inputs/SmallButton.js +0 -91
- package/dist/components/Form/Inputs/Time.js +0 -86
- package/dist/components/Form/Inputs/Translation.js +0 -169
- package/src/components/AppFrame/ApplicationSelector/Header.js +0 -34
- package/src/components/AppFrame/ApplicationSelector/Header.test.js +0 -23
- package/src/components/Form/FieldList.js +0 -210
- package/src/components/Form/FieldList.test.js +0 -558
- package/src/components/Form/Inputs/FieldButtons.js +0 -90
- package/src/components/Form/Inputs/Number.js +0 -60
- package/src/components/Form/Inputs/Number.test.js +0 -435
- package/src/components/Form/Inputs/SmallButton.js +0 -37
- package/src/components/Form/Inputs/SmallButton.test.js +0 -65
- package/src/components/Form/Inputs/Time.js +0 -32
- package/src/components/Form/Inputs/Time.test.js +0 -41
- package/src/components/Form/Inputs/Translation.js +0 -93
- package/src/components/Form/Inputs/Translation.test.js +0 -204
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Immutable from "immutable";
|
|
3
|
-
import { ThemeProvider } from "styled-components";
|
|
4
3
|
import { RSAA } from "redux-api-middleware";
|
|
5
|
-
import { Provider } from "react-redux";
|
|
6
|
-
import { MemoryRouter } from "react-router-dom";
|
|
7
4
|
import sinon from "sinon";
|
|
8
5
|
import { Ignore } from "unexpected-reaction";
|
|
9
6
|
import { mount, simulate } from "unexpected-reaction";
|
|
10
7
|
import { mount as enzymeMount } from "enzyme";
|
|
11
|
-
import {
|
|
12
|
-
import I18n from "../I18n";
|
|
8
|
+
import { TestWrapper, extractMessages } from "../../utils/testUtils";
|
|
13
9
|
import {
|
|
14
10
|
GET_APPLICATIONS_REQUEST,
|
|
15
11
|
GET_APPLICATIONS_SUCCESS,
|
|
16
12
|
GET_APPLICATIONS_FAILURE,
|
|
17
13
|
} from "../../actions/applications";
|
|
18
14
|
import { ScopeBar, Bar as BarWrapper } from "../Scope";
|
|
19
|
-
import AppFrame
|
|
15
|
+
import AppFrame from "./AppFrame";
|
|
20
16
|
import ApplicationSelector from "./ApplicationSelector";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { Bar as SideBar, MenuToggle, Logo } from "./Sidebar";
|
|
24
|
-
import { BlockWithA } from "./MenuItem";
|
|
25
|
-
import { HelpLink } from "./Help";
|
|
26
|
-
import { About } from "./About";
|
|
17
|
+
import { MenuToggle, Logo } from "./Sidebar";
|
|
18
|
+
import { ABOUT_NAME } from "./About";
|
|
27
19
|
import {
|
|
28
20
|
GET_VERSION_INFO_FAILURE,
|
|
29
21
|
GET_VERSION_INFO_REQUEST,
|
|
@@ -33,6 +25,9 @@ import LoadingScreen from "../MaterialUI/Feedback/loadingScreen";
|
|
|
33
25
|
import ActionModal from "../MaterialUI/DataDisplay/PredefinedElements/ActionModal";
|
|
34
26
|
import sharedMessages from "../../sharedMessages";
|
|
35
27
|
import Button from "@material-ui/core/Button";
|
|
28
|
+
import Preferences from "./Preferences";
|
|
29
|
+
|
|
30
|
+
const messages = extractMessages(sharedMessages);
|
|
36
31
|
|
|
37
32
|
jest.mock("../../utils/buildUrl", () => {
|
|
38
33
|
const modExport = {};
|
|
@@ -213,7 +208,7 @@ describe("AppFrame", () => {
|
|
|
213
208
|
},
|
|
214
209
|
settings: { defaultScope: "myScope", defaultApp: "12" },
|
|
215
210
|
versionInfo: { version: "4.2", defaultHelpUrl: "help_url", moduleHelpUrls: [] },
|
|
216
|
-
view: { scopeSelector: { filter: "1" }, __prefsDialog: { show: false } },
|
|
211
|
+
view: { scopeSelector: { filter: "1" }, __prefsDialog: { show: false }, [ABOUT_NAME]: { show: true } },
|
|
217
212
|
toasts: { queue: [] },
|
|
218
213
|
requests: {
|
|
219
214
|
actives: Immutable.Map(),
|
|
@@ -242,53 +237,52 @@ describe("AppFrame", () => {
|
|
|
242
237
|
];
|
|
243
238
|
props.children = [<TestComp1 key="1" />, <TestComp2 key="2" />, <TestComp3 key="3" />];
|
|
244
239
|
expect(
|
|
245
|
-
<
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
</
|
|
240
|
+
<TestWrapper
|
|
241
|
+
provider={{ store }}
|
|
242
|
+
stylesProvider
|
|
243
|
+
muiThemeProvider
|
|
244
|
+
intlProvider={{ messages }}
|
|
245
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
246
|
+
>
|
|
247
|
+
<AppFrame {...props} />
|
|
248
|
+
</TestWrapper>,
|
|
254
249
|
"when mounted",
|
|
255
250
|
"to satisfy",
|
|
256
|
-
<
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
</Provider>,
|
|
251
|
+
<TestWrapper
|
|
252
|
+
provider={{ store }}
|
|
253
|
+
stylesProvider
|
|
254
|
+
muiThemeProvider
|
|
255
|
+
intlProvider={{ messages }}
|
|
256
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
257
|
+
>
|
|
258
|
+
<div>
|
|
259
|
+
<div>
|
|
260
|
+
<div>
|
|
261
|
+
<ApplicationSelector {...props} />
|
|
262
|
+
<div>
|
|
263
|
+
<img />
|
|
264
|
+
Marketing Legacy
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
<Ignore />
|
|
268
|
+
<a>Help</a>
|
|
269
|
+
</div>
|
|
270
|
+
<div>
|
|
271
|
+
<MenuToggle />
|
|
272
|
+
<Ignore />
|
|
273
|
+
<Ignore />
|
|
274
|
+
<Ignore />
|
|
275
|
+
<Logo />
|
|
276
|
+
</div>
|
|
277
|
+
<div>
|
|
278
|
+
<ScopeBar name="Test 1" />
|
|
279
|
+
<TestComp1 key="1" />
|
|
280
|
+
<TestComp2 key="2" />
|
|
281
|
+
<TestComp3 key="3" />
|
|
282
|
+
</div>
|
|
283
|
+
<LoadingScreen />
|
|
284
|
+
</div>
|
|
285
|
+
</TestWrapper>,
|
|
292
286
|
);
|
|
293
287
|
|
|
294
288
|
expect(document.title, "to equal", "Marketing Legacy");
|
|
@@ -298,50 +292,49 @@ describe("AppFrame", () => {
|
|
|
298
292
|
props.modules = undefined;
|
|
299
293
|
props.children = [<TestComp1 key="1" />, <TestComp2 key="2" />, <TestComp3 key="3" />];
|
|
300
294
|
expect(
|
|
301
|
-
<
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
</
|
|
295
|
+
<TestWrapper
|
|
296
|
+
provider={{ store }}
|
|
297
|
+
stylesProvider
|
|
298
|
+
muiThemeProvider
|
|
299
|
+
intlProvider={{ messages }}
|
|
300
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
301
|
+
>
|
|
302
|
+
<AppFrame {...props} />
|
|
303
|
+
</TestWrapper>,
|
|
310
304
|
"when mounted",
|
|
311
305
|
"to satisfy",
|
|
312
|
-
<
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
</Provider>,
|
|
306
|
+
<TestWrapper
|
|
307
|
+
provider={{ store }}
|
|
308
|
+
stylesProvider
|
|
309
|
+
muiThemeProvider
|
|
310
|
+
intlProvider={{ messages }}
|
|
311
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
312
|
+
>
|
|
313
|
+
<div>
|
|
314
|
+
<div>
|
|
315
|
+
<div>
|
|
316
|
+
<ApplicationSelector {...props} />
|
|
317
|
+
<div>
|
|
318
|
+
<img />
|
|
319
|
+
Marketing Legacy
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
<Ignore />
|
|
323
|
+
<a>Help</a>
|
|
324
|
+
</div>
|
|
325
|
+
<div>
|
|
326
|
+
<MenuToggle />
|
|
327
|
+
<Logo />
|
|
328
|
+
</div>
|
|
329
|
+
<div>
|
|
330
|
+
<ScopeBar name="Test 1" />
|
|
331
|
+
<TestComp1 key="1" />
|
|
332
|
+
<TestComp2 key="2" />
|
|
333
|
+
<TestComp3 key="3" />
|
|
334
|
+
</div>
|
|
335
|
+
<LoadingScreen />
|
|
336
|
+
</div>
|
|
337
|
+
</TestWrapper>,
|
|
345
338
|
);
|
|
346
339
|
|
|
347
340
|
expect(document.title, "to equal", "Marketing Legacy");
|
|
@@ -355,52 +348,51 @@ describe("AppFrame", () => {
|
|
|
355
348
|
];
|
|
356
349
|
props.children = [<TestComp1 key="1" />, <TestComp2 key="2" />, <TestComp3 key="3" />];
|
|
357
350
|
expect(
|
|
358
|
-
<
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
</
|
|
351
|
+
<TestWrapper
|
|
352
|
+
provider={{ store }}
|
|
353
|
+
stylesProvider
|
|
354
|
+
muiThemeProvider
|
|
355
|
+
intlProvider={{ messages }}
|
|
356
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
357
|
+
>
|
|
358
|
+
<AppFrame {...props} applicationId="other" />
|
|
359
|
+
</TestWrapper>,
|
|
367
360
|
"when mounted",
|
|
368
361
|
"to satisfy",
|
|
369
|
-
<
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
</Provider>,
|
|
362
|
+
<TestWrapper
|
|
363
|
+
provider={{ store }}
|
|
364
|
+
stylesProvider
|
|
365
|
+
muiThemeProvider
|
|
366
|
+
intlProvider={{ messages }}
|
|
367
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
368
|
+
>
|
|
369
|
+
<div>
|
|
370
|
+
<div>
|
|
371
|
+
<div>
|
|
372
|
+
<ApplicationSelector {...props} />
|
|
373
|
+
<div>
|
|
374
|
+
<img />
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
<Ignore />
|
|
378
|
+
<a>Help</a>
|
|
379
|
+
</div>
|
|
380
|
+
<div>
|
|
381
|
+
<MenuToggle />
|
|
382
|
+
<Ignore />
|
|
383
|
+
<Ignore />
|
|
384
|
+
<Ignore />
|
|
385
|
+
<Logo />
|
|
386
|
+
</div>
|
|
387
|
+
<div>
|
|
388
|
+
<ScopeBar name="Test 1" />
|
|
389
|
+
<TestComp1 key="1" />
|
|
390
|
+
<TestComp2 key="2" />
|
|
391
|
+
<TestComp3 key="3" />
|
|
392
|
+
</div>
|
|
393
|
+
<LoadingScreen />
|
|
394
|
+
</div>
|
|
395
|
+
</TestWrapper>,
|
|
404
396
|
);
|
|
405
397
|
|
|
406
398
|
expect(document.title, "to equal", "other");
|
|
@@ -415,52 +407,51 @@ describe("AppFrame", () => {
|
|
|
415
407
|
props.children = [<TestComp1 key="1" />, <TestComp2 key="2" />, <TestComp3 key="3" />];
|
|
416
408
|
state = state.setIn(["applications", "list"], Immutable.fromJS([]));
|
|
417
409
|
expect(
|
|
418
|
-
<
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
</
|
|
410
|
+
<TestWrapper
|
|
411
|
+
provider={{ store }}
|
|
412
|
+
stylesProvider
|
|
413
|
+
muiThemeProvider
|
|
414
|
+
intlProvider={{ messages }}
|
|
415
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
416
|
+
>
|
|
417
|
+
<AppFrame {...props} applicationId="other" />
|
|
418
|
+
</TestWrapper>,
|
|
427
419
|
"when mounted",
|
|
428
420
|
"to satisfy",
|
|
429
|
-
<
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
</Provider>,
|
|
421
|
+
<TestWrapper
|
|
422
|
+
provider={{ store }}
|
|
423
|
+
stylesProvider
|
|
424
|
+
muiThemeProvider
|
|
425
|
+
intlProvider={{ messages }}
|
|
426
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
427
|
+
>
|
|
428
|
+
<div>
|
|
429
|
+
<div>
|
|
430
|
+
<div>
|
|
431
|
+
<ApplicationSelector {...props} />
|
|
432
|
+
<div>
|
|
433
|
+
<img />
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
<Ignore />
|
|
437
|
+
<a>Help</a>
|
|
438
|
+
</div>
|
|
439
|
+
<div>
|
|
440
|
+
<MenuToggle />
|
|
441
|
+
<Ignore />
|
|
442
|
+
<Ignore />
|
|
443
|
+
<Ignore />
|
|
444
|
+
<Logo />
|
|
445
|
+
</div>
|
|
446
|
+
<div>
|
|
447
|
+
<ScopeBar name="Test 1" />
|
|
448
|
+
<TestComp1 key="1" />
|
|
449
|
+
<TestComp2 key="2" />
|
|
450
|
+
<TestComp3 key="3" />
|
|
451
|
+
</div>
|
|
452
|
+
<LoadingScreen />
|
|
453
|
+
</div>
|
|
454
|
+
</TestWrapper>,
|
|
464
455
|
);
|
|
465
456
|
|
|
466
457
|
expect(document.title, "to equal", "other");
|
|
@@ -474,52 +465,52 @@ describe("AppFrame", () => {
|
|
|
474
465
|
];
|
|
475
466
|
props.children = [<TestComp1 key="1" />, <TestComp2 key="2" />, <TestComp3 key="3" />];
|
|
476
467
|
return expect(
|
|
477
|
-
<
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
</
|
|
468
|
+
<TestWrapper
|
|
469
|
+
provider={{ store }}
|
|
470
|
+
stylesProvider
|
|
471
|
+
muiThemeProvider
|
|
472
|
+
intlProvider={{ messages }}
|
|
473
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
474
|
+
>
|
|
475
|
+
<AppFrame noScope {...props} />
|
|
476
|
+
</TestWrapper>,
|
|
486
477
|
"when mounted",
|
|
487
478
|
"to satisfy",
|
|
488
|
-
<
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
<
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
</
|
|
522
|
-
</
|
|
479
|
+
<TestWrapper
|
|
480
|
+
provider={{ store }}
|
|
481
|
+
stylesProvider
|
|
482
|
+
muiThemeProvider
|
|
483
|
+
intlProvider={{ messages }}
|
|
484
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
485
|
+
>
|
|
486
|
+
<div>
|
|
487
|
+
<div>
|
|
488
|
+
<div>
|
|
489
|
+
<ApplicationSelector {...props} />
|
|
490
|
+
<div>
|
|
491
|
+
<img />
|
|
492
|
+
Marketing Legacy
|
|
493
|
+
</div>
|
|
494
|
+
</div>
|
|
495
|
+
<Ignore />
|
|
496
|
+
<a>Help</a>
|
|
497
|
+
</div>
|
|
498
|
+
<div>
|
|
499
|
+
<MenuToggle />
|
|
500
|
+
<Ignore />
|
|
501
|
+
<Ignore />
|
|
502
|
+
<Ignore />
|
|
503
|
+
<Logo />
|
|
504
|
+
</div>
|
|
505
|
+
<div>
|
|
506
|
+
<BarWrapper />
|
|
507
|
+
<TestComp1 />
|
|
508
|
+
<TestComp2 />
|
|
509
|
+
<TestComp3 />
|
|
510
|
+
</div>
|
|
511
|
+
<LoadingScreen />
|
|
512
|
+
</div>
|
|
513
|
+
</TestWrapper>,
|
|
523
514
|
);
|
|
524
515
|
});
|
|
525
516
|
|
|
@@ -532,166 +523,184 @@ describe("AppFrame", () => {
|
|
|
532
523
|
];
|
|
533
524
|
props.children = [<TestComp1 key="1" />, <TestComp2 key="2" />, <TestComp3 key="3" />];
|
|
534
525
|
return expect(
|
|
535
|
-
<
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
</
|
|
526
|
+
<TestWrapper
|
|
527
|
+
provider={{ store }}
|
|
528
|
+
stylesProvider
|
|
529
|
+
muiThemeProvider
|
|
530
|
+
intlProvider={{ messages }}
|
|
531
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
532
|
+
>
|
|
533
|
+
<AppFrame {...props} />
|
|
534
|
+
</TestWrapper>,
|
|
544
535
|
"when mounted",
|
|
545
536
|
"to satisfy",
|
|
546
|
-
<
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
537
|
+
<TestWrapper
|
|
538
|
+
provider={{ store }}
|
|
539
|
+
stylesProvider
|
|
540
|
+
muiThemeProvider
|
|
541
|
+
intlProvider={{ messages }}
|
|
542
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
543
|
+
>
|
|
544
|
+
<div>
|
|
545
|
+
<Ignore />
|
|
546
|
+
<Ignore />
|
|
547
|
+
<Ignore />
|
|
548
|
+
<Ignore />
|
|
549
|
+
</div>
|
|
550
|
+
</TestWrapper>,
|
|
558
551
|
);
|
|
559
552
|
});
|
|
560
553
|
|
|
561
554
|
it("provides open flag, toggle and reset functions", () => {
|
|
562
555
|
const element = mount(
|
|
563
|
-
<
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
</
|
|
556
|
+
<TestWrapper
|
|
557
|
+
provider={{ store }}
|
|
558
|
+
stylesProvider
|
|
559
|
+
muiThemeProvider
|
|
560
|
+
intlProvider={{ messages }}
|
|
561
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
562
|
+
>
|
|
563
|
+
<AppFrame {...props} />
|
|
564
|
+
</TestWrapper>,
|
|
572
565
|
);
|
|
573
566
|
simulate(element, {
|
|
574
567
|
type: "click",
|
|
575
|
-
target:
|
|
568
|
+
target: "#sidebarMenuToggle",
|
|
576
569
|
});
|
|
577
570
|
expect(
|
|
578
571
|
element,
|
|
579
572
|
"to satisfy",
|
|
580
|
-
<
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
<
|
|
596
|
-
</
|
|
597
|
-
|
|
598
|
-
|
|
573
|
+
<TestWrapper
|
|
574
|
+
provider={{ store }}
|
|
575
|
+
stylesProvider
|
|
576
|
+
muiThemeProvider
|
|
577
|
+
intlProvider={{ messages }}
|
|
578
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
579
|
+
>
|
|
580
|
+
<div>
|
|
581
|
+
<div>
|
|
582
|
+
<Ignore />
|
|
583
|
+
<Ignore />
|
|
584
|
+
<Ignore />
|
|
585
|
+
</div>
|
|
586
|
+
<div>
|
|
587
|
+
<MenuToggle open />
|
|
588
|
+
<Logo />
|
|
589
|
+
</div>
|
|
590
|
+
<div>
|
|
591
|
+
<Ignore />
|
|
592
|
+
</div>
|
|
593
|
+
<LoadingScreen />
|
|
594
|
+
</div>
|
|
595
|
+
</TestWrapper>,
|
|
599
596
|
);
|
|
600
597
|
simulate(element, {
|
|
601
598
|
type: "click",
|
|
602
|
-
target:
|
|
599
|
+
target: '[data-test-id="wrapper"]',
|
|
603
600
|
});
|
|
604
601
|
expect(
|
|
605
602
|
element,
|
|
606
603
|
"to satisfy",
|
|
607
|
-
<
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
<
|
|
623
|
-
</
|
|
624
|
-
|
|
625
|
-
|
|
604
|
+
<TestWrapper
|
|
605
|
+
provider={{ store }}
|
|
606
|
+
stylesProvider
|
|
607
|
+
muiThemeProvider
|
|
608
|
+
intlProvider={{ messages }}
|
|
609
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
610
|
+
>
|
|
611
|
+
<div>
|
|
612
|
+
<div>
|
|
613
|
+
<Ignore />
|
|
614
|
+
<Ignore />
|
|
615
|
+
<Ignore />
|
|
616
|
+
</div>
|
|
617
|
+
<div>
|
|
618
|
+
<MenuToggle />
|
|
619
|
+
<Logo />
|
|
620
|
+
</div>
|
|
621
|
+
<div>
|
|
622
|
+
<Ignore />
|
|
623
|
+
</div>
|
|
624
|
+
<LoadingScreen />
|
|
625
|
+
</div>
|
|
626
|
+
</TestWrapper>,
|
|
626
627
|
);
|
|
627
628
|
simulate(element, {
|
|
628
629
|
type: "click",
|
|
629
|
-
target:
|
|
630
|
+
target: "#sidebarMenuToggle",
|
|
630
631
|
});
|
|
631
632
|
expect(
|
|
632
633
|
element,
|
|
633
634
|
"to satisfy",
|
|
634
|
-
<
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
<
|
|
650
|
-
</
|
|
651
|
-
|
|
652
|
-
|
|
635
|
+
<TestWrapper
|
|
636
|
+
provider={{ store }}
|
|
637
|
+
stylesProvider
|
|
638
|
+
muiThemeProvider
|
|
639
|
+
intlProvider={{ messages }}
|
|
640
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
641
|
+
>
|
|
642
|
+
<div>
|
|
643
|
+
<div>
|
|
644
|
+
<Ignore />
|
|
645
|
+
<Ignore />
|
|
646
|
+
<Ignore />
|
|
647
|
+
</div>
|
|
648
|
+
<div>
|
|
649
|
+
<MenuToggle open />
|
|
650
|
+
<Logo />
|
|
651
|
+
</div>
|
|
652
|
+
<div>
|
|
653
|
+
<Ignore />
|
|
654
|
+
</div>
|
|
655
|
+
<LoadingScreen />
|
|
656
|
+
</div>
|
|
657
|
+
</TestWrapper>,
|
|
653
658
|
);
|
|
654
659
|
simulate(element, {
|
|
655
660
|
type: "click",
|
|
656
|
-
target:
|
|
661
|
+
target: '[data-test-id="viewport"]',
|
|
657
662
|
});
|
|
658
663
|
expect(
|
|
659
664
|
element,
|
|
660
665
|
"to satisfy",
|
|
661
|
-
<
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
<
|
|
677
|
-
</
|
|
678
|
-
|
|
679
|
-
|
|
666
|
+
<TestWrapper
|
|
667
|
+
provider={{ store }}
|
|
668
|
+
stylesProvider
|
|
669
|
+
muiThemeProvider
|
|
670
|
+
intlProvider={{ messages }}
|
|
671
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
672
|
+
>
|
|
673
|
+
<div>
|
|
674
|
+
<div>
|
|
675
|
+
<Ignore />
|
|
676
|
+
<Ignore />
|
|
677
|
+
<Ignore />
|
|
678
|
+
</div>
|
|
679
|
+
<div>
|
|
680
|
+
<MenuToggle />
|
|
681
|
+
<Logo />
|
|
682
|
+
</div>
|
|
683
|
+
<div>
|
|
684
|
+
<Ignore />
|
|
685
|
+
</div>
|
|
686
|
+
<LoadingScreen />
|
|
687
|
+
</div>
|
|
688
|
+
</TestWrapper>,
|
|
680
689
|
);
|
|
681
690
|
});
|
|
682
691
|
|
|
683
692
|
it("loads applications if not found", () => {
|
|
684
693
|
state = state.setIn(["applications", "list"], Immutable.List());
|
|
685
694
|
return expect(
|
|
686
|
-
<
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
</
|
|
695
|
+
<TestWrapper
|
|
696
|
+
provider={{ store }}
|
|
697
|
+
stylesProvider
|
|
698
|
+
muiThemeProvider
|
|
699
|
+
intlProvider={{ messages }}
|
|
700
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
701
|
+
>
|
|
702
|
+
<AppFrame {...props} />
|
|
703
|
+
</TestWrapper>,
|
|
695
704
|
"when mounted",
|
|
696
705
|
"to be truthy",
|
|
697
706
|
).then(() =>
|
|
@@ -714,15 +723,15 @@ describe("AppFrame", () => {
|
|
|
714
723
|
it("loads version info if no help url yet", () => {
|
|
715
724
|
state = state.setIn(["versionInfo", "defaultHelpUrl"], null);
|
|
716
725
|
return expect(
|
|
717
|
-
<
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
</
|
|
726
|
+
<TestWrapper
|
|
727
|
+
provider={{ store }}
|
|
728
|
+
stylesProvider
|
|
729
|
+
muiThemeProvider
|
|
730
|
+
intlProvider={{ messages }}
|
|
731
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
732
|
+
>
|
|
733
|
+
<AppFrame {...props} />
|
|
734
|
+
</TestWrapper>,
|
|
726
735
|
"when mounted",
|
|
727
736
|
"to be truthy",
|
|
728
737
|
).then(() =>
|
|
@@ -760,56 +769,54 @@ describe("AppFrame", () => {
|
|
|
760
769
|
const actions = [{ label: sharedMessages.refresh, handler: refreshCallback, isPrimary: true }];
|
|
761
770
|
|
|
762
771
|
expect(
|
|
763
|
-
<
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
</
|
|
772
|
+
<TestWrapper
|
|
773
|
+
provider={{ store }}
|
|
774
|
+
stylesProvider
|
|
775
|
+
muiThemeProvider
|
|
776
|
+
intlProvider={{ messages }}
|
|
777
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
778
|
+
>
|
|
779
|
+
<AppFrame {...props} />
|
|
780
|
+
</TestWrapper>,
|
|
772
781
|
"when mounted",
|
|
773
782
|
"to satisfy",
|
|
774
|
-
<
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
</ThemeProvider>
|
|
812
|
-
</Provider>,
|
|
783
|
+
<TestWrapper
|
|
784
|
+
provider={{ store }}
|
|
785
|
+
stylesProvider
|
|
786
|
+
muiThemeProvider
|
|
787
|
+
intlProvider={{ messages }}
|
|
788
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
789
|
+
>
|
|
790
|
+
<div>
|
|
791
|
+
<ActionModal open={true} title={title} message={message} actions={actions} />
|
|
792
|
+
<div>
|
|
793
|
+
<div>
|
|
794
|
+
<ApplicationSelector {...props} />
|
|
795
|
+
<div>
|
|
796
|
+
<img />
|
|
797
|
+
Marketing Legacy
|
|
798
|
+
</div>
|
|
799
|
+
</div>
|
|
800
|
+
<Ignore />
|
|
801
|
+
<a>Help</a>
|
|
802
|
+
</div>
|
|
803
|
+
<div>
|
|
804
|
+
<MenuToggle />
|
|
805
|
+
<Ignore />
|
|
806
|
+
<Ignore />
|
|
807
|
+
<Ignore />
|
|
808
|
+
<Logo />
|
|
809
|
+
</div>
|
|
810
|
+
<div>
|
|
811
|
+
<ScopeBar name="Test 1" />
|
|
812
|
+
<TestComp1 key="1" />
|
|
813
|
+
<TestComp2 key="2" />
|
|
814
|
+
<TestComp3 key="3" />
|
|
815
|
+
</div>
|
|
816
|
+
<LoadingScreen />
|
|
817
|
+
<Preferences />
|
|
818
|
+
</div>
|
|
819
|
+
</TestWrapper>,
|
|
813
820
|
);
|
|
814
821
|
});
|
|
815
822
|
|
|
@@ -824,15 +831,15 @@ describe("AppFrame", () => {
|
|
|
824
831
|
props.children = [<TestComp1 key="1" />, <TestComp2 key="2" />, <TestComp3 key="3" />];
|
|
825
832
|
|
|
826
833
|
const component = (
|
|
827
|
-
<
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
</
|
|
834
|
+
<TestWrapper
|
|
835
|
+
provider={{ store }}
|
|
836
|
+
stylesProvider
|
|
837
|
+
muiThemeProvider
|
|
838
|
+
intlProvider={{ messages }}
|
|
839
|
+
memoryRouter={{ initialEntries: ["/Foo/bar"] }}
|
|
840
|
+
>
|
|
841
|
+
<AppFrame {...props} />
|
|
842
|
+
</TestWrapper>
|
|
836
843
|
);
|
|
837
844
|
|
|
838
845
|
const mountedComponent = enzymeMount(component);
|
|
@@ -846,31 +853,3 @@ describe("AppFrame", () => {
|
|
|
846
853
|
expect(locationReloadSpy, "was called");
|
|
847
854
|
});
|
|
848
855
|
});
|
|
849
|
-
|
|
850
|
-
describe("ViewPort", () => {
|
|
851
|
-
it("does not translate when closed", () =>
|
|
852
|
-
expect(<ViewPort />, "when mounted", "to have style rules satisfying", "to contain", "width: calc(100% - 50px)"));
|
|
853
|
-
|
|
854
|
-
it("translates to the side when open", () =>
|
|
855
|
-
expect(
|
|
856
|
-
<ViewPort open />,
|
|
857
|
-
"when mounted",
|
|
858
|
-
"to have style rules satisfying",
|
|
859
|
-
"to contain",
|
|
860
|
-
"width: calc(100% - 200px);",
|
|
861
|
-
));
|
|
862
|
-
});
|
|
863
|
-
|
|
864
|
-
describe("Base", () => {
|
|
865
|
-
it("pointer-events should be to default when preferences is hidden", () =>
|
|
866
|
-
expect(<Base />, "when mounted", "to have style rules satisfying", "not to contain", "pointer-events: none;"));
|
|
867
|
-
|
|
868
|
-
it("pointer-events should be none when preferences is shown", () =>
|
|
869
|
-
expect(
|
|
870
|
-
<Base preferencesOpen={true} />,
|
|
871
|
-
"when mounted",
|
|
872
|
-
"to have style rules satisfying",
|
|
873
|
-
"to contain",
|
|
874
|
-
"pointer-events: none;",
|
|
875
|
-
));
|
|
876
|
-
});
|