@hipay/hipay-material-ui 2.3.1-rc4 → 2.3.1-rc5
Sign up to get free protection for your applications and to get access to all the features.
- package/HiAlertModal/HiAlertModal.js +77 -48
- package/HiAlertModal/index.js +15 -1
- package/HiAppBar/HiAppBar.js +63 -34
- package/HiAppBar/index.js +15 -1
- package/HiBadge/HiBadge.js +29 -10
- package/HiBadge/index.js +15 -1
- package/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/HiBreadcrumb/HiStep.js +58 -35
- package/HiBreadcrumb/HiStepConnector.js +58 -33
- package/HiBreadcrumb/HiStepContent.js +47 -26
- package/HiBreadcrumb/HiStepIcon.js +47 -27
- package/HiBreadcrumb/HiStepLabel.js +62 -37
- package/HiBreadcrumb/HiStepper.js +44 -24
- package/HiBreadcrumb/index.js +15 -1
- package/HiButton/HiButton.js +27 -9
- package/HiButton/index.js +13 -2
- package/HiCell/CellAddress.js +39 -21
- package/HiCell/CellDate.js +44 -27
- package/HiCell/CellIcon.js +48 -29
- package/HiCell/CellImage.js +41 -24
- package/HiCell/CellNumeric.js +45 -26
- package/HiCell/CellPinToAction.js +41 -20
- package/HiCell/CellRate.js +56 -33
- package/HiCell/CellSentinel.js +41 -23
- package/HiCell/CellSentinelScore.js +43 -24
- package/HiCell/CellText.js +54 -37
- package/HiCell/CellTextStyled.js +21 -8
- package/HiCell/index.js +79 -9
- package/HiCheckbox/HiCheckbox.js +61 -36
- package/HiCheckbox/index.js +15 -1
- package/HiChip/HiChip.js +44 -24
- package/HiChip/HiChipSwitch.js +73 -47
- package/HiChip/index.js +23 -2
- package/HiColoredLabel/HiColoredLabel.js +52 -28
- package/HiColoredLabel/index.js +15 -1
- package/HiDatePicker/Caption.js +28 -11
- package/HiDatePicker/HiDatePicker.js +131 -101
- package/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/HiDatePicker/HiDateRangePicker.js +168 -139
- package/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/HiDatePicker/ListPicker.js +54 -34
- package/HiDatePicker/NavBar.js +45 -18
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/Overlay.js +35 -18
- package/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/index.js +47 -5
- package/HiDatePicker/Weekday.js +13 -3
- package/HiDatePicker/hiLocaleUtils.js +8 -1
- package/HiDatePicker/index.js +15 -1
- package/HiDatePicker/stylesheet.js +22 -9
- package/HiDotsStepper/HiDot.js +56 -31
- package/HiDotsStepper/HiDotsStepper.js +47 -28
- package/HiDotsStepper/index.js +23 -2
- package/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/HiExpansionPanel/index.js +13 -2
- package/HiForm/HiAddressField.js +46 -29
- package/HiForm/HiEmailField.js +45 -27
- package/HiForm/HiFormControl.js +105 -72
- package/HiForm/HiFormLabel.js +53 -30
- package/HiForm/HiInput.js +89 -62
- package/HiForm/HiPasswordField.js +55 -29
- package/HiForm/HiSearchField.js +43 -28
- package/HiForm/HiSlider.js +64 -41
- package/HiForm/HiTextField.js +46 -29
- package/HiForm/HiUpload.js +76 -53
- package/HiForm/HiUploadField.js +40 -25
- package/HiForm/HiUploadInput.js +84 -56
- package/HiForm/index.js +95 -11
- package/HiIcon/HiIcon.js +44 -22
- package/HiIcon/index.js +15 -1
- package/HiIconButton/HiIconButton.js +40 -18
- package/HiIconButton/index.js +15 -1
- package/HiLoader/HiLoader.js +24 -9
- package/HiLoader/index.js +15 -1
- package/HiMap/HiMap.js +76 -51
- package/HiMap/HiMapExpand.js +64 -39
- package/HiMap/index.js +23 -2
- package/HiNotice/HiKPI.js +56 -33
- package/HiNotice/HiKPINotice.js +21 -7
- package/HiNotice/index.js +23 -2
- package/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/HiPaymentMeans/index.js +15 -1
- package/HiPdfReader/HiPdfReader.js +78 -52
- package/HiPdfReader/index.js +15 -1
- package/HiPin/HiPin.js +30 -9
- package/HiPin/index.js +15 -1
- package/HiRadio/HiRadio.js +24 -7
- package/HiRadio/index.js +15 -1
- package/HiSelect/HiDynamicSelect.js +58 -40
- package/HiSelect/HiDynamicSelectField.js +40 -22
- package/HiSelect/HiNestedSelect.js +85 -55
- package/HiSelect/HiNestedSelectContent.js +72 -46
- package/HiSelect/HiNestedSelectField.js +40 -22
- package/HiSelect/HiSelect.js +161 -123
- package/HiSelect/HiSelectContent.js +104 -73
- package/HiSelect/HiSelectField.js +40 -22
- package/HiSelect/HiSelectInput.js +94 -63
- package/HiSelect/HiSelectMobile.js +54 -35
- package/HiSelect/HiSuggestSelect.js +83 -56
- package/HiSelect/HiSuggestSelectField.js +40 -22
- package/HiSelect/index.js +85 -8
- package/HiSelectableList/HiSelectableList.js +80 -49
- package/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/HiSelectableList/HiSelectableListItem.js +101 -66
- package/HiSelectableList/index.js +31 -3
- package/HiSwitch/HiSwitch.js +45 -20
- package/HiSwitch/HiSwitchState.js +36 -15
- package/HiSwitch/index.js +23 -2
- package/HiTable/HiCellBuilder.js +69 -43
- package/HiTable/HiTable.js +46 -28
- package/HiTable/HiTableBody.js +34 -19
- package/HiTable/HiTableHeader.js +50 -29
- package/HiTable/HiTableRow.js +56 -29
- package/HiTable/constants.js +94 -43
- package/HiTable/index.js +15 -1
- package/es/HiAlertModal/HiAlertModal.js +77 -48
- package/es/HiAlertModal/index.js +15 -1
- package/es/HiAppBar/HiAppBar.js +63 -34
- package/es/HiAppBar/index.js +15 -1
- package/es/HiBadge/HiBadge.js +29 -10
- package/es/HiBadge/index.js +15 -1
- package/es/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/es/HiBreadcrumb/HiStep.js +58 -35
- package/es/HiBreadcrumb/HiStepConnector.js +58 -33
- package/es/HiBreadcrumb/HiStepContent.js +47 -26
- package/es/HiBreadcrumb/HiStepIcon.js +47 -27
- package/es/HiBreadcrumb/HiStepLabel.js +62 -37
- package/es/HiBreadcrumb/HiStepper.js +44 -24
- package/es/HiBreadcrumb/index.js +15 -1
- package/es/HiButton/HiButton.js +27 -9
- package/es/HiButton/index.js +13 -2
- package/es/HiCell/CellAddress.js +39 -21
- package/es/HiCell/CellDate.js +44 -27
- package/es/HiCell/CellIcon.js +48 -29
- package/es/HiCell/CellImage.js +41 -24
- package/es/HiCell/CellNumeric.js +45 -26
- package/es/HiCell/CellPinToAction.js +41 -20
- package/es/HiCell/CellRate.js +56 -33
- package/es/HiCell/CellSentinel.js +41 -23
- package/es/HiCell/CellSentinelScore.js +43 -24
- package/es/HiCell/CellText.js +54 -37
- package/es/HiCell/CellTextStyled.js +21 -8
- package/es/HiCell/index.js +79 -9
- package/es/HiCheckbox/HiCheckbox.js +61 -36
- package/es/HiCheckbox/index.js +15 -1
- package/es/HiChip/HiChip.js +44 -24
- package/es/HiChip/HiChipSwitch.js +73 -47
- package/es/HiChip/index.js +23 -2
- package/es/HiColoredLabel/HiColoredLabel.js +52 -28
- package/es/HiColoredLabel/index.js +15 -1
- package/es/HiDatePicker/Caption.js +28 -11
- package/es/HiDatePicker/HiDatePicker.js +131 -101
- package/es/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/es/HiDatePicker/HiDateRangePicker.js +168 -139
- package/es/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/es/HiDatePicker/ListPicker.js +54 -34
- package/es/HiDatePicker/NavBar.js +45 -18
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/Overlay.js +35 -18
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/index.js +47 -5
- package/es/HiDatePicker/Weekday.js +13 -3
- package/es/HiDatePicker/hiLocaleUtils.js +8 -1
- package/es/HiDatePicker/index.js +15 -1
- package/es/HiDatePicker/stylesheet.js +22 -9
- package/es/HiDotsStepper/HiDot.js +56 -31
- package/es/HiDotsStepper/HiDotsStepper.js +47 -28
- package/es/HiDotsStepper/index.js +23 -2
- package/es/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/es/HiExpansionPanel/index.js +13 -2
- package/es/HiForm/HiAddressField.js +46 -29
- package/es/HiForm/HiEmailField.js +45 -27
- package/es/HiForm/HiFormControl.js +105 -72
- package/es/HiForm/HiFormLabel.js +53 -30
- package/es/HiForm/HiInput.js +89 -62
- package/es/HiForm/HiPasswordField.js +55 -29
- package/es/HiForm/HiSearchField.js +43 -28
- package/es/HiForm/HiSlider.js +64 -41
- package/es/HiForm/HiTextField.js +46 -29
- package/es/HiForm/HiUpload.js +76 -53
- package/es/HiForm/HiUploadField.js +40 -25
- package/es/HiForm/HiUploadInput.js +84 -56
- package/es/HiForm/index.js +95 -11
- package/es/HiIcon/HiIcon.js +44 -22
- package/es/HiIcon/index.js +15 -1
- package/es/HiIconButton/HiIconButton.js +40 -18
- package/es/HiIconButton/index.js +15 -1
- package/es/HiLoader/HiLoader.js +24 -9
- package/es/HiLoader/index.js +15 -1
- package/es/HiMap/HiMap.js +76 -51
- package/es/HiMap/HiMapExpand.js +64 -39
- package/es/HiMap/index.js +23 -2
- package/es/HiNotice/HiKPI.js +56 -33
- package/es/HiNotice/HiKPINotice.js +21 -7
- package/es/HiNotice/index.js +23 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/es/HiPaymentMeans/index.js +15 -1
- package/es/HiPdfReader/HiPdfReader.js +78 -52
- package/es/HiPdfReader/index.js +15 -1
- package/es/HiPin/HiPin.js +30 -9
- package/es/HiPin/index.js +15 -1
- package/es/HiRadio/HiRadio.js +24 -7
- package/es/HiRadio/index.js +15 -1
- package/es/HiSelect/HiDynamicSelect.js +58 -40
- package/es/HiSelect/HiDynamicSelectField.js +40 -22
- package/es/HiSelect/HiNestedSelect.js +85 -55
- package/es/HiSelect/HiNestedSelectContent.js +72 -46
- package/es/HiSelect/HiNestedSelectField.js +40 -22
- package/es/HiSelect/HiSelect.js +161 -123
- package/es/HiSelect/HiSelectContent.js +104 -73
- package/es/HiSelect/HiSelectField.js +40 -22
- package/es/HiSelect/HiSelectInput.js +94 -63
- package/es/HiSelect/HiSelectMobile.js +54 -35
- package/es/HiSelect/HiSuggestSelect.js +83 -56
- package/es/HiSelect/HiSuggestSelectField.js +40 -22
- package/es/HiSelect/index.js +85 -8
- package/es/HiSelectableList/HiSelectableList.js +80 -49
- package/es/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/es/HiSelectableList/HiSelectableListItem.js +101 -66
- package/es/HiSelectableList/index.js +31 -3
- package/es/HiSwitch/HiSwitch.js +45 -20
- package/es/HiSwitch/HiSwitchState.js +36 -15
- package/es/HiSwitch/index.js +23 -2
- package/es/HiTable/HiCellBuilder.js +69 -43
- package/es/HiTable/HiTable.js +46 -28
- package/es/HiTable/HiTableBody.js +34 -19
- package/es/HiTable/HiTableHeader.js +50 -29
- package/es/HiTable/HiTableRow.js +56 -29
- package/es/HiTable/constants.js +94 -43
- package/es/HiTable/index.js +15 -1
- package/es/hi-svg-icons/HiAccount.js +36 -18
- package/es/hi-svg-icons/HiActivity.js +35 -17
- package/es/hi-svg-icons/HiAll.js +42 -22
- package/es/hi-svg-icons/HiBilling.js +36 -18
- package/es/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/es/hi-svg-icons/HiCatalog.js +36 -18
- package/es/hi-svg-icons/HiCustomer.js +36 -18
- package/es/hi-svg-icons/HiDownload.js +25 -11
- package/es/hi-svg-icons/HiFinance.js +36 -18
- package/es/hi-svg-icons/HiPermission.js +35 -17
- package/es/hi-svg-icons/HiRoute.js +36 -18
- package/es/hi-svg-icons/HiSettlement.js +36 -18
- package/es/hi-svg-icons/HiSizeLarge.js +27 -12
- package/es/hi-svg-icons/HiSizeMedium.js +25 -11
- package/es/hi-svg-icons/HiSizeSmall.js +25 -11
- package/es/hi-svg-icons/HiTransaction.js +36 -18
- package/es/hi-svg-icons/HiUser.js +36 -18
- package/es/hi-svg-icons/HiWidget.js +42 -22
- package/es/hi-svg-icons/index.js +151 -18
- package/es/hi-svg-icons/index.text.js +21 -11
- package/es/styleguide/Wrapper.js +36 -19
- package/es/styles/MuiThemeProvider.js +57 -39
- package/es/styles/colorManipulator.js +44 -16
- package/es/styles/createBreakpoints.js +20 -6
- package/es/styles/createGenerateClassName.js +15 -5
- package/es/styles/createMixins.js +19 -8
- package/es/styles/createMuiTheme.js +53 -34
- package/es/styles/createPalette.js +50 -30
- package/es/styles/createStyles.js +8 -1
- package/es/styles/createTypography.js +30 -18
- package/es/styles/getStylesCreator.js +24 -11
- package/es/styles/getThemeProps.js +9 -1
- package/es/styles/index.js +47 -5
- package/es/styles/jssPreset.js +25 -9
- package/es/styles/mergeClasses.js +19 -7
- package/es/styles/shadows.js +8 -1
- package/es/styles/shape.js +8 -1
- package/es/styles/spacing.js +9 -1
- package/es/styles/themeListener.js +18 -5
- package/es/styles/transitions.js +38 -18
- package/es/styles/zIndex.js +8 -1
- package/es/test-utils/createMount.js +22 -11
- package/es/test-utils/createRender.js +19 -8
- package/es/test-utils/createShallow.js +23 -13
- package/es/test-utils/getClasses.js +11 -2
- package/es/test-utils/index.js +47 -5
- package/es/test-utils/until.js +16 -6
- package/es/test-utils/unwrap.js +8 -1
- package/es/theme/palette.js +10 -2
- package/es/theme/typography.js +11 -3
- package/es/theme.js +13 -4
- package/es/transitions/utils.js +13 -2
- package/es/utils/exactProp.js +18 -5
- package/es/utils/helpers.js +55 -18
- package/es/withMobileDialog/index.js +15 -1
- package/es/withMobileDialog/withMobileDialog.js +22 -7
- package/hi-svg-icons/HiAccount.js +36 -18
- package/hi-svg-icons/HiActivity.js +35 -17
- package/hi-svg-icons/HiAll.js +42 -22
- package/hi-svg-icons/HiBilling.js +36 -18
- package/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/hi-svg-icons/HiCatalog.js +36 -18
- package/hi-svg-icons/HiCustomer.js +36 -18
- package/hi-svg-icons/HiDownload.js +25 -11
- package/hi-svg-icons/HiFinance.js +36 -18
- package/hi-svg-icons/HiPermission.js +35 -17
- package/hi-svg-icons/HiRoute.js +36 -18
- package/hi-svg-icons/HiSettlement.js +36 -18
- package/hi-svg-icons/HiSizeLarge.js +27 -12
- package/hi-svg-icons/HiSizeMedium.js +25 -11
- package/hi-svg-icons/HiSizeSmall.js +25 -11
- package/hi-svg-icons/HiTransaction.js +36 -18
- package/hi-svg-icons/HiUser.js +36 -18
- package/hi-svg-icons/HiWidget.js +42 -22
- package/hi-svg-icons/index.js +151 -18
- package/hi-svg-icons/index.text.js +21 -11
- package/package.json +2 -1
- package/styleguide/Wrapper.js +36 -19
- package/styles/MuiThemeProvider.js +57 -39
- package/styles/colorManipulator.js +44 -16
- package/styles/createBreakpoints.js +20 -6
- package/styles/createGenerateClassName.js +15 -5
- package/styles/createMixins.js +19 -8
- package/styles/createMuiTheme.js +53 -34
- package/styles/createPalette.js +50 -30
- package/styles/createStyles.js +8 -1
- package/styles/createTypography.js +30 -18
- package/styles/getStylesCreator.js +24 -11
- package/styles/getThemeProps.js +9 -1
- package/styles/index.js +47 -5
- package/styles/jssPreset.js +25 -9
- package/styles/mergeClasses.js +19 -7
- package/styles/shadows.js +8 -1
- package/styles/shape.js +8 -1
- package/styles/spacing.js +9 -1
- package/styles/themeListener.js +18 -5
- package/styles/transitions.js +38 -18
- package/styles/zIndex.js +8 -1
- package/test-utils/createMount.js +22 -11
- package/test-utils/createRender.js +19 -8
- package/test-utils/createShallow.js +23 -13
- package/test-utils/getClasses.js +11 -2
- package/test-utils/index.js +47 -5
- package/test-utils/until.js +16 -6
- package/test-utils/unwrap.js +8 -1
- package/theme/palette.js +10 -2
- package/theme/typography.js +11 -3
- package/theme.js +13 -4
- package/transitions/utils.js +13 -2
- package/utils/exactProp.js +18 -5
- package/utils/helpers.js +55 -18
- package/withMobileDialog/index.js +15 -1
- package/withMobileDialog/withMobileDialog.js +22 -7
- package/App.test.js +0 -8
- package/HiAlertModal/HiAlertModal.test.js +0 -189
- package/HiBadge/HiBadge.test.js +0 -49
- package/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/HiBreadcrumb/HiStep.test.js +0 -47
- package/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/HiBreadcrumb/HiStepper.test.js +0 -33
- package/HiCell/CellAddress.test.js +0 -75
- package/HiCell/CellDate.test.js +0 -173
- package/HiCell/CellIcon.test.js +0 -57
- package/HiCell/CellImage.test.js +0 -49
- package/HiCell/CellNumeric.test.js +0 -46
- package/HiCell/CellRate.test.js +0 -73
- package/HiCell/CellSentinel.test.js +0 -48
- package/HiCell/CellText.test.js +0 -76
- package/HiCheckbox/HiCheckbox.test.js +0 -55
- package/HiChip/HiChip.test.js +0 -136
- package/HiChip/HiChipSwitch.test.js +0 -99
- package/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/HiDatePicker/Caption.test.js +0 -65
- package/HiDatePicker/HiDatePicker.test.js +0 -370
- package/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/HiDatePicker/ListPicker.test.js +0 -53
- package/HiDatePicker/NavBar.test.js +0 -39
- package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/HiDotsStepper/HiDot.test.js +0 -55
- package/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/HiForm/HiAddressField.test.js +0 -79
- package/HiForm/HiEmailField.test.js +0 -19
- package/HiForm/HiFormControl.test.js +0 -195
- package/HiForm/HiFormLabel.test.js +0 -66
- package/HiForm/HiInput.test.js +0 -202
- package/HiForm/HiPasswordField.test.js +0 -60
- package/HiForm/HiSearchField.test.js +0 -193
- package/HiForm/HiSlider.test.js +0 -99
- package/HiForm/HiTextField.test.js +0 -254
- package/HiForm/HiUpload.test.js +0 -241
- package/HiForm/HiUploadField.test.js +0 -55
- package/HiForm/HiUploadInput.test.js +0 -148
- package/HiIconButton/HiIconButton.test.js +0 -69
- package/HiLoader/HiLoader.test.js +0 -18
- package/HiMap/HiMap.test.js +0 -29
- package/HiMap/HiMapExpand.test.js +0 -48
- package/HiNotice/HiKPI.test.js +0 -171
- package/HiNotice/HiKPINotice.test.js +0 -88
- package/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/HiPin/HiPin.test.js +0 -61
- package/HiRadio/HiRadio.test.js +0 -57
- package/HiSelect/HiSelect.test.js +0 -1092
- package/HiSelect/HiSelectInput.test.js +0 -21
- package/HiSelectableList/HiSelectableList.test.js +0 -173
- package/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/HiSwitch/HiSwitch.test.js +0 -41
- package/HiSwitch/HiSwitchState.test.js +0 -76
- package/HiTable/HiTable.test.js +0 -29
- package/es/App.test.js +0 -8
- package/es/HiAlertModal/HiAlertModal.test.js +0 -189
- package/es/HiBadge/HiBadge.test.js +0 -49
- package/es/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/es/HiBreadcrumb/HiStep.test.js +0 -47
- package/es/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/es/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/es/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/es/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/es/HiBreadcrumb/HiStepper.test.js +0 -33
- package/es/HiCell/CellAddress.test.js +0 -75
- package/es/HiCell/CellDate.test.js +0 -173
- package/es/HiCell/CellIcon.test.js +0 -57
- package/es/HiCell/CellImage.test.js +0 -49
- package/es/HiCell/CellNumeric.test.js +0 -46
- package/es/HiCell/CellRate.test.js +0 -73
- package/es/HiCell/CellSentinel.test.js +0 -48
- package/es/HiCell/CellText.test.js +0 -76
- package/es/HiCheckbox/HiCheckbox.test.js +0 -55
- package/es/HiChip/HiChip.test.js +0 -136
- package/es/HiChip/HiChipSwitch.test.js +0 -99
- package/es/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/es/HiDatePicker/Caption.test.js +0 -65
- package/es/HiDatePicker/HiDatePicker.test.js +0 -370
- package/es/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/es/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/es/HiDatePicker/ListPicker.test.js +0 -53
- package/es/HiDatePicker/NavBar.test.js +0 -39
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/es/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/es/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/es/HiDotsStepper/HiDot.test.js +0 -55
- package/es/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/es/HiForm/HiAddressField.test.js +0 -79
- package/es/HiForm/HiEmailField.test.js +0 -19
- package/es/HiForm/HiFormControl.test.js +0 -195
- package/es/HiForm/HiFormLabel.test.js +0 -66
- package/es/HiForm/HiInput.test.js +0 -202
- package/es/HiForm/HiPasswordField.test.js +0 -60
- package/es/HiForm/HiSearchField.test.js +0 -193
- package/es/HiForm/HiSlider.test.js +0 -99
- package/es/HiForm/HiTextField.test.js +0 -254
- package/es/HiForm/HiUpload.test.js +0 -241
- package/es/HiForm/HiUploadField.test.js +0 -55
- package/es/HiForm/HiUploadInput.test.js +0 -148
- package/es/HiIconButton/HiIconButton.test.js +0 -69
- package/es/HiLoader/HiLoader.test.js +0 -18
- package/es/HiMap/HiMap.test.js +0 -29
- package/es/HiMap/HiMapExpand.test.js +0 -48
- package/es/HiNotice/HiKPI.test.js +0 -171
- package/es/HiNotice/HiKPINotice.test.js +0 -88
- package/es/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/es/HiPin/HiPin.test.js +0 -61
- package/es/HiRadio/HiRadio.test.js +0 -57
- package/es/HiSelect/HiSelect.test.js +0 -1092
- package/es/HiSelect/HiSelectInput.test.js +0 -21
- package/es/HiSelectableList/HiSelectableList.test.js +0 -173
- package/es/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/es/HiSwitch/HiSwitch.test.js +0 -41
- package/es/HiSwitch/HiSwitchState.test.js +0 -76
- package/es/HiTable/HiTable.test.js +0 -29
- package/es/styles/colorManipulator.test.js +0 -242
- package/es/styles/createBreakpoints.test.js +0 -48
- package/es/styles/createGenerateClassName.test.js +0 -141
- package/es/styles/createMixins.test.js +0 -24
- package/es/styles/createMuiTheme.test.js +0 -67
- package/es/styles/createPalette.test.js +0 -159
- package/es/styles/createStyles.test.js +0 -8
- package/es/styles/createTypography.test.js +0 -60
- package/es/styles/getStylesCreator.test.js +0 -92
- package/es/styles/getThemeProps.test.js +0 -39
- package/es/styles/themeListener.test.js +0 -26
- package/es/styles/transitions.test.js +0 -208
- package/es/test-utils/until.test.js +0 -157
- package/es/withMobileDialog/withMobileDialog.test.js +0 -67
- package/styles/colorManipulator.test.js +0 -242
- package/styles/createBreakpoints.test.js +0 -48
- package/styles/createGenerateClassName.test.js +0 -141
- package/styles/createMixins.test.js +0 -24
- package/styles/createMuiTheme.test.js +0 -67
- package/styles/createPalette.test.js +0 -159
- package/styles/createStyles.test.js +0 -8
- package/styles/createTypography.test.js +0 -60
- package/styles/getStylesCreator.test.js +0 -92
- package/styles/getThemeProps.test.js +0 -39
- package/styles/themeListener.test.js +0 -26
- package/styles/transitions.test.js +0 -208
- package/test-utils/until.test.js +0 -157
- package/withMobileDialog/withMobileDialog.test.js +0 -67
@@ -1,44 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { spy } from 'sinon';
|
4
|
-
import { createShallow } from '../test-utils';
|
5
|
-
import HiBreadcrumb from './HiBreadcrumb';
|
6
|
-
import HiStep from './HiStep';
|
7
|
-
describe('<HiBreadcrumb />', function () {
|
8
|
-
var shallow;
|
9
|
-
var wrapper;
|
10
|
-
var handleStep = spy();
|
11
|
-
before(function () {
|
12
|
-
shallow = createShallow();
|
13
|
-
wrapper = shallow(React.createElement(HiBreadcrumb, {
|
14
|
-
activeStep: 0,
|
15
|
-
steps: [{
|
16
|
-
id: 0,
|
17
|
-
status: 'unreviewed',
|
18
|
-
label: 'test',
|
19
|
-
notificationNumber: 2
|
20
|
-
}, {
|
21
|
-
id: 1,
|
22
|
-
status: 'validated',
|
23
|
-
label: 'test',
|
24
|
-
notificationNumber: 0
|
25
|
-
}, {
|
26
|
-
id: 2,
|
27
|
-
status: 'active',
|
28
|
-
label: 'test',
|
29
|
-
notificationNumber: 1
|
30
|
-
}],
|
31
|
-
handleStep: handleStep
|
32
|
-
}));
|
33
|
-
});
|
34
|
-
it('should render a HiStepper component', function () {
|
35
|
-
assert.strictEqual(wrapper.dive().name(), 'HiStepper');
|
36
|
-
});
|
37
|
-
it('should check its props', function () {
|
38
|
-
assert.strictEqual(wrapper.find(HiStep).length, 3);
|
39
|
-
});
|
40
|
-
it('should have its callbacks checked', function () {
|
41
|
-
wrapper.dive().find(HiStep).at(1).props().onClick();
|
42
|
-
assert.strictEqual(handleStep.calledOnce, true);
|
43
|
-
});
|
44
|
-
});
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow } from '../test-utils';
|
4
|
-
import HiStep from './HiStep';
|
5
|
-
describe('<HiStep />', function () {
|
6
|
-
var shallow;
|
7
|
-
before(function () {
|
8
|
-
shallow = createShallow();
|
9
|
-
});
|
10
|
-
it('should render a HiStep component', function () {
|
11
|
-
var wrapper = shallow(React.createElement(HiStep, {
|
12
|
-
index: 0
|
13
|
-
}));
|
14
|
-
assert.strictEqual(wrapper.name(), 'HiStep');
|
15
|
-
});
|
16
|
-
it('should render a connector', function () {
|
17
|
-
var wrapper = shallow(React.createElement(HiStep, {
|
18
|
-
index: 0
|
19
|
-
}));
|
20
|
-
assert.strictEqual(wrapper.dive().find('WithStyles(HiStepConnector)').dive().name(), 'HiStepConnector');
|
21
|
-
});
|
22
|
-
it("should not render a connector if it's the last step", function () {
|
23
|
-
var wrapper = shallow(React.createElement(HiStep, {
|
24
|
-
isLast: true,
|
25
|
-
index: 0
|
26
|
-
}));
|
27
|
-
assert.strictEqual(wrapper.dive().find('WithStyles(HiStepConnector)').length, 0);
|
28
|
-
});
|
29
|
-
it("should render some content if it's the last step and it's a front-light breadcrumb", function () {
|
30
|
-
var wrapper = shallow(React.createElement(HiStep, {
|
31
|
-
isLast: true,
|
32
|
-
index: 0,
|
33
|
-
type: "front-light",
|
34
|
-
content: React.createElement("div", null, "Some content"),
|
35
|
-
active: true
|
36
|
-
}));
|
37
|
-
assert.strictEqual(wrapper.dive().childAt(0).dive().name(), 'HiStepContent');
|
38
|
-
});
|
39
|
-
it('should render its children', function () {
|
40
|
-
var wrapper = shallow(React.createElement(HiStep, {
|
41
|
-
index: 0
|
42
|
-
}, React.createElement("div", {
|
43
|
-
id: "test"
|
44
|
-
}, "label test")));
|
45
|
-
assert.strictEqual(wrapper.dive().find('div#test').props().active, false);
|
46
|
-
});
|
47
|
-
});
|
@@ -1,113 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow } from '../test-utils';
|
4
|
-
import HiStepConnector from './HiStepConnector';
|
5
|
-
describe('<HiStepConnector />', function () {
|
6
|
-
var shallow;
|
7
|
-
var wrapper;
|
8
|
-
var steps = [{
|
9
|
-
id: 0,
|
10
|
-
status: 'validated',
|
11
|
-
label: 'Informations légales'
|
12
|
-
}, {
|
13
|
-
id: 1,
|
14
|
-
status: 'validated',
|
15
|
-
label: 'Les bénéficiaires effectifs'
|
16
|
-
}, {
|
17
|
-
id: 2,
|
18
|
-
status: 'validated',
|
19
|
-
label: 'Les mandataires'
|
20
|
-
}, {
|
21
|
-
id: 3,
|
22
|
-
status: 'active',
|
23
|
-
label: 'Autres documents'
|
24
|
-
}, {
|
25
|
-
id: 4,
|
26
|
-
status: 'unreviewed',
|
27
|
-
label: 'Mise en place du compte'
|
28
|
-
}];
|
29
|
-
before(function () {
|
30
|
-
shallow = createShallow();
|
31
|
-
});
|
32
|
-
describe('with a steps prop', function () {
|
33
|
-
before(function () {
|
34
|
-
wrapper = shallow(React.createElement(HiStepConnector, {
|
35
|
-
steps: steps
|
36
|
-
}));
|
37
|
-
});
|
38
|
-
it('should render a HiStepConnector component', function () {
|
39
|
-
assert.strictEqual(wrapper.name(), 'HiStepConnector');
|
40
|
-
});
|
41
|
-
it('should render a div', function () {
|
42
|
-
assert.strictEqual(wrapper.dive().name(), 'div');
|
43
|
-
});
|
44
|
-
it('should have its validConnector prop set correctly', function () {
|
45
|
-
assert.strictEqual(wrapper.props().validConnector, false);
|
46
|
-
});
|
47
|
-
it('should have its type prop set correctly', function () {
|
48
|
-
assert.strictEqual(wrapper.props().type, 'back');
|
49
|
-
});
|
50
|
-
it('should have its active prop set correctly', function () {
|
51
|
-
assert.strictEqual(wrapper.props().active, false);
|
52
|
-
});
|
53
|
-
});
|
54
|
-
describe('with a validConnector prop', function () {
|
55
|
-
before(function () {
|
56
|
-
wrapper = shallow(React.createElement(HiStepConnector, {
|
57
|
-
validConnector: true
|
58
|
-
}));
|
59
|
-
});
|
60
|
-
it('should have its validConnector prop set correctly', function () {
|
61
|
-
assert.strictEqual(wrapper.props().validConnector, true);
|
62
|
-
});
|
63
|
-
});
|
64
|
-
describe('with a type prop', function () {
|
65
|
-
before(function () {
|
66
|
-
wrapper = shallow(React.createElement(HiStepConnector, {
|
67
|
-
type: "front-dark"
|
68
|
-
}));
|
69
|
-
});
|
70
|
-
it('should have its type prop set correctly', function () {
|
71
|
-
assert.strictEqual(wrapper.props().type, 'front-dark');
|
72
|
-
});
|
73
|
-
});
|
74
|
-
describe('with an active prop', function () {
|
75
|
-
before(function () {
|
76
|
-
wrapper = shallow(React.createElement(HiStepConnector, {
|
77
|
-
active: true
|
78
|
-
}));
|
79
|
-
});
|
80
|
-
it('should have its type prop set correctly', function () {
|
81
|
-
assert.strictEqual(wrapper.props().active, true);
|
82
|
-
});
|
83
|
-
});
|
84
|
-
describe('with an active prop and a type prop', function () {
|
85
|
-
before(function () {
|
86
|
-
wrapper = shallow(React.createElement(HiStepConnector, {
|
87
|
-
steps: steps,
|
88
|
-
type: "front-dark",
|
89
|
-
active: true
|
90
|
-
}));
|
91
|
-
}); // Pour ce test, on vérifie que la hauteur du connector est correctement calculée.
|
92
|
-
// Elle est fonction du nombre d'étapes, est le polynome permettant de la calculer est le suivant :
|
93
|
-
// height = screenHeight - 58 * (nbSteps - 1), ce qui pour notre cas de test où nbSteps = 5 et la hauteur de l'écran est initialisée à 768 donne 310
|
94
|
-
|
95
|
-
it('should have its length calculated correctly', function () {
|
96
|
-
assert.strictEqual(wrapper.dive().find('span').props().style.height, 310);
|
97
|
-
});
|
98
|
-
});
|
99
|
-
describe('with content attached, in the case of a front-light breadcrumb', function () {
|
100
|
-
before(function () {
|
101
|
-
var content = React.createElement("span", null, "Test");
|
102
|
-
wrapper = shallow(React.createElement(HiStepConnector, {
|
103
|
-
steps: steps,
|
104
|
-
type: "front-light",
|
105
|
-
active: true,
|
106
|
-
content: content
|
107
|
-
}));
|
108
|
-
});
|
109
|
-
it('should render a HiStepContent component with content in it', function () {
|
110
|
-
assert.strictEqual(wrapper.dive().childAt(1).dive().name(), 'HiStepContent');
|
111
|
-
});
|
112
|
-
});
|
113
|
-
});
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow } from '../test-utils';
|
4
|
-
import HiStepContent from './HiStepContent';
|
5
|
-
describe('<HiStepContent />', function () {
|
6
|
-
var shallow;
|
7
|
-
var wrapper;
|
8
|
-
before(function () {
|
9
|
-
shallow = createShallow();
|
10
|
-
});
|
11
|
-
describe('with default values', function () {
|
12
|
-
before(function () {
|
13
|
-
wrapper = shallow(React.createElement(HiStepContent, null));
|
14
|
-
});
|
15
|
-
it('should render a HiStepContent component', function () {
|
16
|
-
assert.strictEqual(wrapper.name(), 'HiStepContent');
|
17
|
-
});
|
18
|
-
it('should render a Paper component', function () {
|
19
|
-
assert.strictEqual(wrapper.dive().name(), 'WithStyles(Paper)');
|
20
|
-
});
|
21
|
-
});
|
22
|
-
describe('with a content prop', function () {
|
23
|
-
before(function () {
|
24
|
-
wrapper = shallow(React.createElement(HiStepContent, {
|
25
|
-
content: "Test"
|
26
|
-
}));
|
27
|
-
});
|
28
|
-
it('should have its content prop set correctly', function () {
|
29
|
-
assert.strictEqual(wrapper.props().content, 'Test');
|
30
|
-
});
|
31
|
-
});
|
32
|
-
});
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow, getClasses } from '../test-utils';
|
4
|
-
import HiStepIcon from './HiStepIcon';
|
5
|
-
describe('<HiStepIcon />', function () {
|
6
|
-
var shallow;
|
7
|
-
var classes;
|
8
|
-
before(function () {
|
9
|
-
shallow = createShallow();
|
10
|
-
classes = getClasses(React.createElement(HiStepIcon, null));
|
11
|
-
});
|
12
|
-
it('should render a HiStep component', function () {
|
13
|
-
var wrapper = shallow(React.createElement(HiStepIcon, null));
|
14
|
-
assert.strictEqual(wrapper.name(), 'HiStepIcon');
|
15
|
-
});
|
16
|
-
it('should initiate with correct default props', function () {
|
17
|
-
var wrapper = shallow(React.createElement(HiStepIcon, null));
|
18
|
-
assert.strictEqual(wrapper.props().active, false);
|
19
|
-
assert.strictEqual(wrapper.props().status, 'unreviewed');
|
20
|
-
});
|
21
|
-
it('should have correct classes applied if active', function () {
|
22
|
-
var wrapper = shallow(React.createElement(HiStepIcon, {
|
23
|
-
active: true
|
24
|
-
}));
|
25
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
|
26
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
|
27
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
|
28
|
-
});
|
29
|
-
it('should have correct classes applied if active and validated', function () {
|
30
|
-
var wrapper = shallow(React.createElement(HiStepIcon, {
|
31
|
-
active: true,
|
32
|
-
status: "validated"
|
33
|
-
}));
|
34
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
|
35
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.validated), true);
|
36
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
|
37
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
|
38
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dotValidated), true);
|
39
|
-
});
|
40
|
-
it('should have correct classes applied if active and refused', function () {
|
41
|
-
var wrapper = shallow(React.createElement(HiStepIcon, {
|
42
|
-
active: true,
|
43
|
-
status: "refused"
|
44
|
-
}));
|
45
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.dotAround), true);
|
46
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.refused), true);
|
47
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dot), true);
|
48
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.activeStep), true);
|
49
|
-
assert.strictEqual(wrapper.dive().find('div').at(2).hasClass(classes.dotRefused), true);
|
50
|
-
});
|
51
|
-
it('should have correct classes applied if validated', function () {
|
52
|
-
var wrapper = shallow(React.createElement(HiStepIcon, {
|
53
|
-
status: "validated"
|
54
|
-
}));
|
55
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.circle), true);
|
56
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.validated), true);
|
57
|
-
});
|
58
|
-
it('should have correct classes applied if refused', function () {
|
59
|
-
var wrapper = shallow(React.createElement(HiStepIcon, {
|
60
|
-
status: "refused"
|
61
|
-
}));
|
62
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.circle), true);
|
63
|
-
assert.strictEqual(wrapper.dive().find('div').at(1).hasClass(classes.refused), true);
|
64
|
-
});
|
65
|
-
});
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow } from '../test-utils';
|
4
|
-
import HiStepLabel from './HiStepLabel';
|
5
|
-
import HiPin from '../HiPin';
|
6
|
-
describe('<HiStepLabel />', function () {
|
7
|
-
var shallow;
|
8
|
-
before(function () {
|
9
|
-
shallow = createShallow();
|
10
|
-
});
|
11
|
-
it('should render a HiStepLabel component', function () {
|
12
|
-
var wrapper = shallow(React.createElement(HiStepLabel, null));
|
13
|
-
assert.strictEqual(wrapper.name(), 'HiStepLabel');
|
14
|
-
});
|
15
|
-
it('should initiate with correct default props', function () {
|
16
|
-
var wrapper = shallow(React.createElement(HiStepLabel, null));
|
17
|
-
assert.strictEqual(wrapper.props().active, false);
|
18
|
-
assert.strictEqual(wrapper.props().status, 'unreviewed');
|
19
|
-
});
|
20
|
-
it('should render a span', function () {
|
21
|
-
var wrapper = shallow(React.createElement(HiStepLabel, null));
|
22
|
-
assert.strictEqual(wrapper.dive().name(), 'span');
|
23
|
-
});
|
24
|
-
it('should render a notification HiPin', function () {
|
25
|
-
var wrapper = shallow(React.createElement(HiStepLabel, {
|
26
|
-
notificationNumber: 2
|
27
|
-
}));
|
28
|
-
assert.strictEqual(wrapper.dive().find(HiPin).children().text(), '2');
|
29
|
-
});
|
30
|
-
});
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow } from '../test-utils';
|
4
|
-
import HiStepper from './HiStepper';
|
5
|
-
import HiStep from './HiStep';
|
6
|
-
import HiStepLabel from './HiStepLabel';
|
7
|
-
describe('<HiStepper />', function () {
|
8
|
-
var shallow;
|
9
|
-
var wrapper;
|
10
|
-
var children = React.createElement(HiStep, {
|
11
|
-
key: 1
|
12
|
-
}, React.createElement(HiStepLabel, {
|
13
|
-
status: "unreviewed",
|
14
|
-
notificationNumber: 0
|
15
|
-
}, "Label"));
|
16
|
-
before(function () {
|
17
|
-
shallow = createShallow();
|
18
|
-
});
|
19
|
-
describe('Generic tests', function () {
|
20
|
-
before(function () {
|
21
|
-
wrapper = shallow(React.createElement(HiStepper, null, children));
|
22
|
-
});
|
23
|
-
it('should render a HiStepper component', function () {
|
24
|
-
assert.strictEqual(wrapper.name(), 'HiStepper');
|
25
|
-
});
|
26
|
-
it('should render a div containing children steps', function () {
|
27
|
-
assert.strictEqual(wrapper.dive().name(), 'div');
|
28
|
-
});
|
29
|
-
it('should render a HiStep', function () {
|
30
|
-
assert.strictEqual(wrapper.find(HiStep).length, 1);
|
31
|
-
});
|
32
|
-
});
|
33
|
-
});
|
@@ -1,75 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow } from '../test-utils';
|
4
|
-
import CellAddress from './CellAddress';
|
5
|
-
describe('<CellAddress />', function () {
|
6
|
-
var shallow;
|
7
|
-
before(function () {
|
8
|
-
before(function () {
|
9
|
-
shallow = createShallow({
|
10
|
-
dive: true
|
11
|
-
});
|
12
|
-
});
|
13
|
-
it('should render a the name and the city', function () {
|
14
|
-
var wrapper = shallow(React.createElement(CellAddress, {
|
15
|
-
type: 'address',
|
16
|
-
streetAddress: '12 rue Zimzim Zidane',
|
17
|
-
city: 'Paris',
|
18
|
-
country: 'France'
|
19
|
-
}));
|
20
|
-
assert.strictEqual(wrapper.find('div').text(), 'Paris, France', 'Should have correct text.');
|
21
|
-
});
|
22
|
-
it('should render a the city and the country', function () {
|
23
|
-
var wrapper = shallow(React.createElement(CellAddress, {
|
24
|
-
type: 'address',
|
25
|
-
streetAddress: '12 rue Zimzim Zidane',
|
26
|
-
city: 'Paris',
|
27
|
-
country: 'France',
|
28
|
-
isoCountry: 'FR',
|
29
|
-
view: 's'
|
30
|
-
}));
|
31
|
-
assert.strictEqual(wrapper.find('div').text(), 'Paris, FR', 'Should have correct text.');
|
32
|
-
});
|
33
|
-
it('should render only the city', function () {
|
34
|
-
var wrapper = shallow(React.createElement(CellAddress, {
|
35
|
-
sticky: true,
|
36
|
-
type: 'address',
|
37
|
-
streetAddress: '12 rue Zimzim Zidane',
|
38
|
-
city: 'Paris',
|
39
|
-
country: 'France',
|
40
|
-
view: 's'
|
41
|
-
}));
|
42
|
-
assert.strictEqual(wrapper.find('div').text(), 'Paris', 'Should have correct text.');
|
43
|
-
});
|
44
|
-
it('should render only the country', function () {
|
45
|
-
var wrapper = shallow(React.createElement(CellAddress, {
|
46
|
-
type: 'address',
|
47
|
-
streetAddress: '12 rue Zimzim Zidane',
|
48
|
-
country: 'France',
|
49
|
-
isoCountry: 'FR'
|
50
|
-
}));
|
51
|
-
assert.strictEqual(wrapper.find('div').text(), 'France', 'Should have correct text.');
|
52
|
-
});
|
53
|
-
it('should render only the iso country', function () {
|
54
|
-
var wrapper = shallow(React.createElement(CellAddress, {
|
55
|
-
type: 'address',
|
56
|
-
streetAddress: '12 rue Zimzim Zidane',
|
57
|
-
country: 'France',
|
58
|
-
isoCountry: 'FR',
|
59
|
-
view: 's'
|
60
|
-
}));
|
61
|
-
assert.strictEqual(wrapper.find('div').text(), 'FR', 'Should have correct text.');
|
62
|
-
});
|
63
|
-
it('should render name and the iso country', function () {
|
64
|
-
var wrapper = shallow(React.createElement(CellAddress, {
|
65
|
-
type: 'address',
|
66
|
-
streetAddress: '12 rue Zimzim Zidane',
|
67
|
-
country: 'France',
|
68
|
-
name: 'address',
|
69
|
-
isoCountry: 'FR',
|
70
|
-
view: 'l'
|
71
|
-
}));
|
72
|
-
assert.strictEqual(wrapper.find('div').text(), 'address, ', 'Should have correct text.');
|
73
|
-
});
|
74
|
-
});
|
75
|
-
});
|
@@ -1,173 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow } from '../test-utils';
|
4
|
-
import CellDate from './CellDate';
|
5
|
-
describe('<CellDate />', function () {
|
6
|
-
var shallow;
|
7
|
-
before(function () {
|
8
|
-
shallow = createShallow({
|
9
|
-
dive: true,
|
10
|
-
untilSelector: CellDate,
|
11
|
-
context: {
|
12
|
-
table: {
|
13
|
-
footer: true
|
14
|
-
}
|
15
|
-
}
|
16
|
-
});
|
17
|
-
});
|
18
|
-
it('should render a date for all views', function () {
|
19
|
-
// L - en - with time
|
20
|
-
var wrapper = shallow(React.createElement(CellDate, {
|
21
|
-
type: 'date',
|
22
|
-
date: '2017-01-27 10:35:59',
|
23
|
-
locale: 'en-EN',
|
24
|
-
view: 'l',
|
25
|
-
displayTime: true
|
26
|
-
}));
|
27
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), 'Friday 27 January 2017 10:35:59', 'Should display large date with time in english'); // L - en - without time
|
28
|
-
|
29
|
-
wrapper.setProps({
|
30
|
-
displayTime: false
|
31
|
-
});
|
32
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), 'Friday 27 January 2017', 'Should display large date without time in english'); // L - fr - with time
|
33
|
-
|
34
|
-
wrapper.setProps({
|
35
|
-
locale: 'fr',
|
36
|
-
displayTime: true
|
37
|
-
});
|
38
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), 'vendredi 27 janvier 2017 10:35:59', 'Should display large date with time in french'); // L - fr - without time
|
39
|
-
|
40
|
-
wrapper.setProps({
|
41
|
-
locale: 'fr',
|
42
|
-
displayTime: false
|
43
|
-
});
|
44
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), 'vendredi 27 janvier 2017', 'Should display large date without time in english'); // M - en - with time
|
45
|
-
|
46
|
-
wrapper.setProps({
|
47
|
-
view: 'm',
|
48
|
-
locale: 'en',
|
49
|
-
displayTime: true
|
50
|
-
});
|
51
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017 10:35:59', 'Should display medium date with time and default format'); // M - en - with time - custom format
|
52
|
-
|
53
|
-
wrapper.setProps({
|
54
|
-
view: 'm',
|
55
|
-
locale: 'en',
|
56
|
-
displayTime: true,
|
57
|
-
formatShort: 'MM-DD-YYYY'
|
58
|
-
});
|
59
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017 10:35:59', 'Should display medium date with time and custom format'); // M - en - without time
|
60
|
-
|
61
|
-
wrapper.setProps({
|
62
|
-
view: 'm',
|
63
|
-
locale: 'en',
|
64
|
-
displayTime: false,
|
65
|
-
formatShort: undefined
|
66
|
-
});
|
67
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017', 'Should display medium date without time and default format'); // M - en - without time - custom format
|
68
|
-
|
69
|
-
wrapper.setProps({
|
70
|
-
view: 'm',
|
71
|
-
locale: 'en',
|
72
|
-
displayTime: false,
|
73
|
-
formatShort: 'MM-DD-YYYY'
|
74
|
-
});
|
75
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017', 'Should display medium date without time and custom format'); // M - fr - with time
|
76
|
-
|
77
|
-
wrapper.setProps({
|
78
|
-
view: 'm',
|
79
|
-
locale: 'fr',
|
80
|
-
displayTime: true,
|
81
|
-
formatShort: undefined
|
82
|
-
});
|
83
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017 10:35:59', 'Should display medium date with time and default format'); // M - fr - with time - custom format
|
84
|
-
|
85
|
-
wrapper.setProps({
|
86
|
-
view: 'm',
|
87
|
-
locale: 'fr',
|
88
|
-
displayTime: true,
|
89
|
-
formatShort: 'MM-DD-YYYY'
|
90
|
-
});
|
91
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017 10:35:59', 'Should display medium date with time and custom format'); // M - fr - without time
|
92
|
-
|
93
|
-
wrapper.setProps({
|
94
|
-
view: 'm',
|
95
|
-
locale: 'fr',
|
96
|
-
displayTime: false,
|
97
|
-
formatShort: undefined
|
98
|
-
});
|
99
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/2017', 'Should display medium date without time and default format'); // M - fr - with time - custom format
|
100
|
-
|
101
|
-
wrapper.setProps({
|
102
|
-
view: 'm',
|
103
|
-
locale: 'fr',
|
104
|
-
displayTime: false,
|
105
|
-
formatShort: 'MM-DD-YYYY'
|
106
|
-
});
|
107
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-2017', 'Should display medium date without time and custom format'); // S - en - with time
|
108
|
-
|
109
|
-
wrapper.setProps({
|
110
|
-
view: 's',
|
111
|
-
locale: 'en',
|
112
|
-
displayTime: true,
|
113
|
-
formatShort: undefined
|
114
|
-
});
|
115
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17 10:35:59', 'Should display medium date with time and default format'); // S - en - with time - custom format
|
116
|
-
|
117
|
-
wrapper.setProps({
|
118
|
-
view: 's',
|
119
|
-
locale: 'en',
|
120
|
-
displayTime: true,
|
121
|
-
formatShort: 'MM-DD-YYYY'
|
122
|
-
});
|
123
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17 10:35:59', 'Should display medium date with time and custom format'); // S - en - without time
|
124
|
-
|
125
|
-
wrapper.setProps({
|
126
|
-
view: 's',
|
127
|
-
locale: 'en',
|
128
|
-
displayTime: false,
|
129
|
-
formatShort: undefined
|
130
|
-
});
|
131
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17', 'Should display medium date without time and default format'); // S - en - without time - custom format
|
132
|
-
|
133
|
-
wrapper.setProps({
|
134
|
-
view: 's',
|
135
|
-
locale: 'en',
|
136
|
-
displayTime: false,
|
137
|
-
formatShort: 'MM-DD-YYYY'
|
138
|
-
});
|
139
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17', 'Should display medium date without time and custom format'); // S - fr - with time
|
140
|
-
|
141
|
-
wrapper.setProps({
|
142
|
-
view: 's',
|
143
|
-
locale: 'fr',
|
144
|
-
displayTime: true,
|
145
|
-
formatShort: undefined
|
146
|
-
});
|
147
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17 10:35:59', 'Should display medium date with time and default format'); // S - fr - with time - custom format
|
148
|
-
|
149
|
-
wrapper.setProps({
|
150
|
-
view: 's',
|
151
|
-
locale: 'fr',
|
152
|
-
displayTime: true,
|
153
|
-
formatShort: 'MM-DD-YYYY'
|
154
|
-
});
|
155
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17 10:35:59', 'Should display medium date with time and custom format'); // S - fr - without time
|
156
|
-
|
157
|
-
wrapper.setProps({
|
158
|
-
view: 's',
|
159
|
-
locale: 'fr',
|
160
|
-
displayTime: false,
|
161
|
-
formatShort: undefined
|
162
|
-
});
|
163
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '27/01/17', 'Should display medium date without time and default format'); // S - fr - with time - custom format
|
164
|
-
|
165
|
-
wrapper.setProps({
|
166
|
-
view: 's',
|
167
|
-
locale: 'fr',
|
168
|
-
displayTime: false,
|
169
|
-
formatShort: 'MM-DD-YYYY'
|
170
|
-
});
|
171
|
-
assert.strictEqual(wrapper.find('div').at(0).text(), '01-27-17', 'Should display medium date without time and custom format');
|
172
|
-
});
|
173
|
-
});
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import ArrowUp from 'mdi-material-ui/ArrowUp';
|
4
|
-
import { createShallow, createMount, getClasses } from '../test-utils';
|
5
|
-
import CellIcon from './CellIcon';
|
6
|
-
import HiIcon from '../HiIcon';
|
7
|
-
describe('<CellIcon/>', function () {
|
8
|
-
var shallow;
|
9
|
-
var mount;
|
10
|
-
var classes;
|
11
|
-
before(function () {
|
12
|
-
shallow = createShallow({
|
13
|
-
dive: true
|
14
|
-
});
|
15
|
-
mount = createMount();
|
16
|
-
classes = getClasses(React.createElement(CellIcon, {
|
17
|
-
type: 'icon',
|
18
|
-
icon: 'arrow_up',
|
19
|
-
label: 'Test'
|
20
|
-
}));
|
21
|
-
});
|
22
|
-
after(function () {
|
23
|
-
mount.cleanUp();
|
24
|
-
});
|
25
|
-
it('should render a td with an icon inside and label (view L)', function () {
|
26
|
-
var wrapper = shallow(React.createElement(CellIcon, {
|
27
|
-
type: 'icon',
|
28
|
-
icon: 'arrow_up',
|
29
|
-
label: 'Test',
|
30
|
-
view: 'l'
|
31
|
-
}));
|
32
|
-
assert.strictEqual(wrapper.find(HiIcon).length, 1, 'Should render HiIcon');
|
33
|
-
assert.strictEqual(wrapper.find(HiIcon).props().icon, 'arrow_up', 'Should pass icon name');
|
34
|
-
assert.strictEqual(wrapper.find(HiIcon).props().className, classes.icon, 'Should pass icon class');
|
35
|
-
});
|
36
|
-
it('should render a td with an icon inside only (view S)', function () {
|
37
|
-
var wrapper = shallow(React.createElement(CellIcon, {
|
38
|
-
type: 'icon',
|
39
|
-
icon: 'arrow_up',
|
40
|
-
label: 'Test',
|
41
|
-
view: 's'
|
42
|
-
}));
|
43
|
-
assert.strictEqual(wrapper.find(HiIcon).length, 1, 'Should render HiIcon');
|
44
|
-
assert.strictEqual(wrapper.find(HiIcon).props().icon, 'arrow_up', 'Should pass icon name');
|
45
|
-
assert.strictEqual(wrapper.find(HiIcon).props().className, classes.icon, 'Should pass icon class');
|
46
|
-
});
|
47
|
-
it('should render a CellIcon with an icon inside only (view S)', function () {
|
48
|
-
var wrapper = mount(React.createElement(CellIcon, {
|
49
|
-
sticky: true,
|
50
|
-
type: 'icon',
|
51
|
-
icon: 'mdi_arrow_up',
|
52
|
-
label: undefined,
|
53
|
-
view: 's'
|
54
|
-
}));
|
55
|
-
assert.strictEqual(wrapper.find(ArrowUp).length, 1, 'Should render the right icon component');
|
56
|
-
});
|
57
|
-
});
|