bright-components 10.2.6 → 10.2.8
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/circle.yml +1 -2
- package/deploy.sh +6 -0
- package/dist/components/DayPicker/NewDayPicker/index.js +0 -28
- package/dist/components/DayPicker/index.js +2 -20
- package/dist/components/DayPickerPanel/HeaderDayPickerPanel/index.js +1 -18
- package/dist/components/DayPickerPanel/HeaderMonthPanel/index.js +0 -14
- package/dist/components/DayPickerPanel/HeaderYearPanel/index.js +2 -15
- package/dist/components/DayPickerPanel/Shortcuts/index.js +2 -16
- package/dist/components/DayPickerPanel/index.js +2 -74
- package/dist/components/EmployeeCard/index.js +1 -14
- package/dist/components/EmployeePicker/FilterBar/index.js +1 -28
- package/dist/components/EmployeePicker/Group/index.js +1 -41
- package/dist/components/FilterRadioGroup/index.js +2 -14
- package/dist/components/Form/index.js +4 -47
- package/dist/components/RadioBlock/index.js +10 -41
- package/dist/components/Time/OverlayBase/index.js +2 -25
- package/dist/components/Time/TimePicker/TimeOverlay/index.js +3 -26
- package/dist/components/TimePicker/Time/TimeOverlay/index.js +1 -58
- package/dist/setupTests.js +0 -7
- package/package.json +5 -7
- package/src/components/DayPicker/NewDayPicker/index.js +0 -21
- package/src/components/DayPicker/index.js +1 -16
- package/src/components/DayPicker/test.js +0 -85
- package/src/components/DayPickerPanel/HeaderDayPickerPanel/index.js +2 -22
- package/src/components/DayPickerPanel/HeaderDayPickerPanel/test.js +0 -34
- package/src/components/DayPickerPanel/HeaderMonthPanel/index.js +0 -10
- package/src/components/DayPickerPanel/HeaderMonthPanel/test.js +0 -25
- package/src/components/DayPickerPanel/HeaderYearPanel/index.js +3 -12
- package/src/components/DayPickerPanel/HeaderYearPanel/test.js +0 -17
- package/src/components/DayPickerPanel/Shortcuts/index.js +3 -17
- package/src/components/DayPickerPanel/Shortcuts/test.js +0 -39
- package/src/components/DayPickerPanel/index.js +1 -69
- package/src/components/DayPickerPanel/test.js +0 -177
- package/src/components/EmployeeCard/index.js +1 -15
- package/src/components/EmployeeCard/test.js +0 -20
- package/src/components/EmployeePicker/FilterBar/index.js +2 -26
- package/src/components/EmployeePicker/FilterBar/test.js +0 -29
- package/src/components/EmployeePicker/Group/index.js +1 -42
- package/src/components/EmployeePicker/Group/test.js +0 -21
- package/src/components/FilterRadioGroup/index.js +2 -14
- package/src/components/FilterRadioGroup/test.js +0 -13
- package/src/components/Form/index.js +1 -49
- package/src/components/Form/test.js +0 -73
- package/src/components/Modal/test.js +9 -9
- package/src/components/RadioBlock/index.js +14 -33
- package/src/components/RadioBlock/test.js +35 -155
- package/src/components/ResponsiveTabs/test.js +49 -86
- package/src/components/Time/OverlayBase/index.js +3 -21
- package/src/components/Time/OverlayBase/test.js +0 -50
- package/src/components/Time/TimePicker/TimeOverlay/index.js +4 -30
- package/src/components/Time/TimePicker/TimeOverlay/test.js +0 -24
- package/src/components/TimePicker/DayPart/test.js +1 -1
- package/src/components/TimePicker/Time/TimeOverlay/index.js +2 -50
- package/src/components/TimePicker/Time/TimeOverlay/test.js +1 -220
- package/src/index.js +1 -1
- package/src/setupTests.js +0 -2
- package/dist/components/TimePicker/utils/PickerGA/index.js +0 -24
- package/dist/utils/trackForm/index.js +0 -48
- package/src/components/TimePicker/utils/PickerGA/index.js +0 -6
- package/src/components/TimePicker/utils/PickerGA/test.js +0 -29
- package/src/utils/trackForm/index.js +0 -36
- package/src/utils/trackForm/test.js +0 -110
@@ -1,110 +0,0 @@
|
|
1
|
-
import ReactGA from 'react-ga';
|
2
|
-
|
3
|
-
import trackForm from '.';
|
4
|
-
|
5
|
-
jest.mock('react-ga');
|
6
|
-
jest.mock('debounce', () => fn => e => fn(e));
|
7
|
-
|
8
|
-
const trackEvent = trackForm('form-name');
|
9
|
-
|
10
|
-
it('should not track value password fields', () => {
|
11
|
-
trackEvent({
|
12
|
-
target: {
|
13
|
-
getAttribute() {
|
14
|
-
return 'input-name';
|
15
|
-
},
|
16
|
-
name: 'input-name',
|
17
|
-
value: 'input-value',
|
18
|
-
type: 'password'
|
19
|
-
}
|
20
|
-
});
|
21
|
-
|
22
|
-
expect(ReactGA.event).toHaveBeenLastCalledWith({
|
23
|
-
action: 'input-name',
|
24
|
-
category: 'form-name'
|
25
|
-
});
|
26
|
-
});
|
27
|
-
it('should not track value password fields with no target', () => {
|
28
|
-
trackEvent({
|
29
|
-
name: 'input-name',
|
30
|
-
value: 'input-value',
|
31
|
-
type: 'password'
|
32
|
-
});
|
33
|
-
|
34
|
-
expect(ReactGA.event).toHaveBeenLastCalledWith({
|
35
|
-
action: 'input-name',
|
36
|
-
category: 'form-name'
|
37
|
-
});
|
38
|
-
});
|
39
|
-
|
40
|
-
it('should track change events', () => {
|
41
|
-
trackEvent({
|
42
|
-
target: {
|
43
|
-
getAttribute() {
|
44
|
-
return undefined;
|
45
|
-
},
|
46
|
-
name: 'input-name',
|
47
|
-
value: 'input-value'
|
48
|
-
}
|
49
|
-
});
|
50
|
-
|
51
|
-
expect(ReactGA.event).toHaveBeenLastCalledWith({
|
52
|
-
action: 'input-name',
|
53
|
-
category: 'form-name'
|
54
|
-
});
|
55
|
-
});
|
56
|
-
|
57
|
-
it('should track change events - with overrides', () => {
|
58
|
-
trackEvent({
|
59
|
-
target: {
|
60
|
-
getAttribute(name) {
|
61
|
-
return `override ${name}`;
|
62
|
-
},
|
63
|
-
name: 'input-name',
|
64
|
-
value: 'input-value'
|
65
|
-
}
|
66
|
-
});
|
67
|
-
|
68
|
-
expect(ReactGA.event).toHaveBeenLastCalledWith({
|
69
|
-
action: 'override data-track-action',
|
70
|
-
category: 'form-name',
|
71
|
-
label: 'override data-track-label'
|
72
|
-
});
|
73
|
-
});
|
74
|
-
|
75
|
-
it('should report if checkbox has been checked', () => {
|
76
|
-
trackEvent({
|
77
|
-
target: {
|
78
|
-
getAttribute: () => 'checkboxy',
|
79
|
-
name: 'input-name',
|
80
|
-
value: 'input-value',
|
81
|
-
type: 'checkbox',
|
82
|
-
checked: true
|
83
|
-
}
|
84
|
-
});
|
85
|
-
|
86
|
-
expect(ReactGA.event).toHaveBeenLastCalledWith({
|
87
|
-
action: 'checkboxy on',
|
88
|
-
category: 'form-name',
|
89
|
-
label: 'checkboxy'
|
90
|
-
});
|
91
|
-
});
|
92
|
-
|
93
|
-
it('should report if checkbox has been unchecked', () => {
|
94
|
-
trackEvent({
|
95
|
-
target: {
|
96
|
-
getAttribute: attr =>
|
97
|
-
attr === 'data-track-value' ? 'on' : undefined,
|
98
|
-
name: 'input-name',
|
99
|
-
value: 'input-value',
|
100
|
-
type: 'checkbox',
|
101
|
-
checked: false
|
102
|
-
}
|
103
|
-
});
|
104
|
-
|
105
|
-
expect(ReactGA.event).toHaveBeenLastCalledWith({
|
106
|
-
action: 'input-name off',
|
107
|
-
category: 'form-name',
|
108
|
-
label: 'input-value'
|
109
|
-
});
|
110
|
-
});
|