@gympass/yoga 7.60.0 → 7.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Drawer/web/Content.js +1 -4
- package/cjs/Menu/web/Menu.js +1 -1
- package/cjs/Menu/web/MenuList.js +14 -7
- package/esm/Drawer/web/Content.js +1 -4
- package/esm/Menu/web/Menu.js +1 -1
- package/esm/Menu/web/MenuList.js +14 -7
- package/package.json +5 -5
- package/cjs/ActionRequirement/native/ActionRequirement.test.js +0 -1
- package/cjs/ActionRequirement/web/ActionRequirement.test.js +0 -40
- package/cjs/AutoComplete/web/AutoComplete.test.js +0 -156
- package/cjs/Avatar/native/Avatar.test.js +0 -1
- package/cjs/Avatar/web/Avatar.test.js +0 -72
- package/cjs/Banner/native/Banner.test.js +0 -1
- package/cjs/Banner/web/Banner.test.js +0 -121
- package/cjs/BottomSheet/web/BottomSheet.test.js +0 -61
- package/cjs/Box/native/Box.test.js +0 -1
- package/cjs/Box/web/Box.test.js +0 -23
- package/cjs/Button/native/Button.test.js +0 -1
- package/cjs/Button/web/Button.test.js +0 -778
- package/cjs/Card/native/Card/Card.test.js +0 -1
- package/cjs/Card/native/EventCard/EventCard.test.js +0 -1
- package/cjs/Card/native/GymCard/CheckIn/CheckIn.test.js +0 -1
- package/cjs/Card/native/PlanCard/PlanCard.test.js +0 -1
- package/cjs/Card/web/Card/Card.test.js +0 -22
- package/cjs/Card/web/EventCard/EventCard.test.js +0 -35
- package/cjs/Card/web/PlanCard/PlanCard.test.js +0 -104
- package/cjs/Checkbox/native/Checkbox.test.js +0 -1
- package/cjs/Checkbox/native/Switch.test.js +0 -1
- package/cjs/Checkbox/web/Checkbox.test.js +0 -161
- package/cjs/Checkbox/web/Switch.test.js +0 -65
- package/cjs/Chips/native/Chips.test.js +0 -1
- package/cjs/Chips/web/Chips.test.js +0 -138
- package/cjs/Datepicker/web/Datepicker.test.js +0 -286
- package/cjs/Dialog/web/Dialog.test.js +0 -78
- package/cjs/Divider/native/Divider.test.js +0 -1
- package/cjs/Divider/web/Divider.test.js +0 -36
- package/cjs/Drawer/web/Drawer.test.js +0 -46
- package/cjs/Dropdown/native/Backdrop.test.js +0 -1
- package/cjs/Dropdown/native/Dropdown.test.js +0 -1
- package/cjs/Dropdown/web/Dropdown.test.js +0 -102
- package/cjs/Feedback/web/Feedback.test.js +0 -89
- package/cjs/Grid/web/Col.test.js +0 -56
- package/cjs/Grid/web/Container.test.js +0 -22
- package/cjs/Grid/web/Hide.test.js +0 -39
- package/cjs/Grid/web/Row.test.js +0 -22
- package/cjs/Header/web/Header.test.js +0 -49
- package/cjs/Heading/web/Heading.test.js +0 -68
- package/cjs/Icon/native/Icon.test.js +0 -1
- package/cjs/Icon/web/Icon.test.js +0 -53
- package/cjs/Input/native/Email.test.js +0 -1
- package/cjs/Input/native/Input.test.js +0 -1
- package/cjs/Input/native/Number.test.js +0 -1
- package/cjs/Input/native/Password.test.js +0 -1
- package/cjs/Input/native/Tel.test.js +0 -1
- package/cjs/Input/web/Email.test.js +0 -20
- package/cjs/Input/web/Input.test.js +0 -161
- package/cjs/Input/web/Number.test.js +0 -20
- package/cjs/Input/web/Password.test.js +0 -103
- package/cjs/Input/web/Tel.test.js +0 -20
- package/cjs/List/native/List.test.js +0 -1
- package/cjs/List/web/List.test.js +0 -69
- package/cjs/Menu/web/Menu.test.js +0 -123
- package/cjs/Popover/web/Popover.test.js +0 -27
- package/cjs/Progress/native/Progress.test.js +0 -1
- package/cjs/Progress/web/Progress.test.js +0 -229
- package/cjs/RadioGroup/native/Button/RadioButton.test.js +0 -1
- package/cjs/RadioGroup/native/Radio/Radio.test.js +0 -1
- package/cjs/RadioGroup/native/RadioGroup.test.js +0 -1
- package/cjs/RadioGroup/web/Button/RadioButton.test.js +0 -132
- package/cjs/RadioGroup/web/Radio/Radio.test.js +0 -119
- package/cjs/RadioGroup/web/RadioGroup.test.js +0 -93
- package/cjs/Rating/native/Rating.test.js +0 -1
- package/cjs/Rating/web/Rating.test.js +0 -201
- package/cjs/Result/native/Result.test.js +0 -1
- package/cjs/Skeleton/native/Skeleton.test.js +0 -1
- package/cjs/Skeleton/web/Skeleton.test.js +0 -84
- package/cjs/Slider/native/Slider.test.js +0 -1
- package/cjs/Slider/web/Slider.test.js +0 -95
- package/cjs/Snackbar/native/Snackbar.test.js +0 -1
- package/cjs/Snackbar/web/Snackbar.test.js +0 -137
- package/cjs/Stepper/native/Stepper.test.js +0 -1
- package/cjs/Stepper/web/Stepper.test.js +0 -75
- package/cjs/Tag/native/Tag.test.js +0 -1
- package/cjs/Tag/web/Tag.test.js +0 -87
- package/cjs/Text/native/Text.test.js +0 -1
- package/cjs/Text/web/Text.test.js +0 -157
- package/cjs/TextArea/native/TextArea.test.js +0 -1
- package/cjs/TextArea/web/TextArea.test.js +0 -18
- package/cjs/Theme/Provider/web/FontLoader.test.js +0 -19
- package/cjs/Theme/Provider/web/GlobalStyle.test.js +0 -27
- package/cjs/Theme/helpers/themeReader/native/native.test.js +0 -1
- package/cjs/Theme/helpers/themeReader/web/web.test.js +0 -54
- package/esm/ActionRequirement/index.native.js +0 -2
- package/esm/ActionRequirement/native/ActionRequirement.js +0 -48
- package/esm/ActionRequirement/native/ActionRequirement.test.js +0 -45
- package/esm/ActionRequirement/native/ActionRequirementStyles.js +0 -25
- package/esm/ActionRequirement/native/index.js +0 -6
- package/esm/ActionRequirement/web/ActionRequirement.test.js +0 -31
- package/esm/AutoComplete/web/AutoComplete.test.js +0 -139
- package/esm/Avatar/index.native.js +0 -4
- package/esm/Avatar/native/Avatar.js +0 -96
- package/esm/Avatar/native/Avatar.test.js +0 -46
- package/esm/Avatar/native/AvatarCircle.js +0 -24
- package/esm/Avatar/web/Avatar.test.js +0 -63
- package/esm/Banner/index.native.js +0 -2
- package/esm/Banner/native/Banner.js +0 -128
- package/esm/Banner/native/Banner.test.js +0 -103
- package/esm/Banner/native/index.js +0 -2
- package/esm/Banner/web/Banner.test.js +0 -109
- package/esm/BottomSheet/web/BottomSheet.test.js +0 -48
- package/esm/Box/index.native.js +0 -2
- package/esm/Box/native/Box.js +0 -4
- package/esm/Box/native/Box.test.js +0 -16
- package/esm/Box/native/index.js +0 -2
- package/esm/Box/web/Box.test.js +0 -16
- package/esm/Button/index.native.js +0 -8
- package/esm/Button/native/Button.js +0 -110
- package/esm/Button/native/Button.test.js +0 -475
- package/esm/Button/native/Icon.js +0 -82
- package/esm/Button/native/Link.js +0 -35
- package/esm/Button/native/Text.js +0 -74
- package/esm/Button/native/withTouchable.js +0 -63
- package/esm/Button/web/Button.test.js +0 -764
- package/esm/Card/index.native.js +0 -2
- package/esm/Card/native/Card/Actions.js +0 -12
- package/esm/Card/native/Card/Card.js +0 -92
- package/esm/Card/native/Card/Card.test.js +0 -15
- package/esm/Card/native/Card/Content.js +0 -8
- package/esm/Card/native/Card/Header.js +0 -8
- package/esm/Card/native/Card/index.js +0 -8
- package/esm/Card/native/EventCard/EventCard.js +0 -169
- package/esm/Card/native/EventCard/EventCard.test.js +0 -65
- package/esm/Card/native/EventCard/index.js +0 -2
- package/esm/Card/native/GymCard/CheckIn/Avatar.js +0 -17
- package/esm/Card/native/GymCard/CheckIn/CheckIn.js +0 -66
- package/esm/Card/native/GymCard/CheckIn/CheckIn.test.js +0 -39
- package/esm/Card/native/GymCard/CheckIn/Content.js +0 -11
- package/esm/Card/native/GymCard/CheckIn/Header.js +0 -11
- package/esm/Card/native/GymCard/CheckIn/index.js +0 -2
- package/esm/Card/native/GymCard/index.js +0 -5
- package/esm/Card/native/PlanCard/Actions.js +0 -22
- package/esm/Card/native/PlanCard/Content.js +0 -75
- package/esm/Card/native/PlanCard/List.js +0 -73
- package/esm/Card/native/PlanCard/PlanCard.js +0 -51
- package/esm/Card/native/PlanCard/PlanCard.test.js +0 -84
- package/esm/Card/native/PlanCard/Subtitle.js +0 -15
- package/esm/Card/native/PlanCard/Tag.js +0 -34
- package/esm/Card/native/PlanCard/index.js +0 -15
- package/esm/Card/native/index.js +0 -5
- package/esm/Card/web/Card/Card.test.js +0 -14
- package/esm/Card/web/EventCard/EventCard.test.js +0 -27
- package/esm/Card/web/PlanCard/PlanCard.test.js +0 -94
- package/esm/Checkbox/index.native.js +0 -3
- package/esm/Checkbox/native/Checkbox.js +0 -179
- package/esm/Checkbox/native/Checkbox.test.js +0 -115
- package/esm/Checkbox/native/Switch.js +0 -115
- package/esm/Checkbox/native/Switch.test.js +0 -54
- package/esm/Checkbox/native/index.js +0 -3
- package/esm/Checkbox/web/Checkbox.test.js +0 -153
- package/esm/Checkbox/web/Switch.test.js +0 -56
- package/esm/Chips/index.native.js +0 -2
- package/esm/Chips/native/Chips.js +0 -104
- package/esm/Chips/native/Chips.test.js +0 -143
- package/esm/Chips/native/Counter.js +0 -20
- package/esm/Chips/native/index.js +0 -2
- package/esm/Chips/web/Chips.test.js +0 -128
- package/esm/Datepicker/web/Datepicker.test.js +0 -247
- package/esm/Dialog/web/Dialog.test.js +0 -62
- package/esm/Divider/index.native.js +0 -2
- package/esm/Divider/native/Divider.js +0 -29
- package/esm/Divider/native/Divider.test.js +0 -29
- package/esm/Divider/native/index.js +0 -2
- package/esm/Divider/web/Divider.test.js +0 -29
- package/esm/Drawer/web/Drawer.test.js +0 -33
- package/esm/Dropdown/index.native.js +0 -2
- package/esm/Dropdown/native/Backdrop.js +0 -93
- package/esm/Dropdown/native/Backdrop.test.js +0 -26
- package/esm/Dropdown/native/Dropdown.js +0 -142
- package/esm/Dropdown/native/Dropdown.test.js +0 -78
- package/esm/Dropdown/native/Options.android.js +0 -66
- package/esm/Dropdown/native/Options.ios.js +0 -71
- package/esm/Dropdown/native/index.js +0 -2
- package/esm/Dropdown/web/Dropdown.test.js +0 -93
- package/esm/Feedback/web/Feedback.test.js +0 -83
- package/esm/Grid/web/Col.test.js +0 -48
- package/esm/Grid/web/Container.test.js +0 -14
- package/esm/Grid/web/Hide.test.js +0 -31
- package/esm/Grid/web/Row.test.js +0 -14
- package/esm/Header/web/Header.test.js +0 -38
- package/esm/Heading/web/Heading.test.js +0 -58
- package/esm/Icon/index.native.js +0 -2
- package/esm/Icon/native/Icon.test.js +0 -47
- package/esm/Icon/native/index.js +0 -2
- package/esm/Icon/web/Icon.test.js +0 -47
- package/esm/Input/index.native.js +0 -6
- package/esm/Input/native/Email.js +0 -15
- package/esm/Input/native/Email.test.js +0 -13
- package/esm/Input/native/Helper.js +0 -62
- package/esm/Input/native/Input.js +0 -234
- package/esm/Input/native/Input.test.js +0 -181
- package/esm/Input/native/Number.js +0 -12
- package/esm/Input/native/Number.test.js +0 -13
- package/esm/Input/native/Password.js +0 -112
- package/esm/Input/native/Password.test.js +0 -125
- package/esm/Input/native/Tel.js +0 -14
- package/esm/Input/native/Tel.test.js +0 -13
- package/esm/Input/native/index.js +0 -6
- package/esm/Input/web/Email.test.js +0 -13
- package/esm/Input/web/Input.test.js +0 -145
- package/esm/Input/web/Number.test.js +0 -13
- package/esm/Input/web/Password.test.js +0 -90
- package/esm/Input/web/Tel.test.js +0 -13
- package/esm/List/index.native.js +0 -3
- package/esm/List/native/List.js +0 -22
- package/esm/List/native/List.test.js +0 -106
- package/esm/List/native/ListItem.js +0 -51
- package/esm/List/native/index.js +0 -3
- package/esm/List/web/List.test.js +0 -62
- package/esm/Menu/web/Menu.test.js +0 -115
- package/esm/Popover/web/Popover.test.js +0 -19
- package/esm/Progress/index.native.js +0 -2
- package/esm/Progress/native/Progress.js +0 -103
- package/esm/Progress/native/Progress.test.js +0 -222
- package/esm/Progress/native/index.js +0 -2
- package/esm/Progress/web/Progress.test.js +0 -222
- package/esm/RadioGroup/index.native.js +0 -4
- package/esm/RadioGroup/native/Button/RadioButton.js +0 -64
- package/esm/RadioGroup/native/Button/RadioButton.test.js +0 -96
- package/esm/RadioGroup/native/Radio/Radio.js +0 -88
- package/esm/RadioGroup/native/Radio/Radio.test.js +0 -112
- package/esm/RadioGroup/native/RadioGroup.js +0 -66
- package/esm/RadioGroup/native/RadioGroup.test.js +0 -50
- package/esm/RadioGroup/native/index.js +0 -4
- package/esm/RadioGroup/web/Button/RadioButton.test.js +0 -121
- package/esm/RadioGroup/web/Radio/Radio.test.js +0 -108
- package/esm/RadioGroup/web/RadioGroup.test.js +0 -83
- package/esm/Rating/index.native.js +0 -2
- package/esm/Rating/native/Rating.js +0 -186
- package/esm/Rating/native/Rating.test.js +0 -121
- package/esm/Rating/native/index.js +0 -2
- package/esm/Rating/web/Rating.test.js +0 -184
- package/esm/Result/index.native.js +0 -8
- package/esm/Result/native/Attendances.js +0 -55
- package/esm/Result/native/Details.js +0 -97
- package/esm/Result/native/Rate.js +0 -35
- package/esm/Result/native/Result.js +0 -86
- package/esm/Result/native/Result.test.js +0 -107
- package/esm/Result/native/ResultButton.js +0 -13
- package/esm/Result/native/Tags.js +0 -41
- package/esm/Result/native/TinyTextIcon.js +0 -18
- package/esm/Result/native/index.js +0 -2
- package/esm/Skeleton/index.native.js +0 -2
- package/esm/Skeleton/native/Skeleton.js +0 -94
- package/esm/Skeleton/native/Skeleton.test.js +0 -78
- package/esm/Skeleton/native/index.js +0 -2
- package/esm/Skeleton/web/Skeleton.test.js +0 -77
- package/esm/Slider/index.native.js +0 -2
- package/esm/Slider/native/Label.js +0 -19
- package/esm/Slider/native/Marker.js +0 -68
- package/esm/Slider/native/Slider.js +0 -156
- package/esm/Slider/native/Slider.test.js +0 -122
- package/esm/Slider/native/Step.js +0 -14
- package/esm/Slider/native/Tooltip.js +0 -90
- package/esm/Slider/web/Slider.test.js +0 -86
- package/esm/Snackbar/index.native.js +0 -2
- package/esm/Snackbar/native/Snackbar.js +0 -199
- package/esm/Snackbar/native/Snackbar.test.js +0 -100
- package/esm/Snackbar/native/SnackbarAnimationWrapper.js +0 -124
- package/esm/Snackbar/native/index.js +0 -2
- package/esm/Snackbar/web/Snackbar.test.js +0 -118
- package/esm/Stepper/index.native.js +0 -3
- package/esm/Stepper/native/Dots.js +0 -45
- package/esm/Stepper/native/Line.js +0 -35
- package/esm/Stepper/native/Step.js +0 -19
- package/esm/Stepper/native/Stepper.js +0 -52
- package/esm/Stepper/native/Stepper.test.js +0 -70
- package/esm/Stepper/native/index.js +0 -3
- package/esm/Stepper/web/Stepper.test.js +0 -67
- package/esm/Tag/index.native.js +0 -4
- package/esm/Tag/native/Informative.js +0 -72
- package/esm/Tag/native/Tag.js +0 -75
- package/esm/Tag/native/Tag.test.js +0 -94
- package/esm/Tag/native/index.js +0 -2
- package/esm/Tag/web/Tag.test.js +0 -79
- package/esm/Text/index.native.js +0 -16
- package/esm/Text/native/Text.js +0 -69
- package/esm/Text/native/Text.test.js +0 -149
- package/esm/Text/native/index.js +0 -2
- package/esm/Text/web/Text.test.js +0 -149
- package/esm/TextArea/index.native.js +0 -2
- package/esm/TextArea/native/TextArea.js +0 -59
- package/esm/TextArea/native/TextArea.test.js +0 -11
- package/esm/TextArea/native/index.js +0 -2
- package/esm/TextArea/web/TextArea.test.js +0 -11
- package/esm/Theme/Provider/index.native.js +0 -2
- package/esm/Theme/Provider/native/index.js +0 -2
- package/esm/Theme/Provider/web/FontLoader.test.js +0 -11
- package/esm/Theme/Provider/web/GlobalStyle.test.js +0 -17
- package/esm/Theme/helpers/themeReader/native/native.test.js +0 -53
- package/esm/Theme/helpers/themeReader/web/web.test.js +0 -41
- package/esm/Theme/index.native.js +0 -5
- package/esm/index.native.js +0 -26
- package/esm/shared/index.native.js +0 -2
|
@@ -1,764 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, fireEvent } from '@testing-library/react';
|
|
3
|
-
import { Booking, Close } from '@gympass/yoga-icons';
|
|
4
|
-
import ThemeProvider from '../../Theme';
|
|
5
|
-
import Button from '..';
|
|
6
|
-
describe('<Button />', function () {
|
|
7
|
-
describe('Snapshots', function () {
|
|
8
|
-
describe('primary buttons', function () {
|
|
9
|
-
describe('Without props', function () {
|
|
10
|
-
it('should match snapshot with default Button', function () {
|
|
11
|
-
var _render = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, null))),
|
|
12
|
-
container = _render.container;
|
|
13
|
-
|
|
14
|
-
expect(container).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
17
|
-
var _render2 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
18
|
-
icon: Booking
|
|
19
|
-
}))),
|
|
20
|
-
container = _render2.container;
|
|
21
|
-
|
|
22
|
-
expect(container).toMatchSnapshot();
|
|
23
|
-
});
|
|
24
|
-
it('should match snapshot with outline Button', function () {
|
|
25
|
-
var _render3 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, null))),
|
|
26
|
-
container = _render3.container;
|
|
27
|
-
|
|
28
|
-
expect(container).toMatchSnapshot();
|
|
29
|
-
});
|
|
30
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
31
|
-
var _render4 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
32
|
-
icon: Booking
|
|
33
|
-
}))),
|
|
34
|
-
container = _render4.container;
|
|
35
|
-
|
|
36
|
-
expect(container).toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
it('should match snapshot with text Button', function () {
|
|
39
|
-
var _render5 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, null))),
|
|
40
|
-
container = _render5.container;
|
|
41
|
-
|
|
42
|
-
expect(container).toMatchSnapshot();
|
|
43
|
-
});
|
|
44
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
45
|
-
var _render6 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
46
|
-
icon: Booking
|
|
47
|
-
}))),
|
|
48
|
-
container = _render6.container;
|
|
49
|
-
|
|
50
|
-
expect(container).toMatchSnapshot();
|
|
51
|
-
});
|
|
52
|
-
it('should match snapshot with link Button', function () {
|
|
53
|
-
var _render7 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Link, null))),
|
|
54
|
-
container = _render7.container;
|
|
55
|
-
|
|
56
|
-
expect(container).toMatchSnapshot();
|
|
57
|
-
});
|
|
58
|
-
it('should match snapshot with icon Button', function () {
|
|
59
|
-
var _render8 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
60
|
-
icon: Booking
|
|
61
|
-
}))),
|
|
62
|
-
container = _render8.container;
|
|
63
|
-
|
|
64
|
-
expect(container).toMatchSnapshot();
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
describe('With inverted prop', function () {
|
|
68
|
-
it('should match snapshot with default Button', function () {
|
|
69
|
-
var _render9 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
70
|
-
inverted: true
|
|
71
|
-
}))),
|
|
72
|
-
container = _render9.container;
|
|
73
|
-
|
|
74
|
-
expect(container).toMatchSnapshot();
|
|
75
|
-
});
|
|
76
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
77
|
-
var _render10 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
78
|
-
inverted: true,
|
|
79
|
-
icon: Booking
|
|
80
|
-
}))),
|
|
81
|
-
container = _render10.container;
|
|
82
|
-
|
|
83
|
-
expect(container).toMatchSnapshot();
|
|
84
|
-
});
|
|
85
|
-
it('should match snapshot with outline Button', function () {
|
|
86
|
-
var _render11 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
87
|
-
inverted: true
|
|
88
|
-
}))),
|
|
89
|
-
container = _render11.container;
|
|
90
|
-
|
|
91
|
-
expect(container).toMatchSnapshot();
|
|
92
|
-
});
|
|
93
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
94
|
-
var _render12 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
95
|
-
inverted: true,
|
|
96
|
-
icon: Booking
|
|
97
|
-
}))),
|
|
98
|
-
container = _render12.container;
|
|
99
|
-
|
|
100
|
-
expect(container).toMatchSnapshot();
|
|
101
|
-
});
|
|
102
|
-
it('should match snapshot with text Button', function () {
|
|
103
|
-
var _render13 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
104
|
-
inverted: true
|
|
105
|
-
}))),
|
|
106
|
-
container = _render13.container;
|
|
107
|
-
|
|
108
|
-
expect(container).toMatchSnapshot();
|
|
109
|
-
});
|
|
110
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
111
|
-
var _render14 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
112
|
-
inverted: true,
|
|
113
|
-
icon: Booking
|
|
114
|
-
}))),
|
|
115
|
-
container = _render14.container;
|
|
116
|
-
|
|
117
|
-
expect(container).toMatchSnapshot();
|
|
118
|
-
});
|
|
119
|
-
it('should match snapshot with icon Button', function () {
|
|
120
|
-
var _render15 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
121
|
-
inverted: true,
|
|
122
|
-
icon: Booking
|
|
123
|
-
}))),
|
|
124
|
-
container = _render15.container;
|
|
125
|
-
|
|
126
|
-
expect(container).toMatchSnapshot();
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
describe('With small prop', function () {
|
|
130
|
-
it('should match snapshot with default Button', function () {
|
|
131
|
-
var _render16 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
132
|
-
small: true
|
|
133
|
-
}))),
|
|
134
|
-
container = _render16.container;
|
|
135
|
-
|
|
136
|
-
expect(container).toMatchSnapshot();
|
|
137
|
-
});
|
|
138
|
-
it('should match snapshot with outline Button', function () {
|
|
139
|
-
var _render17 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
140
|
-
small: true
|
|
141
|
-
}))),
|
|
142
|
-
container = _render17.container;
|
|
143
|
-
|
|
144
|
-
expect(container).toMatchSnapshot();
|
|
145
|
-
});
|
|
146
|
-
it('should match snapshot with text Button', function () {
|
|
147
|
-
var _render18 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
148
|
-
small: true
|
|
149
|
-
}))),
|
|
150
|
-
container = _render18.container;
|
|
151
|
-
|
|
152
|
-
expect(container).toMatchSnapshot();
|
|
153
|
-
});
|
|
154
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
155
|
-
var _render19 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
156
|
-
small: true,
|
|
157
|
-
icon: Booking
|
|
158
|
-
}))),
|
|
159
|
-
container = _render19.container;
|
|
160
|
-
|
|
161
|
-
expect(container).toMatchSnapshot();
|
|
162
|
-
});
|
|
163
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
164
|
-
var _render20 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
165
|
-
icon: Booking,
|
|
166
|
-
small: true
|
|
167
|
-
}))),
|
|
168
|
-
container = _render20.container;
|
|
169
|
-
|
|
170
|
-
expect(container).toMatchSnapshot();
|
|
171
|
-
});
|
|
172
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
173
|
-
var _render21 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
174
|
-
icon: Booking,
|
|
175
|
-
small: true
|
|
176
|
-
}))),
|
|
177
|
-
container = _render21.container;
|
|
178
|
-
|
|
179
|
-
expect(container).toMatchSnapshot();
|
|
180
|
-
});
|
|
181
|
-
it('should match snapshot with icon Button', function () {
|
|
182
|
-
var _render22 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
183
|
-
icon: Booking,
|
|
184
|
-
small: true
|
|
185
|
-
}))),
|
|
186
|
-
container = _render22.container;
|
|
187
|
-
|
|
188
|
-
expect(container).toMatchSnapshot();
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
describe('With full prop', function () {
|
|
192
|
-
it('should match snapshot with default Button', function () {
|
|
193
|
-
var _render23 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
194
|
-
full: true
|
|
195
|
-
}))),
|
|
196
|
-
container = _render23.container;
|
|
197
|
-
|
|
198
|
-
expect(container).toMatchSnapshot();
|
|
199
|
-
});
|
|
200
|
-
it('should match snapshot with outline Button', function () {
|
|
201
|
-
var _render24 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
202
|
-
full: true
|
|
203
|
-
}))),
|
|
204
|
-
container = _render24.container;
|
|
205
|
-
|
|
206
|
-
expect(container).toMatchSnapshot();
|
|
207
|
-
});
|
|
208
|
-
it('should match snapshot with text Button', function () {
|
|
209
|
-
var _render25 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
210
|
-
full: true
|
|
211
|
-
}))),
|
|
212
|
-
container = _render25.container;
|
|
213
|
-
|
|
214
|
-
expect(container).toMatchSnapshot();
|
|
215
|
-
});
|
|
216
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
217
|
-
var _render26 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
218
|
-
full: true,
|
|
219
|
-
icon: Booking
|
|
220
|
-
}))),
|
|
221
|
-
container = _render26.container;
|
|
222
|
-
|
|
223
|
-
expect(container).toMatchSnapshot();
|
|
224
|
-
});
|
|
225
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
226
|
-
var _render27 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
227
|
-
full: true,
|
|
228
|
-
icon: Booking
|
|
229
|
-
}))),
|
|
230
|
-
container = _render27.container;
|
|
231
|
-
|
|
232
|
-
expect(container).toMatchSnapshot();
|
|
233
|
-
});
|
|
234
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
235
|
-
var _render28 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
236
|
-
full: true,
|
|
237
|
-
icon: Booking
|
|
238
|
-
}))),
|
|
239
|
-
container = _render28.container;
|
|
240
|
-
|
|
241
|
-
expect(container).toMatchSnapshot();
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
describe('With disabled prop', function () {
|
|
245
|
-
it('should match snapshot with default Button', function () {
|
|
246
|
-
var _render29 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
247
|
-
disabled: true
|
|
248
|
-
}))),
|
|
249
|
-
container = _render29.container;
|
|
250
|
-
|
|
251
|
-
expect(container).toMatchSnapshot();
|
|
252
|
-
});
|
|
253
|
-
it('should match snapshot with outline Button', function () {
|
|
254
|
-
var _render30 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
255
|
-
disabled: true
|
|
256
|
-
}))),
|
|
257
|
-
container = _render30.container;
|
|
258
|
-
|
|
259
|
-
expect(container).toMatchSnapshot();
|
|
260
|
-
});
|
|
261
|
-
it('should match snapshot with text Button', function () {
|
|
262
|
-
var _render31 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
263
|
-
disabled: true
|
|
264
|
-
}))),
|
|
265
|
-
container = _render31.container;
|
|
266
|
-
|
|
267
|
-
expect(container).toMatchSnapshot();
|
|
268
|
-
});
|
|
269
|
-
it('should match snapshot with link Button', function () {
|
|
270
|
-
var _render32 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Link, {
|
|
271
|
-
disabled: true
|
|
272
|
-
}))),
|
|
273
|
-
container = _render32.container;
|
|
274
|
-
|
|
275
|
-
expect(container).toMatchSnapshot();
|
|
276
|
-
});
|
|
277
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
278
|
-
var _render33 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
279
|
-
disabled: true,
|
|
280
|
-
icon: Booking
|
|
281
|
-
}))),
|
|
282
|
-
container = _render33.container;
|
|
283
|
-
|
|
284
|
-
expect(container).toMatchSnapshot();
|
|
285
|
-
});
|
|
286
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
287
|
-
var _render34 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
288
|
-
disabled: true,
|
|
289
|
-
icon: Booking
|
|
290
|
-
}))),
|
|
291
|
-
container = _render34.container;
|
|
292
|
-
|
|
293
|
-
expect(container).toMatchSnapshot();
|
|
294
|
-
});
|
|
295
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
296
|
-
var _render35 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
297
|
-
disabled: true,
|
|
298
|
-
icon: Booking
|
|
299
|
-
}))),
|
|
300
|
-
container = _render35.container;
|
|
301
|
-
|
|
302
|
-
expect(container).toMatchSnapshot();
|
|
303
|
-
});
|
|
304
|
-
it('should match snapshot with icon Button', function () {
|
|
305
|
-
var _render36 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
306
|
-
disabled: true,
|
|
307
|
-
icon: Booking
|
|
308
|
-
}))),
|
|
309
|
-
container = _render36.container;
|
|
310
|
-
|
|
311
|
-
expect(container).toMatchSnapshot();
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
});
|
|
315
|
-
describe('buttons rendering as an anchor', function () {
|
|
316
|
-
it('Default Button with href prop', function () {
|
|
317
|
-
var _render37 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
318
|
-
href: "http://www.gympass.com",
|
|
319
|
-
target: "blank"
|
|
320
|
-
}, "Default Button as an anchor"))),
|
|
321
|
-
container = _render37.container;
|
|
322
|
-
|
|
323
|
-
expect(container).toMatchSnapshot();
|
|
324
|
-
});
|
|
325
|
-
it('Link Button with href prop', function () {
|
|
326
|
-
var _render38 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Link, {
|
|
327
|
-
href: "http://www.gympass.com",
|
|
328
|
-
target: "blank"
|
|
329
|
-
}, "Link as an anchor"))),
|
|
330
|
-
container = _render38.container;
|
|
331
|
-
|
|
332
|
-
expect(container).toMatchSnapshot();
|
|
333
|
-
});
|
|
334
|
-
it('Outline Button with href prop', function () {
|
|
335
|
-
var _render39 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
336
|
-
href: "http://www.gympass.com",
|
|
337
|
-
target: "blank"
|
|
338
|
-
}, "Outline as an anchor"))),
|
|
339
|
-
container = _render39.container;
|
|
340
|
-
|
|
341
|
-
expect(container).toMatchSnapshot();
|
|
342
|
-
});
|
|
343
|
-
it('Text Button with href prop', function () {
|
|
344
|
-
var _render40 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
345
|
-
href: "http://www.gympass.com",
|
|
346
|
-
target: "blank"
|
|
347
|
-
}, "Text as an anchor"))),
|
|
348
|
-
container = _render40.container;
|
|
349
|
-
|
|
350
|
-
expect(container).toMatchSnapshot();
|
|
351
|
-
});
|
|
352
|
-
});
|
|
353
|
-
describe('secondary buttons', function () {
|
|
354
|
-
describe('Without props', function () {
|
|
355
|
-
it('should match snapshot with default Button', function () {
|
|
356
|
-
var _render41 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
357
|
-
secondary: true
|
|
358
|
-
}))),
|
|
359
|
-
container = _render41.container;
|
|
360
|
-
|
|
361
|
-
expect(container).toMatchSnapshot();
|
|
362
|
-
});
|
|
363
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
364
|
-
var _render42 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
365
|
-
secondary: true,
|
|
366
|
-
icon: Booking
|
|
367
|
-
}))),
|
|
368
|
-
container = _render42.container;
|
|
369
|
-
|
|
370
|
-
expect(container).toMatchSnapshot();
|
|
371
|
-
});
|
|
372
|
-
it('should match snapshot with outline Button', function () {
|
|
373
|
-
var _render43 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
374
|
-
secondary: true
|
|
375
|
-
}))),
|
|
376
|
-
container = _render43.container;
|
|
377
|
-
|
|
378
|
-
expect(container).toMatchSnapshot();
|
|
379
|
-
});
|
|
380
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
381
|
-
var _render44 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
382
|
-
icon: Booking,
|
|
383
|
-
secondary: true
|
|
384
|
-
}))),
|
|
385
|
-
container = _render44.container;
|
|
386
|
-
|
|
387
|
-
expect(container).toMatchSnapshot();
|
|
388
|
-
});
|
|
389
|
-
it('should match snapshot with text Button', function () {
|
|
390
|
-
var _render45 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
391
|
-
secondary: true
|
|
392
|
-
}))),
|
|
393
|
-
container = _render45.container;
|
|
394
|
-
|
|
395
|
-
expect(container).toMatchSnapshot();
|
|
396
|
-
});
|
|
397
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
398
|
-
var _render46 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
399
|
-
secondary: true,
|
|
400
|
-
icon: Booking
|
|
401
|
-
}))),
|
|
402
|
-
container = _render46.container;
|
|
403
|
-
|
|
404
|
-
expect(container).toMatchSnapshot();
|
|
405
|
-
});
|
|
406
|
-
it('should match snapshot with link Button', function () {
|
|
407
|
-
var _render47 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Link, {
|
|
408
|
-
secondary: true
|
|
409
|
-
}))),
|
|
410
|
-
container = _render47.container;
|
|
411
|
-
|
|
412
|
-
expect(container).toMatchSnapshot();
|
|
413
|
-
});
|
|
414
|
-
it('should match snapshot with icon Button', function () {
|
|
415
|
-
var _render48 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
416
|
-
icon: Booking,
|
|
417
|
-
secondary: true
|
|
418
|
-
}))),
|
|
419
|
-
container = _render48.container;
|
|
420
|
-
|
|
421
|
-
expect(container).toMatchSnapshot();
|
|
422
|
-
});
|
|
423
|
-
});
|
|
424
|
-
describe('With inverted prop', function () {
|
|
425
|
-
it('should match snapshot with default Button', function () {
|
|
426
|
-
var _render49 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
427
|
-
inverted: true,
|
|
428
|
-
secondary: true
|
|
429
|
-
}))),
|
|
430
|
-
container = _render49.container;
|
|
431
|
-
|
|
432
|
-
expect(container).toMatchSnapshot();
|
|
433
|
-
});
|
|
434
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
435
|
-
var _render50 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
436
|
-
inverted: true,
|
|
437
|
-
icon: Booking,
|
|
438
|
-
secondary: true
|
|
439
|
-
}))),
|
|
440
|
-
container = _render50.container;
|
|
441
|
-
|
|
442
|
-
expect(container).toMatchSnapshot();
|
|
443
|
-
});
|
|
444
|
-
it('should match snapshot with outline Button', function () {
|
|
445
|
-
var _render51 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
446
|
-
inverted: true,
|
|
447
|
-
secondary: true
|
|
448
|
-
}))),
|
|
449
|
-
container = _render51.container;
|
|
450
|
-
|
|
451
|
-
expect(container).toMatchSnapshot();
|
|
452
|
-
});
|
|
453
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
454
|
-
var _render52 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
455
|
-
inverted: true,
|
|
456
|
-
icon: Booking,
|
|
457
|
-
secondary: true
|
|
458
|
-
}))),
|
|
459
|
-
container = _render52.container;
|
|
460
|
-
|
|
461
|
-
expect(container).toMatchSnapshot();
|
|
462
|
-
});
|
|
463
|
-
it('should match snapshot with text Button', function () {
|
|
464
|
-
var _render53 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
465
|
-
inverted: true,
|
|
466
|
-
secondary: true
|
|
467
|
-
}))),
|
|
468
|
-
container = _render53.container;
|
|
469
|
-
|
|
470
|
-
expect(container).toMatchSnapshot();
|
|
471
|
-
});
|
|
472
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
473
|
-
var _render54 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
474
|
-
inverted: true,
|
|
475
|
-
icon: Booking,
|
|
476
|
-
secondary: true
|
|
477
|
-
}))),
|
|
478
|
-
container = _render54.container;
|
|
479
|
-
|
|
480
|
-
expect(container).toMatchSnapshot();
|
|
481
|
-
});
|
|
482
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
483
|
-
var _render55 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
484
|
-
inverted: true,
|
|
485
|
-
icon: Booking,
|
|
486
|
-
secondary: true
|
|
487
|
-
}))),
|
|
488
|
-
container = _render55.container;
|
|
489
|
-
|
|
490
|
-
expect(container).toMatchSnapshot();
|
|
491
|
-
});
|
|
492
|
-
it('should match snapshot with icon Button', function () {
|
|
493
|
-
var _render56 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
494
|
-
inverted: true,
|
|
495
|
-
icon: Booking,
|
|
496
|
-
secondary: true
|
|
497
|
-
}))),
|
|
498
|
-
container = _render56.container;
|
|
499
|
-
|
|
500
|
-
expect(container).toMatchSnapshot();
|
|
501
|
-
});
|
|
502
|
-
});
|
|
503
|
-
describe('With small prop', function () {
|
|
504
|
-
it('should match snapshot with default Button', function () {
|
|
505
|
-
var _render57 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
506
|
-
small: true,
|
|
507
|
-
secondary: true
|
|
508
|
-
}))),
|
|
509
|
-
container = _render57.container;
|
|
510
|
-
|
|
511
|
-
expect(container).toMatchSnapshot();
|
|
512
|
-
});
|
|
513
|
-
it('should match snapshot with outline Button', function () {
|
|
514
|
-
var _render58 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
515
|
-
small: true,
|
|
516
|
-
secondary: true
|
|
517
|
-
}))),
|
|
518
|
-
container = _render58.container;
|
|
519
|
-
|
|
520
|
-
expect(container).toMatchSnapshot();
|
|
521
|
-
});
|
|
522
|
-
it('should match snapshot with text Button', function () {
|
|
523
|
-
var _render59 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
524
|
-
small: true,
|
|
525
|
-
secondary: true
|
|
526
|
-
}))),
|
|
527
|
-
container = _render59.container;
|
|
528
|
-
|
|
529
|
-
expect(container).toMatchSnapshot();
|
|
530
|
-
});
|
|
531
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
532
|
-
var _render60 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
533
|
-
small: true,
|
|
534
|
-
icon: Booking,
|
|
535
|
-
secondary: true
|
|
536
|
-
}))),
|
|
537
|
-
container = _render60.container;
|
|
538
|
-
|
|
539
|
-
expect(container).toMatchSnapshot();
|
|
540
|
-
});
|
|
541
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
542
|
-
var _render61 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
543
|
-
icon: Booking,
|
|
544
|
-
small: true,
|
|
545
|
-
secondary: true
|
|
546
|
-
}))),
|
|
547
|
-
container = _render61.container;
|
|
548
|
-
|
|
549
|
-
expect(container).toMatchSnapshot();
|
|
550
|
-
});
|
|
551
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
552
|
-
var _render62 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
553
|
-
icon: Booking,
|
|
554
|
-
small: true,
|
|
555
|
-
secondary: true
|
|
556
|
-
}))),
|
|
557
|
-
container = _render62.container;
|
|
558
|
-
|
|
559
|
-
expect(container).toMatchSnapshot();
|
|
560
|
-
});
|
|
561
|
-
it('should match snapshot with icon Button', function () {
|
|
562
|
-
var _render63 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
563
|
-
icon: Booking,
|
|
564
|
-
small: true,
|
|
565
|
-
secondary: true
|
|
566
|
-
}))),
|
|
567
|
-
container = _render63.container;
|
|
568
|
-
|
|
569
|
-
expect(container).toMatchSnapshot();
|
|
570
|
-
});
|
|
571
|
-
});
|
|
572
|
-
describe('With full prop', function () {
|
|
573
|
-
it('should match snapshot with default Button', function () {
|
|
574
|
-
var _render64 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
575
|
-
full: true,
|
|
576
|
-
secondary: true
|
|
577
|
-
}))),
|
|
578
|
-
container = _render64.container;
|
|
579
|
-
|
|
580
|
-
expect(container).toMatchSnapshot();
|
|
581
|
-
});
|
|
582
|
-
it('should match snapshot with outline Button', function () {
|
|
583
|
-
var _render65 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
584
|
-
full: true,
|
|
585
|
-
secondary: true
|
|
586
|
-
}))),
|
|
587
|
-
container = _render65.container;
|
|
588
|
-
|
|
589
|
-
expect(container).toMatchSnapshot();
|
|
590
|
-
});
|
|
591
|
-
it('should match snapshot with text Button', function () {
|
|
592
|
-
var _render66 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
593
|
-
full: true,
|
|
594
|
-
secondary: true
|
|
595
|
-
}))),
|
|
596
|
-
container = _render66.container;
|
|
597
|
-
|
|
598
|
-
expect(container).toMatchSnapshot();
|
|
599
|
-
});
|
|
600
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
601
|
-
var _render67 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
602
|
-
full: true,
|
|
603
|
-
icon: Booking,
|
|
604
|
-
secondary: true
|
|
605
|
-
}))),
|
|
606
|
-
container = _render67.container;
|
|
607
|
-
|
|
608
|
-
expect(container).toMatchSnapshot();
|
|
609
|
-
});
|
|
610
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
611
|
-
var _render68 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
612
|
-
full: true,
|
|
613
|
-
icon: Booking,
|
|
614
|
-
secondary: true
|
|
615
|
-
}))),
|
|
616
|
-
container = _render68.container;
|
|
617
|
-
|
|
618
|
-
expect(container).toMatchSnapshot();
|
|
619
|
-
});
|
|
620
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
621
|
-
var _render69 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
622
|
-
full: true,
|
|
623
|
-
icon: Booking,
|
|
624
|
-
secondary: true
|
|
625
|
-
}))),
|
|
626
|
-
container = _render69.container;
|
|
627
|
-
|
|
628
|
-
expect(container).toMatchSnapshot();
|
|
629
|
-
});
|
|
630
|
-
});
|
|
631
|
-
});
|
|
632
|
-
describe('disabled buttons', function () {
|
|
633
|
-
describe('With disabled prop', function () {
|
|
634
|
-
it('should match snapshot with default Button', function () {
|
|
635
|
-
var _render70 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
636
|
-
disabled: true
|
|
637
|
-
}))),
|
|
638
|
-
container = _render70.container;
|
|
639
|
-
|
|
640
|
-
expect(container).toMatchSnapshot();
|
|
641
|
-
});
|
|
642
|
-
it('should match snapshot with outline Button', function () {
|
|
643
|
-
var _render71 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
644
|
-
disabled: true
|
|
645
|
-
}))),
|
|
646
|
-
container = _render71.container;
|
|
647
|
-
|
|
648
|
-
expect(container).toMatchSnapshot();
|
|
649
|
-
});
|
|
650
|
-
it('should match snapshot with text Button', function () {
|
|
651
|
-
var _render72 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
652
|
-
disabled: true
|
|
653
|
-
}))),
|
|
654
|
-
container = _render72.container;
|
|
655
|
-
|
|
656
|
-
expect(container).toMatchSnapshot();
|
|
657
|
-
});
|
|
658
|
-
it('should match snapshot with link Button', function () {
|
|
659
|
-
var _render73 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Link, {
|
|
660
|
-
disabled: true
|
|
661
|
-
}))),
|
|
662
|
-
container = _render73.container;
|
|
663
|
-
|
|
664
|
-
expect(container).toMatchSnapshot();
|
|
665
|
-
});
|
|
666
|
-
it('should match snapshot with default Button with Icon', function () {
|
|
667
|
-
var _render74 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
668
|
-
disabled: true,
|
|
669
|
-
icon: Booking
|
|
670
|
-
}))),
|
|
671
|
-
container = _render74.container;
|
|
672
|
-
|
|
673
|
-
expect(container).toMatchSnapshot();
|
|
674
|
-
});
|
|
675
|
-
it('should match snapshot with outline Button with Icon', function () {
|
|
676
|
-
var _render75 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
677
|
-
disabled: true,
|
|
678
|
-
icon: Booking
|
|
679
|
-
}))),
|
|
680
|
-
container = _render75.container;
|
|
681
|
-
|
|
682
|
-
expect(container).toMatchSnapshot();
|
|
683
|
-
});
|
|
684
|
-
it('should match snapshot with text Button with Icon', function () {
|
|
685
|
-
var _render76 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
686
|
-
disabled: true,
|
|
687
|
-
icon: Booking
|
|
688
|
-
}))),
|
|
689
|
-
container = _render76.container;
|
|
690
|
-
|
|
691
|
-
expect(container).toMatchSnapshot();
|
|
692
|
-
});
|
|
693
|
-
it('should match snapshot with icon Button', function () {
|
|
694
|
-
var _render77 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
695
|
-
disabled: true,
|
|
696
|
-
icon: Booking
|
|
697
|
-
}))),
|
|
698
|
-
container = _render77.container;
|
|
699
|
-
|
|
700
|
-
expect(container).toMatchSnapshot();
|
|
701
|
-
});
|
|
702
|
-
});
|
|
703
|
-
});
|
|
704
|
-
});
|
|
705
|
-
describe('onClick prop', function () {
|
|
706
|
-
it('should call onClick function when click on Button', function () {
|
|
707
|
-
var onClickMock = jest.fn();
|
|
708
|
-
|
|
709
|
-
var _render78 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
710
|
-
onClick: onClickMock
|
|
711
|
-
}, "Button"))),
|
|
712
|
-
getByText = _render78.getByText;
|
|
713
|
-
|
|
714
|
-
fireEvent.click(getByText('Button'));
|
|
715
|
-
expect(onClickMock).toHaveBeenCalled();
|
|
716
|
-
});
|
|
717
|
-
it('should call onClick function when click on Button.Outline', function () {
|
|
718
|
-
var onClickMock = jest.fn();
|
|
719
|
-
|
|
720
|
-
var _render79 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Outline, {
|
|
721
|
-
onClick: onClickMock
|
|
722
|
-
}, "Button.Outline"))),
|
|
723
|
-
getByText = _render79.getByText;
|
|
724
|
-
|
|
725
|
-
fireEvent.click(getByText('Button.Outline'));
|
|
726
|
-
expect(onClickMock).toHaveBeenCalled();
|
|
727
|
-
});
|
|
728
|
-
it('should call onClick function when click on Button.Text', function () {
|
|
729
|
-
var onClickMock = jest.fn();
|
|
730
|
-
|
|
731
|
-
var _render80 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Text, {
|
|
732
|
-
onClick: onClickMock
|
|
733
|
-
}, "Button.Text"))),
|
|
734
|
-
getByText = _render80.getByText;
|
|
735
|
-
|
|
736
|
-
fireEvent.click(getByText('Button.Text'));
|
|
737
|
-
expect(onClickMock).toHaveBeenCalled();
|
|
738
|
-
});
|
|
739
|
-
it('should call onClick function when click on Button.Icon', function () {
|
|
740
|
-
var onClickMock = jest.fn();
|
|
741
|
-
|
|
742
|
-
var _render81 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
743
|
-
icon: Close,
|
|
744
|
-
onClick: onClickMock
|
|
745
|
-
}))),
|
|
746
|
-
getByRole = _render81.getByRole;
|
|
747
|
-
|
|
748
|
-
fireEvent.click(getByRole('button'));
|
|
749
|
-
expect(onClickMock).toHaveBeenCalled();
|
|
750
|
-
});
|
|
751
|
-
it('should not call onClick function when click on Button disabled', function () {
|
|
752
|
-
var onClickMock = jest.fn();
|
|
753
|
-
|
|
754
|
-
var _render82 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Button, {
|
|
755
|
-
disabled: true,
|
|
756
|
-
onClick: onClickMock
|
|
757
|
-
}, "Button"))),
|
|
758
|
-
getByText = _render82.getByText;
|
|
759
|
-
|
|
760
|
-
fireEvent.click(getByText('Button'));
|
|
761
|
-
expect(onClickMock).not.toHaveBeenCalled();
|
|
762
|
-
});
|
|
763
|
-
});
|
|
764
|
-
});
|