@tactics/toddle-styleguide 5.3.1 → 5.3.3

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.
Files changed (178) hide show
  1. package/App.tsx +0 -19
  2. package/app.json +8 -4
  3. package/index.tsx +0 -4
  4. package/package.json +55 -27
  5. package/src/components/atoms/calendar/calendar.component.tsx +10 -6
  6. package/src/components/atoms/calendar/calendar.preview.tsx +4 -3
  7. package/src/components/molecules/amount/amount.component.tsx +5 -4
  8. package/src/components/molecules/calendar-select/calendar-select.component.d.ts +4 -4
  9. package/src/components/molecules/calendar-select/calendar-select.component.tsx +17 -16
  10. package/src/components/molecules/calendar-select/calendar-select.preview.tsx +16 -5
  11. package/src/components/molecules/date-input/date-input.component.d.ts +2 -2
  12. package/src/components/molecules/date-input/date-input.component.tsx +3 -3
  13. package/src/components/molecules/date-input/date-input.preview.tsx +5 -5
  14. package/src/components/molecules/day/day.component.d.ts +3 -3
  15. package/src/components/molecules/day/day.component.tsx +22 -17
  16. package/src/components/molecules/selectable-list-item/selectable-list-item.component.tsx +12 -7
  17. package/src/components/molecules/timestamp/timestamp.component.d.ts +2 -2
  18. package/src/components/molecules/timestamp/timestamp.component.tsx +12 -5
  19. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.d.ts +2 -2
  20. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.tsx +5 -5
  21. package/src/components/organisms/journal-entry/journal-entry.component.d.ts +3 -3
  22. package/src/components/organisms/journal-entry/journal-entry.component.tsx +7 -3
  23. package/src/components/organisms/journal-entry/journal-entry.preview.tsx +7 -3
  24. package/src/components/organisms/text-bubble/text-bubble.component.d.ts +2 -2
  25. package/src/components/organisms/text-bubble/text-bubble.component.tsx +6 -3
  26. package/src/components/organisms/text-bubble/text-bubble.preview.tsx +19 -7
  27. package/src/components/templates/popover-action/popover-action.component.tsx +9 -8
  28. package/src/icons/solid/cloud-download/cloud-download.icon.tsx +1 -1
  29. package/src/icons/solid/refresh/refresh-solid.icon.tsx +2 -2
  30. package/src/utilities/datetime/clock.class.tsx +14 -0
  31. package/src/utilities/datetime/dateonly.class.tsx +287 -0
  32. package/src/utilities/datetime/datetime.class.tsx +288 -0
  33. package/src/utilities/datetime/day.class.tsx +48 -0
  34. package/src/utilities/datetime/dayjs-config.ts +96 -0
  35. package/src/utilities/datetime/dayoftheweek.class.tsx +242 -0
  36. package/src/utilities/datetime/hour.class.tsx +60 -0
  37. package/src/utilities/datetime/locale.tsx +6 -0
  38. package/src/utilities/datetime/millisecond.class.tsx +48 -0
  39. package/src/utilities/datetime/minute.class.tsx +55 -0
  40. package/src/utilities/datetime/month.class.tsx +74 -0
  41. package/src/utilities/datetime/second.class.tsx +52 -0
  42. package/src/utilities/datetime/time.class.tsx +190 -0
  43. package/src/utilities/datetime/timezone.class.tsx +36 -0
  44. package/src/utilities/datetime/year.class.tsx +78 -0
  45. package/src/utilities/datetime/yearandmonth.class.tsx +80 -0
  46. package/src/components/atoms/background-gradient/__snapshots__/background-gradient.test.js.snap +0 -40
  47. package/src/components/atoms/background-gradient/background-gradient.test.js +0 -10
  48. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +0 -6817
  49. package/src/components/atoms/calendar/calendar.test.js +0 -35
  50. package/src/components/atoms/check-switch/__snapshots__/check-switch.test.js.snap +0 -84
  51. package/src/components/atoms/check-switch/check-switch.test.js +0 -13
  52. package/src/components/atoms/heading-components/all-caps-heading/__snapshots__/all-caps-heading.test.js.snap +0 -113
  53. package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.test.js +0 -44
  54. package/src/components/atoms/heading-components/heading1/__snapshots__/heading1.test.js.snap +0 -121
  55. package/src/components/atoms/heading-components/heading1/heading1.test.js +0 -51
  56. package/src/components/atoms/heading-components/heading2/__snapshots__/heading2.test.js.snap +0 -121
  57. package/src/components/atoms/heading-components/heading2/heading2.test.js +0 -51
  58. package/src/components/atoms/heading-components/heading3/__snapshots__/heading3.test.js.snap +0 -121
  59. package/src/components/atoms/heading-components/heading3/heading3.test.js +0 -51
  60. package/src/components/atoms/heading-components/heading4/__snapshots__/heading4.test.js.snap +0 -121
  61. package/src/components/atoms/heading-components/heading4/heading4.test.js +0 -51
  62. package/src/components/atoms/image-bubble/__snapshots__/image-bubble.test.js.snap +0 -67
  63. package/src/components/atoms/image-bubble/image-bubble.test.js +0 -20
  64. package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +0 -269
  65. package/src/components/atoms/increment-input/increment-input.test.js +0 -14
  66. package/src/components/atoms/logo/__snapshots__/logo.test.js.snap +0 -113
  67. package/src/components/atoms/logo/logo.test.js +0 -16
  68. package/src/components/atoms/paragraph-components/paragraph/__snapshots__/paragraph.test.js.snap +0 -121
  69. package/src/components/atoms/paragraph-components/paragraph/paragraph.test.js +0 -76
  70. package/src/components/atoms/paragraph-components/small-text/__snapshots__/small-text.test.js.snap +0 -121
  71. package/src/components/atoms/paragraph-components/small-text/small-text.test.js +0 -76
  72. package/src/components/atoms/paragraph-components/tiny-text/__snapshots__/tiny-text.test.js.snap +0 -121
  73. package/src/components/atoms/paragraph-components/tiny-text/tiny-text.test.js +0 -76
  74. package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +0 -143
  75. package/src/components/atoms/quick-message/quick-message.test.js +0 -58
  76. package/src/components/atoms/split-container/__snapshots__/split-container.test.js.snap +0 -333
  77. package/src/components/atoms/split-container/split-container.test.js +0 -45
  78. package/src/components/atoms/text-input/__snapshots__/text-input.test.js.snap +0 -123
  79. package/src/components/atoms/text-input/text-input.test.js +0 -59
  80. package/src/components/molecules/avatar/__snapshots__/avatar.test.js.snap +0 -97
  81. package/src/components/molecules/avatar/avatar.test.js +0 -22
  82. package/src/components/molecules/blocked-message/__snapshots__/blocked-message.test.js.snap +0 -107
  83. package/src/components/molecules/blocked-message/blocked-message.test.js +0 -12
  84. package/src/components/molecules/button/__snapshots__/button.test.js.snap +0 -652
  85. package/src/components/molecules/button/button.test.js +0 -56
  86. package/src/components/molecules/calendar-select/__snapshots__/calendar-select.test.js.snap +0 -343
  87. package/src/components/molecules/calendar-select/calendar-select.test.js +0 -20
  88. package/src/components/molecules/cancel-link/__snapshots__/cancel-link.test.js.snap +0 -139
  89. package/src/components/molecules/cancel-link/cancel-link.test.js +0 -28
  90. package/src/components/molecules/checkbox/__snapshots__/checkbox.test.js.snap +0 -176
  91. package/src/components/molecules/checkbox/checkbox.test.js +0 -30
  92. package/src/components/molecules/contact-address/__snapshots__/contact-address.test.js.snap +0 -113
  93. package/src/components/molecules/contact-address/contact-address.test.js +0 -18
  94. package/src/components/molecules/contact-role/__snapshots__/contact-role.test.js.snap +0 -113
  95. package/src/components/molecules/contact-role/contact-role.test.js +0 -18
  96. package/src/components/molecules/date-input/__snapshots__/date-input.test.js.snap +0 -140
  97. package/src/components/molecules/date-input/date-input.test.js +0 -23
  98. package/src/components/molecules/day/__snapshots__/day.test.js.snap +0 -263
  99. package/src/components/molecules/day/day.test.js +0 -37
  100. package/src/components/molecules/default-select/__snapshots__/default-select.test.js.snap +0 -140
  101. package/src/components/molecules/default-select/default-select.test.js +0 -17
  102. package/src/components/molecules/department_logo/__snapshots__/department-logo.test.js.snap +0 -27
  103. package/src/components/molecules/department_logo/department-logo.test.js +0 -12
  104. package/src/components/molecules/failed-to-send/__snapshots__/failed-bubble.test.js.snap +0 -386
  105. package/src/components/molecules/failed-to-send/failed-bubble.test.js +0 -75
  106. package/src/components/molecules/filter-range/__snapshots__/filter-range.test.js.snap +0 -208
  107. package/src/components/molecules/filter-range/filter-range.test.js +0 -20
  108. package/src/components/molecules/filter-tab/__snapshots__/filter-tab.test.js.snap +0 -536
  109. package/src/components/molecules/filter-tab/filter-tab.test.js +0 -42
  110. package/src/components/molecules/info/__snapshots__/info.test.js.snap +0 -64
  111. package/src/components/molecules/info/info.test.js +0 -18
  112. package/src/components/molecules/language-button/__snapshots__/language-button.test.js.snap +0 -129
  113. package/src/components/molecules/language-button/language-button.test.js +0 -29
  114. package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +0 -611
  115. package/src/components/molecules/message-input/message-input.test.js +0 -63
  116. package/src/components/molecules/more-info-button/__snapshots__/more-info-button.test.js.snap +0 -133
  117. package/src/components/molecules/more-info-button/more-info-button.test.js +0 -29
  118. package/src/components/molecules/password-input/__snapshots__/password-input.test.js.snap +0 -504
  119. package/src/components/molecules/password-input/password-input.test.js +0 -46
  120. package/src/components/molecules/pill/__snapshots__/pill.test.js.snap +0 -226
  121. package/src/components/molecules/pill/pill.test.js +0 -42
  122. package/src/components/molecules/pressable-icon/__snapshots__/pressable-icon.test.js.snap +0 -460
  123. package/src/components/molecules/pressable-icon/pressable-icon.test.js +0 -51
  124. package/src/components/molecules/quick-filter/__snapshots__/quick-filter.test.js.snap +0 -557
  125. package/src/components/molecules/quick-filter/quick-filter.test.js +0 -134
  126. package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +0 -145
  127. package/src/components/molecules/search-input/search.test.js +0 -22
  128. package/src/components/molecules/select-link/__snapshots__/select-link.test.js.snap +0 -70
  129. package/src/components/molecules/select-link/select-link.test.js +0 -17
  130. package/src/components/molecules/select-list-item/__snapshots__/select-list-item.test.js.snap +0 -762
  131. package/src/components/molecules/select-list-item/select-list-item.test.js +0 -38
  132. package/src/components/molecules/select-picker/__snapshots__/select-picker.test.js.snap +0 -407
  133. package/src/components/molecules/select-picker/select-picker.test.js +0 -31
  134. package/src/components/molecules/send-bubble/__snapshots__/send-text-bubble.test.js.snap +0 -1979
  135. package/src/components/molecules/send-bubble/send-text-bubble.test.js +0 -156
  136. package/src/components/molecules/snackbar/__snapshots__/snackbar.test.js.snap +0 -557
  137. package/src/components/molecules/snackbar/snackbar.test.js +0 -35
  138. package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +0 -340
  139. package/src/components/molecules/swipe/swipe.test.js +0 -46
  140. package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +0 -139
  141. package/src/components/molecules/tag/tag.test.js +0 -34
  142. package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +0 -2221
  143. package/src/components/molecules/time-picker/time-picker.test.js +0 -18
  144. package/src/components/molecules/time-tracker/__snapshots__/time-tracker.test.js.snap +0 -266
  145. package/src/components/molecules/time-tracker/time-tracker.test.js +0 -36
  146. package/src/components/molecules/timeline/__snapshots__/timeline.test.js.snap +0 -257
  147. package/src/components/molecules/timeline/timeline.test.js +0 -18
  148. package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +0 -28
  149. package/src/components/molecules/timestamp/timestamp.test.js +0 -16
  150. package/src/components/molecules/wave-background/__snapshots__/wave.test.js.snap +0 -173
  151. package/src/components/molecules/wave-background/wave.test.js +0 -25
  152. package/src/components/molecules/wide-button/__snapshots__/wide-button.test.js.snap +0 -269
  153. package/src/components/molecules/wide-button/wide-button.test.js +0 -30
  154. package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +0 -1040
  155. package/src/components/organisms/child-list-item/child-list-item.test.js +0 -75
  156. package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +0 -404
  157. package/src/components/organisms/contact-item/contact-item.test.js +0 -22
  158. package/src/components/organisms/loading-indicator/__snapshots__/loading-indicator.test.js.snap +0 -474
  159. package/src/components/organisms/loading-indicator/loading-indicator.test.js +0 -41
  160. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +0 -293
  161. package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +0 -23
  162. package/src/components/organisms/person-info-card/__snapshots__/person-info-card.test.js.snap +0 -709
  163. package/src/components/organisms/person-info-card/person-info-card.test.js +0 -85
  164. package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +0 -3046
  165. package/src/components/organisms/text-bubble/text-bubble.test.js +0 -144
  166. package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +0 -22
  167. package/src/utilities/toddle-datetime/interfaces/duration.interface.tsx +0 -23
  168. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +0 -22
  169. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +0 -25
  170. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +0 -50
  171. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +0 -206
  172. package/src/utilities/toddle-datetime/toddle-datetime.preview.d.ts +0 -2
  173. package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +0 -160
  174. package/src/utilities/toddle-datetime/toddle-datetime.test.js +0 -127
  175. package/src/utilities/toddle-datetime/types/duration.type.d.ts +0 -4
  176. package/src/utilities/toddle-datetime/types/duration.type.tsx +0 -6
  177. package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +0 -5
  178. package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +0 -23
@@ -1,18 +0,0 @@
1
- import renderer from 'react-test-renderer';
2
- import {TimePicker} from './time-picker.component';
3
-
4
- describe('Time picker test', () => {
5
- it('Should render a time picker where we can choose the hours and minutes separately, and our initial set time is 08:00', () => {
6
- const tree = renderer
7
- .create(
8
- <TimePicker
9
- initialHours={'08'}
10
- initialMinutes={'00'}
11
- onChangeHours={() => console.log('set the hours')}
12
- onChangeMinutes={() => console.log('set the minutes')}
13
- />
14
- )
15
- .toJSON();
16
- expect(tree).toMatchSnapshot();
17
- });
18
- });
@@ -1,266 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`test time-tracker given the visualState is DEFAULT return a blue colored ball 1`] = `
4
- <View
5
- style={
6
- {
7
- "alignItems": "center",
8
- "flexDirection": "row",
9
- }
10
- }
11
- >
12
- <View
13
- style={
14
- [
15
- {
16
- "borderRadius": 6,
17
- "height": 12,
18
- "marginRight": 4,
19
- "width": 12,
20
- },
21
- {
22
- "backgroundColor": "#19216C",
23
- },
24
- false,
25
- false,
26
- false,
27
- ]
28
- }
29
- />
30
- <View>
31
- <Text
32
- style={
33
- [
34
- [
35
- {
36
- "fontFamily": "Montserrat",
37
- "fontSize": 11,
38
- "lineHeight": 17.9,
39
- },
40
- ],
41
- {
42
- "color": "#1F2933",
43
- "textAlign": undefined,
44
- "width": "100%",
45
- },
46
- undefined,
47
- ]
48
- }
49
- >
50
- 3u45
51
- </Text>
52
- </View>
53
- </View>
54
- `;
55
-
56
- exports[`test time-tracker given the visualState is ERROR return a red colored ball 1`] = `
57
- <View
58
- style={
59
- {
60
- "alignItems": "center",
61
- "flexDirection": "row",
62
- }
63
- }
64
- >
65
- <View
66
- style={
67
- [
68
- {
69
- "borderRadius": 6,
70
- "height": 12,
71
- "marginRight": 4,
72
- "width": 12,
73
- },
74
- false,
75
- false,
76
- false,
77
- {
78
- "backgroundColor": "#F16868",
79
- },
80
- ]
81
- }
82
- />
83
- <View>
84
- <Text
85
- style={
86
- [
87
- [
88
- {
89
- "fontFamily": "Montserrat",
90
- "fontSize": 11,
91
- "lineHeight": 17.9,
92
- },
93
- ],
94
- {
95
- "color": "#1F2933",
96
- "textAlign": undefined,
97
- "width": "100%",
98
- },
99
- undefined,
100
- ]
101
- }
102
- >
103
- 3u45
104
- </Text>
105
- </View>
106
- </View>
107
- `;
108
-
109
- exports[`test time-tracker given the visualState is SUCCESS return a green colored ball 1`] = `
110
- <View
111
- style={
112
- {
113
- "alignItems": "center",
114
- "flexDirection": "row",
115
- }
116
- }
117
- >
118
- <View
119
- style={
120
- [
121
- {
122
- "borderRadius": 6,
123
- "height": 12,
124
- "marginRight": 4,
125
- "width": 12,
126
- },
127
- false,
128
- {
129
- "backgroundColor": "#83D56C",
130
- },
131
- false,
132
- false,
133
- ]
134
- }
135
- />
136
- <View>
137
- <Text
138
- style={
139
- [
140
- [
141
- {
142
- "fontFamily": "Montserrat",
143
- "fontSize": 11,
144
- "lineHeight": 17.9,
145
- },
146
- ],
147
- {
148
- "color": "#1F2933",
149
- "textAlign": undefined,
150
- "width": "100%",
151
- },
152
- undefined,
153
- ]
154
- }
155
- >
156
- 3u45
157
- </Text>
158
- </View>
159
- </View>
160
- `;
161
-
162
- exports[`test time-tracker given the visualState is WARNING return an orange colored ball 1`] = `
163
- <View
164
- style={
165
- {
166
- "alignItems": "center",
167
- "flexDirection": "row",
168
- }
169
- }
170
- >
171
- <View
172
- style={
173
- [
174
- {
175
- "borderRadius": 6,
176
- "height": 12,
177
- "marginRight": 4,
178
- "width": 12,
179
- },
180
- false,
181
- false,
182
- {
183
- "backgroundColor": "#FCBF6F",
184
- },
185
- false,
186
- ]
187
- }
188
- />
189
- <View>
190
- <Text
191
- style={
192
- [
193
- [
194
- {
195
- "fontFamily": "Montserrat",
196
- "fontSize": 11,
197
- "lineHeight": 17.9,
198
- },
199
- ],
200
- {
201
- "color": "#1F2933",
202
- "textAlign": undefined,
203
- "width": "100%",
204
- },
205
- undefined,
206
- ]
207
- }
208
- >
209
- 3u45
210
- </Text>
211
- </View>
212
- </View>
213
- `;
214
-
215
- exports[`test time-tracker text has color when a color is given as property 1`] = `
216
- <View
217
- style={
218
- {
219
- "alignItems": "center",
220
- "flexDirection": "row",
221
- }
222
- }
223
- >
224
- <View
225
- style={
226
- [
227
- {
228
- "borderRadius": 6,
229
- "height": 12,
230
- "marginRight": 4,
231
- "width": 12,
232
- },
233
- {
234
- "backgroundColor": "#19216C",
235
- },
236
- false,
237
- false,
238
- false,
239
- ]
240
- }
241
- />
242
- <View>
243
- <Text
244
- style={
245
- [
246
- [
247
- {
248
- "fontFamily": "Montserrat",
249
- "fontSize": 11,
250
- "lineHeight": 17.9,
251
- },
252
- ],
253
- {
254
- "color": "#1F2933",
255
- "textAlign": undefined,
256
- "width": "100%",
257
- },
258
- undefined,
259
- ]
260
- }
261
- >
262
- 3u45
263
- </Text>
264
- </View>
265
- </View>
266
- `;
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {TimeTracker} from './time-tracker.component';
4
-
5
- describe('test time-tracker', () => {
6
- it('given the visualState is DEFAULT return a blue colored ball', () => {
7
- const tree = renderer
8
- .create(<TimeTracker text="3u45" visualState="DEFAULT" />)
9
- .toJSON();
10
- expect(tree).toMatchSnapshot();
11
- });
12
- it('given the visualState is SUCCESS return a green colored ball', () => {
13
- const tree = renderer
14
- .create(<TimeTracker text="3u45" visualState="SUCCESS" />)
15
- .toJSON();
16
- expect(tree).toMatchSnapshot();
17
- });
18
- it('given the visualState is WARNING return an orange colored ball', () => {
19
- const tree = renderer
20
- .create(<TimeTracker text="3u45" visualState="WARNING" />)
21
- .toJSON();
22
- expect(tree).toMatchSnapshot();
23
- });
24
- it('given the visualState is ERROR return a red colored ball', () => {
25
- const tree = renderer
26
- .create(<TimeTracker text="3u45" visualState="ERROR" />)
27
- .toJSON();
28
- expect(tree).toMatchSnapshot();
29
- });
30
- it('text has color when a color is given as property', () => {
31
- const tree = renderer
32
- .create(<TimeTracker text="3u45" visualState="DEFAULT" color="red" />)
33
- .toJSON();
34
- expect(tree).toMatchSnapshot();
35
- });
36
- });
@@ -1,257 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Timeline visual test renders a check-in time and check-out time 1`] = `
4
- <View
5
- style={
6
- {
7
- "marginBottom": 8,
8
- "marginTop": 8,
9
- "width": "100%",
10
- }
11
- }
12
- >
13
- <View
14
- style={
15
- {
16
- "backgroundColor": "#E5E8EB",
17
- "borderRadius": 50,
18
- "height": 16,
19
- "overflow": "hidden",
20
- }
21
- }
22
- >
23
- <ViewManagerAdapter_ExpoLinearGradient
24
- colors={
25
- [
26
- 4284775115,
27
- 4284775115,
28
- ]
29
- }
30
- endPoint={
31
- [
32
- 1,
33
- 0,
34
- ]
35
- }
36
- startPoint={
37
- [
38
- 0,
39
- 0,
40
- ]
41
- }
42
- style={
43
- {
44
- "borderRadius": 50,
45
- "height": "100%",
46
- "left": "10%",
47
- "width": "33.333333333333336%",
48
- }
49
- }
50
- />
51
- </View>
52
- <View
53
- style={
54
- [
55
- {
56
- "flexDirection": "row",
57
- "height": 24,
58
- "marginTop": 8,
59
- "width": "33.333333333333336%",
60
- },
61
- {
62
- "justifyContent": "space-between",
63
- "marginLeft": "10%",
64
- },
65
- false,
66
- ]
67
- }
68
- >
69
- <View
70
- style={
71
- {
72
- "right": 16,
73
- }
74
- }
75
- >
76
- <Text
77
- style={
78
- [
79
- [
80
- {
81
- "fontFamily": "Montserrat",
82
- "fontSize": 13,
83
- "lineHeight": 20.4,
84
- },
85
- ],
86
- {
87
- "color": "#1F2933",
88
- "textAlign": undefined,
89
- "width": "100%",
90
- },
91
- undefined,
92
- ]
93
- }
94
- >
95
- 07:30
96
- </Text>
97
- </View>
98
- <View
99
- style={
100
- {
101
- "left": 16,
102
- }
103
- }
104
- >
105
- <Text
106
- style={
107
- [
108
- [
109
- {
110
- "fontFamily": "Montserrat",
111
- "fontSize": 13,
112
- "lineHeight": 20.4,
113
- },
114
- ],
115
- {
116
- "color": "#1F2933",
117
- "textAlign": undefined,
118
- "width": "100%",
119
- },
120
- undefined,
121
- ]
122
- }
123
- >
124
- 12:30
125
- </Text>
126
- </View>
127
- </View>
128
- </View>
129
- `;
130
-
131
- exports[`Timeline visual test renders a check-in time with no known check-out time 1`] = `
132
- <View
133
- style={
134
- {
135
- "marginBottom": 8,
136
- "marginTop": 8,
137
- "width": "100%",
138
- }
139
- }
140
- >
141
- <View
142
- style={
143
- {
144
- "backgroundColor": "#E5E8EB",
145
- "borderRadius": 50,
146
- "height": 16,
147
- "overflow": "hidden",
148
- }
149
- }
150
- >
151
- <ViewManagerAdapter_ExpoLinearGradient
152
- colors={
153
- [
154
- 4284775115,
155
- 4293257451,
156
- ]
157
- }
158
- endPoint={
159
- [
160
- 1,
161
- 0,
162
- ]
163
- }
164
- startPoint={
165
- [
166
- 0,
167
- 0,
168
- ]
169
- }
170
- style={
171
- {
172
- "borderRadius": 50,
173
- "height": "100%",
174
- "left": "10%",
175
- "width": "25%",
176
- }
177
- }
178
- />
179
- </View>
180
- <View
181
- style={
182
- [
183
- {
184
- "flexDirection": "row",
185
- "height": 24,
186
- "marginTop": 8,
187
- "width": "25%",
188
- },
189
- {
190
- "justifyContent": "space-between",
191
- "marginLeft": "10%",
192
- },
193
- false,
194
- ]
195
- }
196
- >
197
- <View
198
- style={
199
- {
200
- "right": 16,
201
- }
202
- }
203
- >
204
- <Text
205
- style={
206
- [
207
- [
208
- {
209
- "fontFamily": "Montserrat",
210
- "fontSize": 13,
211
- "lineHeight": 20.4,
212
- },
213
- ],
214
- {
215
- "color": "#1F2933",
216
- "textAlign": undefined,
217
- "width": "100%",
218
- },
219
- undefined,
220
- ]
221
- }
222
- >
223
- 07:30
224
- </Text>
225
- </View>
226
- <View
227
- style={
228
- {
229
- "left": 12,
230
- }
231
- }
232
- >
233
- <Text
234
- style={
235
- [
236
- [
237
- {
238
- "fontFamily": "Montserrat",
239
- "fontSize": 13,
240
- "lineHeight": 20.4,
241
- },
242
- ],
243
- {
244
- "color": "#1F2933",
245
- "textAlign": undefined,
246
- "width": "100%",
247
- },
248
- undefined,
249
- ]
250
- }
251
- >
252
- --:--
253
- </Text>
254
- </View>
255
- </View>
256
- </View>
257
- `;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {TimeLine} from './timeline.component';
4
-
5
- describe('Timeline visual test', () => {
6
- it('renders a check-in time with no known check-out time', () => {
7
- const tree = renderer.create(<TimeLine checkIn={'07:30'} />).toJSON();
8
-
9
- expect(tree).toMatchSnapshot();
10
- });
11
- it('renders a check-in time and check-out time', () => {
12
- const tree = renderer
13
- .create(<TimeLine checkIn={'07:30'} checkOut={'12:30'} />)
14
- .toJSON();
15
-
16
- expect(tree).toMatchSnapshot();
17
- });
18
- });
@@ -1,28 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Timestamp component test Renders a timestamp component, this will be added to our text bubble for when a message has been sent 1`] = `
4
- <Text
5
- style={
6
- [
7
- [
8
- {
9
- "fontFamily": "Montserrat",
10
- "fontSize": 13,
11
- "lineHeight": 20.4,
12
- },
13
- ],
14
- {
15
- "color": "#9AA5B1",
16
- "textAlign": "right",
17
- "width": "100%",
18
- },
19
- {
20
- "textAlignVertical": "center",
21
- },
22
- ]
23
- }
24
- >
25
-
26
- 25 May, 9:08
27
- </Text>
28
- `;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import {Timestamp} from './timestamp.component';
4
- import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
5
-
6
- const testDate = ToddleDateTime.fromISO('2016-05-25T09:08:34.123', {
7
- locale: 'en-GB',
8
- });
9
-
10
- describe('Timestamp component test', () => {
11
- it('Renders a timestamp component, this will be added to our text bubble for when a message has been sent', () => {
12
- const tree = renderer.create(<Timestamp sent={testDate} />).toJSON();
13
-
14
- expect(tree).toMatchSnapshot();
15
- });
16
- });