@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
package/HiNotice/HiKPI.test.js
DELETED
@@ -1,171 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow, createMount, getClasses } from '../test-utils';
|
4
|
-
import HiKPI from './HiKPI';
|
5
|
-
import { spy } from 'sinon';
|
6
|
-
describe('<HiKPI />', function () {
|
7
|
-
var shallow;
|
8
|
-
var classes;
|
9
|
-
var mount;
|
10
|
-
before(function () {
|
11
|
-
shallow = createShallow({
|
12
|
-
dive: true
|
13
|
-
});
|
14
|
-
classes = getClasses(React.createElement(HiKPI, {
|
15
|
-
id: 1,
|
16
|
-
type: 'normal',
|
17
|
-
body: 'Test'
|
18
|
-
}));
|
19
|
-
mount = createMount();
|
20
|
-
});
|
21
|
-
after(function () {
|
22
|
-
mount.cleanUp();
|
23
|
-
});
|
24
|
-
describe('Should have root classes => all kpi', function () {
|
25
|
-
var wrapper;
|
26
|
-
before(function () {
|
27
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
28
|
-
id: 1,
|
29
|
-
type: 'normal',
|
30
|
-
body: 'Test',
|
31
|
-
color: 'inherit'
|
32
|
-
}));
|
33
|
-
});
|
34
|
-
it('should render a div with classes root', function () {
|
35
|
-
assert.strictEqual(wrapper.hasClass(classes.root), true);
|
36
|
-
});
|
37
|
-
});
|
38
|
-
describe('Should have root and inherit classes => inherit color', function () {
|
39
|
-
var wrapper;
|
40
|
-
before(function () {
|
41
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
42
|
-
id: 1,
|
43
|
-
type: 'normal',
|
44
|
-
body: 'Test',
|
45
|
-
color: 'inherit'
|
46
|
-
}));
|
47
|
-
});
|
48
|
-
it('should render a div with classes inherit and root', function () {
|
49
|
-
assert.strictEqual(wrapper.hasClass(classes.inherit), true);
|
50
|
-
assert.strictEqual(wrapper.hasClass(classes.root), true);
|
51
|
-
});
|
52
|
-
});
|
53
|
-
describe('Should have root and warning classes => warning color', function () {
|
54
|
-
var wrapper;
|
55
|
-
before(function () {
|
56
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
57
|
-
id: 1,
|
58
|
-
type: 'normal',
|
59
|
-
body: 'Test',
|
60
|
-
color: 'warning'
|
61
|
-
}));
|
62
|
-
});
|
63
|
-
it('should render a div with classes warning and root', function () {
|
64
|
-
assert.strictEqual(wrapper.hasClass(classes.warning), true);
|
65
|
-
assert.strictEqual(wrapper.hasClass(classes.root), true);
|
66
|
-
});
|
67
|
-
});
|
68
|
-
describe('Should have root and error classes => error color', function () {
|
69
|
-
var wrapper;
|
70
|
-
before(function () {
|
71
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
72
|
-
id: 1,
|
73
|
-
type: 'normal',
|
74
|
-
body: 'Test',
|
75
|
-
color: 'error'
|
76
|
-
}));
|
77
|
-
});
|
78
|
-
it('should render a div with classes error and root', function () {
|
79
|
-
assert.strictEqual(wrapper.hasClass(classes.error), true);
|
80
|
-
assert.strictEqual(wrapper.hasClass(classes.root), true);
|
81
|
-
});
|
82
|
-
});
|
83
|
-
describe('Should have on click callback', function () {
|
84
|
-
var wrapper;
|
85
|
-
var handler = spy();
|
86
|
-
before(function () {
|
87
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
88
|
-
id: 1,
|
89
|
-
type: 'normal',
|
90
|
-
body: 'Test',
|
91
|
-
color: 'inherit',
|
92
|
-
onClick: handler
|
93
|
-
}));
|
94
|
-
});
|
95
|
-
it('should render a div with classes active and minify', function () {
|
96
|
-
wrapper.simulate('click');
|
97
|
-
assert.strictEqual(handler.calledOnce, true, 'should onclick be called once');
|
98
|
-
});
|
99
|
-
});
|
100
|
-
describe('Hidden subtitle on click on KPI', function () {
|
101
|
-
var wrapper;
|
102
|
-
var handler = spy();
|
103
|
-
before(function () {
|
104
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
105
|
-
id: 1,
|
106
|
-
type: 'normal',
|
107
|
-
body: 'Test',
|
108
|
-
subtitle: 'Test subtitle',
|
109
|
-
color: 'inherit',
|
110
|
-
onClick: handler
|
111
|
-
}));
|
112
|
-
});
|
113
|
-
it('Should render KPI with subtitle, on click subtitle is hidden', function () {
|
114
|
-
assert.strictEqual(wrapper.find({
|
115
|
-
className: classes.subtitle
|
116
|
-
}).exists(), true, 'should have subtitle');
|
117
|
-
wrapper.simulate('click');
|
118
|
-
});
|
119
|
-
});
|
120
|
-
describe('Show title or not', function () {
|
121
|
-
var wrapper;
|
122
|
-
var wrapper2;
|
123
|
-
before(function () {
|
124
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
125
|
-
id: 1,
|
126
|
-
type: 'normal',
|
127
|
-
body: 'Test',
|
128
|
-
color: 'inherit'
|
129
|
-
}));
|
130
|
-
wrapper2 = shallow(React.createElement(HiKPI, {
|
131
|
-
id: 1,
|
132
|
-
type: 'normal',
|
133
|
-
body: 'Test',
|
134
|
-
color: 'inherit',
|
135
|
-
title: 'Test title'
|
136
|
-
}));
|
137
|
-
});
|
138
|
-
it('Should not have title', function () {
|
139
|
-
assert.strictEqual(wrapper.find({
|
140
|
-
className: classes.title
|
141
|
-
}).exists(), false, 'should not have title');
|
142
|
-
});
|
143
|
-
it('Should render KPI with title', function () {
|
144
|
-
assert.strictEqual(wrapper2.find({
|
145
|
-
className: classes.title
|
146
|
-
}).exists(), true, 'should have title');
|
147
|
-
});
|
148
|
-
});
|
149
|
-
describe('Should show minify body when KPI is minify', function () {
|
150
|
-
var wrapper;
|
151
|
-
var handler = spy();
|
152
|
-
var body = 'Test body';
|
153
|
-
var bodyMinify = 'Test';
|
154
|
-
before(function () {
|
155
|
-
wrapper = shallow(React.createElement(HiKPI, {
|
156
|
-
id: 1,
|
157
|
-
type: 'normal',
|
158
|
-
body: body,
|
159
|
-
bodyMinify: bodyMinify,
|
160
|
-
color: 'inherit',
|
161
|
-
onClick: handler
|
162
|
-
}));
|
163
|
-
});
|
164
|
-
it('Should show minify body when KPI is minify', function () {
|
165
|
-
assert.strictEqual(wrapper.find({
|
166
|
-
className: classes.body
|
167
|
-
}).text(), body, 'should have body not minify');
|
168
|
-
wrapper.simulate('click');
|
169
|
-
});
|
170
|
-
});
|
171
|
-
});
|
@@ -1,88 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert, expect } from 'chai';
|
3
|
-
import { createShallow, createMount } from '../test-utils';
|
4
|
-
import HiKPINotice from './HiKPINotice';
|
5
|
-
import HiKPI from './HiKPI';
|
6
|
-
describe('<HiKPINotice />', function () {
|
7
|
-
var shallow;
|
8
|
-
var mount;
|
9
|
-
var kpis = {
|
10
|
-
test1: {
|
11
|
-
title: 'Test',
|
12
|
-
body: 'Test body',
|
13
|
-
type: 'normal',
|
14
|
-
color: 'inherit'
|
15
|
-
},
|
16
|
-
test2: {
|
17
|
-
id: 1,
|
18
|
-
title: 'Test',
|
19
|
-
body: 'Test body',
|
20
|
-
type: 'normal',
|
21
|
-
color: 'inherit'
|
22
|
-
},
|
23
|
-
test3: {
|
24
|
-
id: 2,
|
25
|
-
title: 'Test',
|
26
|
-
body: 'Test body',
|
27
|
-
type: 'normal',
|
28
|
-
color: 'inherit'
|
29
|
-
}
|
30
|
-
};
|
31
|
-
before(function () {
|
32
|
-
shallow = createShallow({
|
33
|
-
dive: true
|
34
|
-
});
|
35
|
-
mount = createMount();
|
36
|
-
});
|
37
|
-
after(function () {
|
38
|
-
mount.cleanUp();
|
39
|
-
});
|
40
|
-
describe('Should have HiKPI child', function () {
|
41
|
-
var wrapper;
|
42
|
-
before(function () {
|
43
|
-
wrapper = shallow(React.createElement(HiKPINotice, {
|
44
|
-
kpis: kpis
|
45
|
-
}));
|
46
|
-
});
|
47
|
-
it('should have HiKPI child', function () {
|
48
|
-
var childrens = wrapper.children();
|
49
|
-
childrens.forEach(function (child) {
|
50
|
-
assert.strictEqual(child.find(HiKPI).exists(), true, 'should be a HiKPI child');
|
51
|
-
});
|
52
|
-
});
|
53
|
-
});
|
54
|
-
describe('Should have same number of KPI component as kpis list', function () {
|
55
|
-
var wrapper;
|
56
|
-
before(function () {
|
57
|
-
wrapper = shallow(React.createElement(HiKPINotice, {
|
58
|
-
kpis: kpis
|
59
|
-
}));
|
60
|
-
});
|
61
|
-
it('should render same number of kpi component as kpis list', function () {
|
62
|
-
expect(wrapper.children()).to.have.lengthOf(Object.keys(kpis).length);
|
63
|
-
});
|
64
|
-
});
|
65
|
-
describe('On click on a KPI, this KPI is minify and active and the others KPIs are only minify', function () {
|
66
|
-
var wrapper;
|
67
|
-
var activeKpi = null;
|
68
|
-
before(function () {
|
69
|
-
wrapper = shallow(React.createElement(HiKPINotice, {
|
70
|
-
kpis: kpis,
|
71
|
-
activeKpi: activeKpi,
|
72
|
-
minify: true
|
73
|
-
}));
|
74
|
-
});
|
75
|
-
it('should have KPI0 active and minify and others are only minify', function () {
|
76
|
-
var childrens = wrapper.children();
|
77
|
-
childrens.forEach(function (child) {
|
78
|
-
child = child.find(HiKPI);
|
79
|
-
|
80
|
-
if (activeKpi === child.props().id) {
|
81
|
-
assert.strictEqual(child.props().active, true, 'should be an active child KPI');
|
82
|
-
}
|
83
|
-
|
84
|
-
assert.strictEqual(child.props().minify, true, 'should be an minify child KPI');
|
85
|
-
});
|
86
|
-
});
|
87
|
-
});
|
88
|
-
});
|
@@ -1,162 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { createMount, createShallow, getClasses } from '../test-utils';
|
3
|
-
import HiPaymentMeans from './HiPaymentMeans';
|
4
|
-
import { assert } from 'chai';
|
5
|
-
describe('<HiPaymentMeans />', function () {
|
6
|
-
var shallow;
|
7
|
-
var classes;
|
8
|
-
var mount;
|
9
|
-
var translations;
|
10
|
-
before(function () {
|
11
|
-
translations = {
|
12
|
-
credit: 'credit',
|
13
|
-
debit: 'debit',
|
14
|
-
gift_card: 'GIFT CARD',
|
15
|
-
gender_female: 'Mrs',
|
16
|
-
gender_male: 'Mr'
|
17
|
-
};
|
18
|
-
shallow = createShallow({
|
19
|
-
dive: true
|
20
|
-
});
|
21
|
-
classes = getClasses(React.createElement(HiPaymentMeans, {
|
22
|
-
logo: '/static/hmu/images/payment-means/sans_logo full.svg',
|
23
|
-
cardNumber: '55555',
|
24
|
-
cardUser: 'Lulu Rouget',
|
25
|
-
cardUserGender: 'F',
|
26
|
-
cardValidity: '2019',
|
27
|
-
colorPrimary: '#fff',
|
28
|
-
colorSecondary: '#000',
|
29
|
-
logoMerchant: 'logoMerchant',
|
30
|
-
type: 'credit-card',
|
31
|
-
translations: translations,
|
32
|
-
credit: false
|
33
|
-
}));
|
34
|
-
mount = createMount();
|
35
|
-
});
|
36
|
-
after(function () {
|
37
|
-
mount.cleanUp();
|
38
|
-
});
|
39
|
-
describe('Should render bank card template', function () {
|
40
|
-
var wrapper;
|
41
|
-
before(function () {
|
42
|
-
wrapper = shallow(React.createElement(HiPaymentMeans, {
|
43
|
-
logo: '/static/hmu/images/payment-means/sans_logo full.svg',
|
44
|
-
cardNumber: '55555',
|
45
|
-
cardUser: 'Lulu Rouget',
|
46
|
-
cardUserGender: 'F',
|
47
|
-
cardValidity: '2019',
|
48
|
-
colorPrimary: '#fff',
|
49
|
-
colorSecondary: '#000',
|
50
|
-
logoMerchant: 'logoMerchant',
|
51
|
-
type: 'credit-card',
|
52
|
-
translations: translations
|
53
|
-
}));
|
54
|
-
});
|
55
|
-
it('Should render the bank card template', function () {
|
56
|
-
assert.strictEqual(wrapper.hasClass(classes.bankCard), true);
|
57
|
-
assert.strictEqual(wrapper.find('span').at(1).hasClass(classes.stripeTopRight), true);
|
58
|
-
assert.strictEqual(wrapper.find('span').find('img').hasClass(classes.logoRight), true);
|
59
|
-
assert.strictEqual(wrapper.find('div').at(2).hasClass(classes.cardNumberLabel), true);
|
60
|
-
assert.strictEqual(wrapper.find('div').at(5).hasClass(classes.validThru), true);
|
61
|
-
});
|
62
|
-
});
|
63
|
-
describe('Should render default card template', function () {
|
64
|
-
var wrapper;
|
65
|
-
before(function () {
|
66
|
-
wrapper = shallow(React.createElement(HiPaymentMeans, {
|
67
|
-
logo: '/static/hmu/images/payment-means/sans_logo full.svg',
|
68
|
-
type: 'wrongType',
|
69
|
-
translations: translations
|
70
|
-
}));
|
71
|
-
});
|
72
|
-
it('Should render default card template with just the logo', function () {
|
73
|
-
assert.strictEqual(wrapper.hasClass(classes.bankCard), true);
|
74
|
-
assert.strictEqual(wrapper.find('span').at(1).hasClass(classes.stripeTopRight), true);
|
75
|
-
assert.strictEqual(wrapper.find('span').find('img').hasClass(classes.logoRight), true);
|
76
|
-
assert.strictEqual(wrapper.find('div').at(2).hasClass(classes.cardNumberLabel), false);
|
77
|
-
assert.strictEqual(wrapper.find('div').at(5).exists(), false);
|
78
|
-
});
|
79
|
-
});
|
80
|
-
describe('Should render gift card template', function () {
|
81
|
-
var wrapper;
|
82
|
-
before(function () {
|
83
|
-
wrapper = shallow(React.createElement(HiPaymentMeans, {
|
84
|
-
logo: '/static/hmu/images/payment-means/sans_logo full.svg',
|
85
|
-
logoMerchant: '/static/hmu/images/payment-means/sans_logo full.svg',
|
86
|
-
type: 'prepaid-card',
|
87
|
-
translations: translations
|
88
|
-
}));
|
89
|
-
});
|
90
|
-
it('Should render default gift template with the logo merchant', function () {
|
91
|
-
assert.strictEqual(wrapper.hasClass(classes.bankCard), true);
|
92
|
-
assert.strictEqual(wrapper.find('span').at(0).find('img').hasClass(classes.logoRight), true);
|
93
|
-
assert.strictEqual(wrapper.find('span').at(1).hasClass(classes.stripeTopRight), true);
|
94
|
-
assert.strictEqual(wrapper.find('span').at(1).find('img').hasClass(classes.logoMerchant), true);
|
95
|
-
});
|
96
|
-
});
|
97
|
-
describe('Should render sepa card template', function () {
|
98
|
-
var wrapper;
|
99
|
-
before(function () {
|
100
|
-
wrapper = shallow(React.createElement(HiPaymentMeans, {
|
101
|
-
logo: '/static/hmu/images/payment-means/sans_logo full.svg',
|
102
|
-
cardNumber: '652568248',
|
103
|
-
bic: 'QJFOQJOIZEI',
|
104
|
-
type: 'credit-consumption',
|
105
|
-
creditDebit: translations.creditDebit,
|
106
|
-
translations: translations
|
107
|
-
}));
|
108
|
-
});
|
109
|
-
it('Should render sepa card template with iban, bic and debit label', function () {
|
110
|
-
assert.strictEqual(wrapper.hasClass(classes.sepa), true, '1');
|
111
|
-
assert.strictEqual(wrapper.find('span').at(1).hasClass(classes.stripeTopLeft), true, '2');
|
112
|
-
assert.strictEqual(wrapper.find('span').find('img').hasClass(classes.logoLeft), true, '3');
|
113
|
-
assert.strictEqual(wrapper.find('div').at(1).hasClass(classes.ibanLabel), true, '4');
|
114
|
-
assert.strictEqual(wrapper.find('div').at(3).hasClass(classes.userNameSepa), true, '5');
|
115
|
-
assert.strictEqual(wrapper.find('div').at(4).text(), 'CREDIT', '6');
|
116
|
-
});
|
117
|
-
});
|
118
|
-
describe('Should render corporate card template', function () {
|
119
|
-
var wrapper;
|
120
|
-
before(function () {
|
121
|
-
wrapper = shallow(React.createElement(HiPaymentMeans, {
|
122
|
-
logo: '/static/hmu/images/payment-means/sans_logo full.svg',
|
123
|
-
type: 'corporate',
|
124
|
-
cardNumber: '6536587525',
|
125
|
-
cardUser: 'Joe Quaie',
|
126
|
-
businessName: 'Canne à son',
|
127
|
-
translations: translations,
|
128
|
-
yearMember: '2000',
|
129
|
-
cardValidity: '12/20'
|
130
|
-
}));
|
131
|
-
});
|
132
|
-
it('Should render corporate card template with all infos', function () {
|
133
|
-
assert.strictEqual(wrapper.hasClass(classes.bankCard), true, '1');
|
134
|
-
assert.strictEqual(wrapper.find('span').at(1).hasClass(classes.stripeTopRight), true, '2');
|
135
|
-
assert.strictEqual(wrapper.find('span').find('img').hasClass(classes.logoRight), true, '3');
|
136
|
-
assert.strictEqual(wrapper.find('span').find('div').text(), 'CORPORATE', '3');
|
137
|
-
assert.strictEqual(wrapper.find('div').at(2).hasClass(classes.corporateNumberLabel), true, '4');
|
138
|
-
assert.strictEqual(wrapper.find('div').at(4).hasClass(classes.memberSince), true, '5');
|
139
|
-
assert.strictEqual(wrapper.find('div').at(7).hasClass(classes.validThru), true, '6');
|
140
|
-
assert.strictEqual(wrapper.find('div').at(8).text(), 'Joe Quaie', '7');
|
141
|
-
assert.strictEqual(wrapper.find('div').at(9).text(), 'Canne à son', '8');
|
142
|
-
});
|
143
|
-
});
|
144
|
-
describe('Should render wallet card template', function () {
|
145
|
-
var wrapper;
|
146
|
-
before(function () {
|
147
|
-
wrapper = shallow(React.createElement(HiPaymentMeans, {
|
148
|
-
logo: '/static/hmu/images/payment-means/sans_logo full.svg',
|
149
|
-
type: 'ewallet',
|
150
|
-
cardUser: 'Sarah Courssi',
|
151
|
-
cardUserGender: 'F',
|
152
|
-
translations: translations
|
153
|
-
}));
|
154
|
-
});
|
155
|
-
it('Should render wallet card template with user and logo', function () {
|
156
|
-
assert.strictEqual(wrapper.hasClass(classes.walletShadow), true, '1');
|
157
|
-
assert.strictEqual(wrapper.find('div').at(1).hasClass(classes.wallet), true, '2');
|
158
|
-
assert.strictEqual(wrapper.find('div').at(2).text(), 'Mrs Sarah Courssi', '3');
|
159
|
-
assert.strictEqual(wrapper.find('div').find('span').find('img').hasClass(classes.logoLeft), true, '4');
|
160
|
-
});
|
161
|
-
});
|
162
|
-
});
|
package/HiPin/HiPin.test.js
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { createShallow, getClasses } from '../test-utils';
|
4
|
-
import HiPin from './HiPin';
|
5
|
-
describe('<HiPin />', function () {
|
6
|
-
var shallow;
|
7
|
-
var classes;
|
8
|
-
before(function () {
|
9
|
-
shallow = createShallow({
|
10
|
-
dive: true
|
11
|
-
});
|
12
|
-
classes = getClasses(React.createElement(HiPin, null, "x"));
|
13
|
-
});
|
14
|
-
it('should render a <div> element', function () {
|
15
|
-
var wrapper = shallow(React.createElement(HiPin, null, "x"));
|
16
|
-
assert.strictEqual(wrapper.find('div').length, 1);
|
17
|
-
});
|
18
|
-
it('should render clickable <div> component', function () {
|
19
|
-
var wrapper = shallow(React.createElement(HiPin, {
|
20
|
-
onClick: function onClick() {}
|
21
|
-
}, "x"));
|
22
|
-
assert.strictEqual(wrapper.hasClass(classes.root), true);
|
23
|
-
assert.strictEqual(wrapper.hasClass(classes.clickable), true);
|
24
|
-
});
|
25
|
-
it('should render primary color prop to <div> component', function () {
|
26
|
-
var wrapper = shallow(React.createElement(HiPin, {
|
27
|
-
color: "primary"
|
28
|
-
}, "x"));
|
29
|
-
assert.strictEqual(wrapper.hasClass(classes.primary), true);
|
30
|
-
});
|
31
|
-
it('should render secondary color prop to <div> component', function () {
|
32
|
-
var wrapper = shallow(React.createElement(HiPin, {
|
33
|
-
color: "secondary"
|
34
|
-
}, "x"));
|
35
|
-
assert.strictEqual(wrapper.hasClass(classes.secondary), true);
|
36
|
-
});
|
37
|
-
it('should render with the positive classes', function () {
|
38
|
-
var wrapper = shallow(React.createElement(HiPin, {
|
39
|
-
color: "positive"
|
40
|
-
}, "x"));
|
41
|
-
assert.strictEqual(wrapper.hasClass(classes.positive), true);
|
42
|
-
});
|
43
|
-
it('should render with the negative classes', function () {
|
44
|
-
var wrapper = shallow(React.createElement(HiPin, {
|
45
|
-
color: "negative"
|
46
|
-
}, "x"));
|
47
|
-
assert.strictEqual(wrapper.hasClass(classes.negative), true);
|
48
|
-
});
|
49
|
-
it('should render with the middle classes', function () {
|
50
|
-
var wrapper = shallow(React.createElement(HiPin, {
|
51
|
-
color: "middle"
|
52
|
-
}, "x"));
|
53
|
-
assert.strictEqual(wrapper.hasClass(classes.middle), true);
|
54
|
-
});
|
55
|
-
it('should render with the neutral classes', function () {
|
56
|
-
var wrapper = shallow(React.createElement(HiPin, {
|
57
|
-
color: "neutral"
|
58
|
-
}, "x"));
|
59
|
-
assert.strictEqual(wrapper.hasClass(classes.neutral), true);
|
60
|
-
});
|
61
|
-
});
|
package/HiRadio/HiRadio.test.js
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { assert } from 'chai';
|
3
|
-
import { spy } from 'sinon';
|
4
|
-
import { createMount, createShallow } from '../test-utils';
|
5
|
-
import Radio from '@material-ui/core/Radio';
|
6
|
-
import HiRadio from './HiRadio';
|
7
|
-
describe('<HiRadio/>', function () {
|
8
|
-
var shallow;
|
9
|
-
var mount;
|
10
|
-
before(function () {
|
11
|
-
shallow = createShallow({
|
12
|
-
dive: true
|
13
|
-
});
|
14
|
-
});
|
15
|
-
beforeEach(function () {
|
16
|
-
mount = createMount();
|
17
|
-
});
|
18
|
-
afterEach(function () {
|
19
|
-
mount.cleanUp();
|
20
|
-
});
|
21
|
-
it('Should render a Radio', function () {
|
22
|
-
var wrapper = shallow(React.createElement(HiRadio, null));
|
23
|
-
assert.strictEqual(wrapper.find(Radio).length, 1, 'render Radio');
|
24
|
-
});
|
25
|
-
var event = {
|
26
|
-
target: {
|
27
|
-
checked: false
|
28
|
-
}
|
29
|
-
};
|
30
|
-
it('should call onChange exactly once with event', function () {
|
31
|
-
var onChangeSpy = spy();
|
32
|
-
var wrapper = mount(React.createElement(HiRadio, {
|
33
|
-
onChange: onChangeSpy
|
34
|
-
}));
|
35
|
-
assert.strictEqual(onChangeSpy.callCount, 0);
|
36
|
-
wrapper.find('input').simulate('change', event);
|
37
|
-
assert.strictEqual(onChangeSpy.callCount, 1);
|
38
|
-
assert.strictEqual(onChangeSpy.args[0][0].target, event.target);
|
39
|
-
onChangeSpy.resetHistory();
|
40
|
-
});
|
41
|
-
it('should call onChange exactly once with event', function () {
|
42
|
-
var onChangeSpy = spy();
|
43
|
-
var wrapper = mount(React.createElement(HiRadio, {
|
44
|
-
onChange: onChangeSpy
|
45
|
-
}));
|
46
|
-
assert.strictEqual(onChangeSpy.callCount, 0);
|
47
|
-
wrapper.find('input').simulate('change', null);
|
48
|
-
assert.strictEqual(onChangeSpy.callCount, 1);
|
49
|
-
onChangeSpy.resetHistory();
|
50
|
-
});
|
51
|
-
it('should mount', function () {
|
52
|
-
var wrapper = mount(React.createElement(HiRadio, {
|
53
|
-
onChange: undefined
|
54
|
-
}));
|
55
|
-
assert.strictEqual(wrapper.find(Radio).length, 1, 'render Radio');
|
56
|
-
});
|
57
|
-
});
|