@trii/components 3.1.8 → 3.1.11
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/dist/cjs/index.js +199 -45
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/theme.js +84 -5
- package/dist/cjs/theme.js.map +1 -1
- package/dist/esm/index.js +200 -46
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme.js +84 -5
- package/dist/esm/theme.js.map +1 -1
- package/dist/index.d.ts +30 -2
- package/dist/integration-button-icons-build.log +36 -0
- package/dist/integration-button-icons-bundle.log +24 -0
- package/dist/integration-button-icons-types.log +29 -0
- package/dist/sidebar-fixes-all-tests.log +261 -0
- package/dist/sidebar-fixes-baseline.log +29 -0
- package/dist/sidebar-fixes-build.log +32 -0
- package/dist/sidebar-fixes-tests.log +57 -0
- package/dist/sidebar-fixes-types.log +4 -0
- package/dist/sidebar-panel-tests.log +356 -0
- package/dist/tab-scroll-build.log +32 -0
- package/dist/tab-scroll-tests.log +58 -0
- package/dist/tabs-all-tests.log +330 -0
- package/dist/tabs-build.log +32 -0
- package/dist/tabs-format.log +24 -0
- package/dist/tabs-tests.log +85 -0
- package/dist/tabs-types.log +4 -0
- package/dist/tabs-ui-tests.log +84 -0
- package/dist/types/asyncState/__tests__/asyncState.test.d.ts +1 -0
- package/dist/types/asyncState/__tests__/useAsyncData.test.d.ts +1 -0
- package/dist/types/components/AsyncContent/__tests__/AsyncContent.test.d.ts +1 -0
- package/dist/types/components/AsyncContent/__tests__/AsyncContentI18n.test.d.ts +1 -0
- package/dist/types/components/ContactInfoPopup/ContactInfoPopup.stories.d.ts +9 -0
- package/dist/types/components/ContactSidebar/ContactSidebar.stories.d.ts +58 -0
- package/dist/types/components/ContactSidebar/SidebarContent.d.ts +2 -2
- package/dist/types/components/ContactSidebar/components/MediaViewer/MediaViewer.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/PanelView.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/BotsInfo.d.ts +2 -2
- package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/components/DataItem/DataItem.d.ts +3 -3
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/ButtonsListItem/ButtonsListItem.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/TemplateRenderer/TemplateRenderer.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactConversation/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/AddressCard.d.ts +19 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/Contact.d.ts +3 -2
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/CopyAddress.d.ts +3 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Properties/Properties.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactDataDetails/ContactDataDetails.d.ts +1 -4
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/AddEvent/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/ContactMedia.d.ts +2 -3
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/AudioMessage.d.ts +5 -7
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/utils/getNewWaveSurfer.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/Image/Image.d.ts +5 -10
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/mediaEntries.d.ts +10 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTask/components/AddTask/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/IntegrationButtonSearch/IntegrationButtonSearch.d.ts +4 -0
- package/dist/types/components/ContactSidebar/components/SidebarLoadError.d.ts +3 -0
- package/dist/types/components/ContactSidebar/components/referencePanelStyles.d.ts +4 -0
- package/dist/types/components/ContactSidebar/components/verticalTabsStyles.d.ts +11 -0
- package/dist/types/components/ContactSidebar/context/MediaViewerContext.d.ts +1 -1
- package/dist/types/components/ContactSidebar/context/SidebarDataContext.d.ts +6 -15
- package/dist/types/components/ContactSidebar/context/SidebarPropsContext.d.ts +2 -0
- package/dist/types/components/ContactSidebar/hooks/useConversationHistory.d.ts +16 -0
- package/dist/types/components/ContactSidebar/hooks/useSidebarScope.d.ts +5 -0
- package/dist/types/components/ContactSidebar/i18n/useMediaText.d.ts +2 -0
- package/dist/types/components/ContactSidebar/i18n/useReferenceText.d.ts +3 -0
- package/dist/types/components/ContactSidebar/services/buttonsApi.d.ts +1 -1
- package/dist/types/components/ContactSidebar/utils/contactChannels.d.ts +52 -0
- package/dist/types/components/ContactSidebar/utils/conversationPresentation.d.ts +8 -0
- package/dist/types/components/EditContactModal/EditContactModal.stories.d.ts +9 -0
- package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationEditor.d.ts +2 -1
- package/dist/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +2 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/ContactMethod.d.ts +5 -8
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/SubscriptionDialog.d.ts +11 -0
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/style.d.ts +5 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/style.d.ts +11 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/style.d.ts +5 -5
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/style.d.ts +3 -6
- package/dist/types/components/EditContactModal/components/TagsEditor/TagsEditor.d.ts +6 -6
- package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +8 -0
- package/dist/types/components/EditContactModal/layout/EditorSections.d.ts +16 -0
- package/dist/types/components/EditContactModal/services/api.d.ts +2 -0
- package/dist/types/components/EventsDialog/components/LinkContactsSelect/styles.d.ts +6 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/MapLocationPicker.d.ts +8 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/GoogleMap/index.d.ts +1 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/index.d.ts +1 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/index.d.ts +3 -0
- package/dist/types/components/EventsDialog/hooks/index.d.ts +9 -0
- package/dist/types/components/EventsDialog/hooks/useSelect.d.ts +14 -0
- package/dist/types/components/EventsDialog/utils/eventValidation.d.ts +37 -0
- package/dist/types/components/EventsDialog/utils/googleMapsUtils.d.ts +5 -0
- package/dist/types/components/EventsDialog/utils/keyboardNavigation.d.ts +24 -0
- package/dist/types/components/IntegrationButtonIcon/IntegrationButtonIcon.d.ts +8 -0
- package/dist/types/components/IntegrationButtonIcon/catalog.d.ts +14 -0
- package/dist/types/components/IntegrationButtonIcon/colors.d.ts +5 -0
- package/dist/types/components/IntegrationButtonIcon/index.d.ts +6 -0
- package/dist/types/components/PanelErrorBoundary/__tests__/PanelErrorBoundary.test.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/theme/MuiComponentsConfig.test.d.ts +1 -0
- package/dist/types/theme/selectThemeComponents.d.ts +3 -0
- package/dist/types/theme/themePreference.test.d.ts +1 -0
- package/dist/types/theme/themeProvider.test.d.ts +1 -0
- package/dist/types/utils/contactOwner.d.ts +3 -0
- package/package.json +3 -2
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
|
|
2
|
+
> @trii/components@3.1.10 test
|
|
3
|
+
> jest src/components/ContactSidebar/__tests__/contactPanels.test.tsx
|
|
4
|
+
|
|
5
|
+
console.error
|
|
6
|
+
Warning: `ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info.
|
|
7
|
+
|
|
8
|
+
29 | it.each([false,true])('opens the editor with the correct entity target (business=%s)', isBusiness => {
|
|
9
|
+
30 | mockEntity = {...mockEntity, isBusiness, name:'Example Business'};
|
|
10
|
+
> 31 | render(<PremiumContactHeader activeTab={0} />);
|
|
11
|
+
| ^
|
|
12
|
+
32 | fireEvent.click(screen.getByRole('button', {name:'global.edit'}));
|
|
13
|
+
33 | expect(mockEditorProps.open).toBe(true);
|
|
14
|
+
34 | expect(mockEditorProps.entityId).toBe('A');
|
|
15
|
+
|
|
16
|
+
at printWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:71:30)
|
|
17
|
+
at error (node_modules/react-dom/cjs/react-dom-test-utils.development.js:45:7)
|
|
18
|
+
at actWithWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:1736:7)
|
|
19
|
+
at node_modules/@testing-library/react/dist/act-compat.js:47:25
|
|
20
|
+
at renderRoot (node_modules/@testing-library/react/dist/pure.js:180:26)
|
|
21
|
+
at render (node_modules/@testing-library/react/dist/pure.js:271:10)
|
|
22
|
+
at src/components/ContactSidebar/__tests__/contactPanels.test.tsx:31:9
|
|
23
|
+
|
|
24
|
+
(node:58416) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
|
|
25
|
+
(Use `node --trace-deprecation ...` to show where the warning was created)
|
|
26
|
+
FAIL src/components/ContactSidebar/__tests__/contactPanels.test.tsx (17.093 s)
|
|
27
|
+
× opens the editor with the correct entity target (business=false) (562 ms)
|
|
28
|
+
× opens the editor with the correct entity target (business=true) (408 ms)
|
|
29
|
+
√ renders the channels section when ims_rcs is the only address (86 ms)
|
|
30
|
+
√ renders the channels section when ims_mercadolibre is the only address (46 ms)
|
|
31
|
+
|
|
32
|
+
● opens the editor with the correct entity target (business=false)
|
|
33
|
+
|
|
34
|
+
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name "global.edit"
|
|
35
|
+
|
|
36
|
+
Here are the accessible roles:
|
|
37
|
+
|
|
38
|
+
button:
|
|
39
|
+
|
|
40
|
+
Name "":
|
|
41
|
+
<button
|
|
42
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
43
|
+
tabindex="0"
|
|
44
|
+
type="button"
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
Name "":
|
|
48
|
+
<button
|
|
49
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-hdssu8-MuiButtonBase-root-MuiIconButton-root"
|
|
50
|
+
tabindex="0"
|
|
51
|
+
type="button"
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
Name "":
|
|
55
|
+
<button
|
|
56
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
57
|
+
tabindex="0"
|
|
58
|
+
type="button"
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
--------------------------------------------------
|
|
62
|
+
heading:
|
|
63
|
+
|
|
64
|
+
Name "Example Person":
|
|
65
|
+
<h6
|
|
66
|
+
class="MuiTypography-root MuiTypography-h6 MuiTypography-noWrap css-1h8dq3h-MuiTypography-root"
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
--------------------------------------------------
|
|
70
|
+
|
|
71
|
+
Ignored nodes: comments, script, style
|
|
72
|
+
<body>
|
|
73
|
+
<div>
|
|
74
|
+
<div
|
|
75
|
+
class="MuiBox-root css-1kkn1x0"
|
|
76
|
+
>
|
|
77
|
+
<div
|
|
78
|
+
class="MuiBox-root css-uj2gl9"
|
|
79
|
+
>
|
|
80
|
+
<div
|
|
81
|
+
class="MuiStack-root css-1xtp169-MuiStack-root"
|
|
82
|
+
>
|
|
83
|
+
<p
|
|
84
|
+
class="MuiTypography-root MuiTypography-body1 css-1bugzp5-MuiTypography-root"
|
|
85
|
+
>
|
|
86
|
+
global.contact
|
|
87
|
+
</p>
|
|
88
|
+
</div>
|
|
89
|
+
<div
|
|
90
|
+
class="MuiStack-root css-69ywkl-MuiStack-root"
|
|
91
|
+
>
|
|
92
|
+
<span
|
|
93
|
+
aria-label="conversations.contactInfo.more.joinContact"
|
|
94
|
+
class=""
|
|
95
|
+
data-mui-internal-clone-element="true"
|
|
96
|
+
>
|
|
97
|
+
<button
|
|
98
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
99
|
+
tabindex="0"
|
|
100
|
+
type="button"
|
|
101
|
+
>
|
|
102
|
+
<svg />
|
|
103
|
+
<span
|
|
104
|
+
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
|
105
|
+
/>
|
|
106
|
+
</button>
|
|
107
|
+
</span>
|
|
108
|
+
<span
|
|
109
|
+
aria-label="global.edit"
|
|
110
|
+
class=""
|
|
111
|
+
data-mui-internal-clone-element="true"
|
|
112
|
+
>
|
|
113
|
+
<button
|
|
114
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-hdssu8-MuiButtonBase-root-MuiIconButton-root"
|
|
115
|
+
tabindex="0"
|
|
116
|
+
type="button"
|
|
117
|
+
>
|
|
118
|
+
<svg />
|
|
119
|
+
<span
|
|
120
|
+
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
|
121
|
+
/>
|
|
122
|
+
</button>
|
|
123
|
+
</span>
|
|
124
|
+
<span
|
|
125
|
+
aria-label="conversations.sidebar.seeInContacts"
|
|
126
|
+
class=""
|
|
127
|
+
data-mui-internal-clone-element="true"
|
|
128
|
+
>
|
|
129
|
+
<button
|
|
130
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
131
|
+
tabindex="0"
|
|
132
|
+
type="button"
|
|
133
|
+
>
|
|
134
|
+
<svg />
|
|
135
|
+
<span
|
|
136
|
+
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
|
137
|
+
/>
|
|
138
|
+
</button>
|
|
139
|
+
</span>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
<div
|
|
143
|
+
class="MuiBox-root css-1cvwc06"
|
|
144
|
+
>
|
|
145
|
+
<div
|
|
146
|
+
class="MuiStack-root css-1h9mz9o-MuiStack-root"
|
|
147
|
+
>
|
|
148
|
+
<div
|
|
149
|
+
class="MuiAvatar-root MuiAvatar-circular MuiAvatar-colorDefault css-19bux14-MuiAvatar-root"
|
|
150
|
+
>
|
|
151
|
+
<svg
|
|
152
|
+
aria-hidden="true"
|
|
153
|
+
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiAvatar-fallback css-10mi8st-MuiSvgIcon-root-MuiAvatar-fallback"
|
|
154
|
+
data-testid="PersonIcon"
|
|
155
|
+
focusable="false"
|
|
156
|
+
viewBox="0 0 24 24"
|
|
157
|
+
>
|
|
158
|
+
<path
|
|
159
|
+
d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
160
|
+
/>
|
|
161
|
+
</svg>
|
|
162
|
+
</div>
|
|
163
|
+
<div
|
|
164
|
+
class="MuiBox-root css-1fjtzvx"
|
|
165
|
+
>
|
|
166
|
+
<h6
|
|
167
|
+
class="MuiTypography-root MuiTypography-h6 MuiTypography-noWrap css-1h8dq3h-MuiTypography-root"
|
|
168
|
+
>
|
|
169
|
+
Example Person
|
|
170
|
+
</h6>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</body>
|
|
177
|
+
|
|
178
|
+
30 | mockEntity = {...mockEntity, isBusiness, name:'Example Business'};
|
|
179
|
+
31 | render(<PremiumContactHeader activeTab={0} />);
|
|
180
|
+
> 32 | fireEvent.click(screen.getByRole('button', {name:'global.edit'}));
|
|
181
|
+
| ^
|
|
182
|
+
33 | expect(mockEditorProps.open).toBe(true);
|
|
183
|
+
34 | expect(mockEditorProps.entityId).toBe('A');
|
|
184
|
+
35 | expect(mockEditorProps.entityType).toBe(isBusiness ? 'business' : 'contact');
|
|
185
|
+
|
|
186
|
+
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
|
|
187
|
+
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
|
|
188
|
+
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
|
|
189
|
+
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
|
|
190
|
+
at getByRole (src/components/ContactSidebar/__tests__/contactPanels.test.tsx:32:26)
|
|
191
|
+
|
|
192
|
+
● opens the editor with the correct entity target (business=true)
|
|
193
|
+
|
|
194
|
+
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name "global.edit"
|
|
195
|
+
|
|
196
|
+
Here are the accessible roles:
|
|
197
|
+
|
|
198
|
+
button:
|
|
199
|
+
|
|
200
|
+
Name "":
|
|
201
|
+
<button
|
|
202
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
203
|
+
tabindex="0"
|
|
204
|
+
type="button"
|
|
205
|
+
/>
|
|
206
|
+
|
|
207
|
+
Name "":
|
|
208
|
+
<button
|
|
209
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-hdssu8-MuiButtonBase-root-MuiIconButton-root"
|
|
210
|
+
tabindex="0"
|
|
211
|
+
type="button"
|
|
212
|
+
/>
|
|
213
|
+
|
|
214
|
+
Name "":
|
|
215
|
+
<button
|
|
216
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
217
|
+
tabindex="0"
|
|
218
|
+
type="button"
|
|
219
|
+
/>
|
|
220
|
+
|
|
221
|
+
--------------------------------------------------
|
|
222
|
+
heading:
|
|
223
|
+
|
|
224
|
+
Name "Example Business":
|
|
225
|
+
<h6
|
|
226
|
+
class="MuiTypography-root MuiTypography-h6 MuiTypography-noWrap css-1h8dq3h-MuiTypography-root"
|
|
227
|
+
/>
|
|
228
|
+
|
|
229
|
+
--------------------------------------------------
|
|
230
|
+
|
|
231
|
+
Ignored nodes: comments, script, style
|
|
232
|
+
<body>
|
|
233
|
+
<div>
|
|
234
|
+
<div
|
|
235
|
+
class="MuiBox-root css-1kkn1x0"
|
|
236
|
+
>
|
|
237
|
+
<div
|
|
238
|
+
class="MuiBox-root css-uj2gl9"
|
|
239
|
+
>
|
|
240
|
+
<div
|
|
241
|
+
class="MuiStack-root css-1xtp169-MuiStack-root"
|
|
242
|
+
>
|
|
243
|
+
<p
|
|
244
|
+
class="MuiTypography-root MuiTypography-body1 css-1bugzp5-MuiTypography-root"
|
|
245
|
+
>
|
|
246
|
+
global.contact
|
|
247
|
+
</p>
|
|
248
|
+
</div>
|
|
249
|
+
<div
|
|
250
|
+
class="MuiStack-root css-69ywkl-MuiStack-root"
|
|
251
|
+
>
|
|
252
|
+
<span
|
|
253
|
+
aria-label="conversations.contactInfo.more.joinContact"
|
|
254
|
+
class=""
|
|
255
|
+
data-mui-internal-clone-element="true"
|
|
256
|
+
>
|
|
257
|
+
<button
|
|
258
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
259
|
+
tabindex="0"
|
|
260
|
+
type="button"
|
|
261
|
+
>
|
|
262
|
+
<svg />
|
|
263
|
+
<span
|
|
264
|
+
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
|
265
|
+
/>
|
|
266
|
+
</button>
|
|
267
|
+
</span>
|
|
268
|
+
<span
|
|
269
|
+
aria-label="global.edit"
|
|
270
|
+
class=""
|
|
271
|
+
data-mui-internal-clone-element="true"
|
|
272
|
+
>
|
|
273
|
+
<button
|
|
274
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-hdssu8-MuiButtonBase-root-MuiIconButton-root"
|
|
275
|
+
tabindex="0"
|
|
276
|
+
type="button"
|
|
277
|
+
>
|
|
278
|
+
<svg />
|
|
279
|
+
<span
|
|
280
|
+
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
|
281
|
+
/>
|
|
282
|
+
</button>
|
|
283
|
+
</span>
|
|
284
|
+
<span
|
|
285
|
+
aria-label="conversations.sidebar.seeInContacts"
|
|
286
|
+
class=""
|
|
287
|
+
data-mui-internal-clone-element="true"
|
|
288
|
+
>
|
|
289
|
+
<button
|
|
290
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1jddj2l-MuiButtonBase-root-MuiIconButton-root"
|
|
291
|
+
tabindex="0"
|
|
292
|
+
type="button"
|
|
293
|
+
>
|
|
294
|
+
<svg />
|
|
295
|
+
<span
|
|
296
|
+
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
|
297
|
+
/>
|
|
298
|
+
</button>
|
|
299
|
+
</span>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
<div
|
|
303
|
+
class="MuiBox-root css-1cvwc06"
|
|
304
|
+
>
|
|
305
|
+
<div
|
|
306
|
+
class="MuiStack-root css-1h9mz9o-MuiStack-root"
|
|
307
|
+
>
|
|
308
|
+
<div
|
|
309
|
+
class="MuiAvatar-root MuiAvatar-circular MuiAvatar-colorDefault css-19bux14-MuiAvatar-root"
|
|
310
|
+
>
|
|
311
|
+
<svg
|
|
312
|
+
aria-hidden="true"
|
|
313
|
+
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiAvatar-fallback css-10mi8st-MuiSvgIcon-root-MuiAvatar-fallback"
|
|
314
|
+
data-testid="PersonIcon"
|
|
315
|
+
focusable="false"
|
|
316
|
+
viewBox="0 0 24 24"
|
|
317
|
+
>
|
|
318
|
+
<path
|
|
319
|
+
d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
320
|
+
/>
|
|
321
|
+
</svg>
|
|
322
|
+
</div>
|
|
323
|
+
<div
|
|
324
|
+
class="MuiBox-root css-1fjtzvx"
|
|
325
|
+
>
|
|
326
|
+
<h6
|
|
327
|
+
class="MuiTypography-root MuiTypography-h6 MuiTypography-noWrap css-1h8dq3h-MuiTypography-root"
|
|
328
|
+
>
|
|
329
|
+
Example Business
|
|
330
|
+
</h6>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
</body>
|
|
337
|
+
|
|
338
|
+
30 | mockEntity = {...mockEntity, isBusiness, name:'Example Business'};
|
|
339
|
+
31 | render(<PremiumContactHeader activeTab={0} />);
|
|
340
|
+
> 32 | fireEvent.click(screen.getByRole('button', {name:'global.edit'}));
|
|
341
|
+
| ^
|
|
342
|
+
33 | expect(mockEditorProps.open).toBe(true);
|
|
343
|
+
34 | expect(mockEditorProps.entityId).toBe('A');
|
|
344
|
+
35 | expect(mockEditorProps.entityType).toBe(isBusiness ? 'business' : 'contact');
|
|
345
|
+
|
|
346
|
+
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
|
|
347
|
+
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
|
|
348
|
+
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
|
|
349
|
+
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
|
|
350
|
+
at getByRole (src/components/ContactSidebar/__tests__/contactPanels.test.tsx:32:26)
|
|
351
|
+
|
|
352
|
+
Test Suites: 1 failed, 1 total
|
|
353
|
+
Tests: 2 failed, 2 passed, 4 total
|
|
354
|
+
Snapshots: 0 total
|
|
355
|
+
Time: 19.226 s
|
|
356
|
+
Ran all test suites matching /src\\components\\ContactSidebar\\__tests__\\contactPanels.test.tsx/i.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
> @trii/components@3.1.10 build
|
|
3
|
+
> npm-run-all --serial build:types build:js
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @trii/components@3.1.10 build:types
|
|
7
|
+
> tsc --project tsconfig.build.json --emitDeclarationOnly
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
> @trii/components@3.1.10 build:js
|
|
11
|
+
> rollup -c
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
src/index.ts → dist/cjs/index.js, dist/esm/index.js...
|
|
15
|
+
(!) Circular dependency
|
|
16
|
+
src/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/index.ts -> src/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/index.ts -> src/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/InformationSocialNetworkItem.tsx -> src/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/index.ts
|
|
17
|
+
created dist/cjs/index.js, dist/esm/index.js in 17.1s
|
|
18
|
+
|
|
19
|
+
src/asyncState/index.ts → dist/cjs/async-state.js, dist/esm/async-state.js...
|
|
20
|
+
created dist/cjs/async-state.js, dist/esm/async-state.js in 149ms
|
|
21
|
+
|
|
22
|
+
src/theme/index.ts → dist/cjs/theme.js, dist/esm/theme.js...
|
|
23
|
+
created dist/cjs/theme.js, dist/esm/theme.js in 171ms
|
|
24
|
+
|
|
25
|
+
dist/types/index.d.ts → dist/index.d.ts...
|
|
26
|
+
created dist/index.d.ts in 749ms
|
|
27
|
+
|
|
28
|
+
dist/types/asyncState/index.d.ts → dist/async-state.d.ts...
|
|
29
|
+
created dist/async-state.d.ts in 63ms
|
|
30
|
+
|
|
31
|
+
dist/types/theme/index.d.ts → dist/theme.d.ts...
|
|
32
|
+
created dist/theme.d.ts in 144ms
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
> @trii/components@3.1.10 test
|
|
3
|
+
> jest src/components/IntegrationButtonIcon/__tests__/IntegrationButtonIcon.test.tsx src/components/ContactSidebar/__tests__/SidebarContent.test.tsx
|
|
4
|
+
|
|
5
|
+
(node:54436) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
|
|
6
|
+
(Use `node --trace-deprecation ...` to show where the warning was created)
|
|
7
|
+
PASS src/components/ContactSidebar/__tests__/SidebarContent.test.tsx (9.744 s)
|
|
8
|
+
● Console
|
|
9
|
+
|
|
10
|
+
console.error
|
|
11
|
+
Warning: `ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info.
|
|
12
|
+
|
|
13
|
+
34 | });
|
|
14
|
+
35 | it('leaves retry accessible when initial loading fails', () => {
|
|
15
|
+
> 36 | render(<SidebarContent conversation={null} active />);
|
|
16
|
+
| ^
|
|
17
|
+
37 | expect(screen.getByRole('button', { name: 'retry' })).toBeVisible();
|
|
18
|
+
38 | expect(screen.queryByRole('progressbar')).not.toBeInTheDocument();
|
|
19
|
+
39 | });
|
|
20
|
+
|
|
21
|
+
at printWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:71:30)
|
|
22
|
+
at error (node_modules/react-dom/cjs/react-dom-test-utils.development.js:45:7)
|
|
23
|
+
at actWithWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:1736:7)
|
|
24
|
+
at node_modules/@testing-library/react/dist/act-compat.js:47:25
|
|
25
|
+
at renderRoot (node_modules/@testing-library/react/dist/pure.js:180:26)
|
|
26
|
+
at render (node_modules/@testing-library/react/dist/pure.js:271:10)
|
|
27
|
+
at Object.<anonymous> (src/components/ContactSidebar/__tests__/SidebarContent.test.tsx:36:9)
|
|
28
|
+
|
|
29
|
+
(node:58964) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
|
|
30
|
+
(Use `node --trace-deprecation ...` to show where the warning was created)
|
|
31
|
+
PASS src/components/IntegrationButtonIcon/__tests__/IntegrationButtonIcon.test.tsx (11.259 s)
|
|
32
|
+
● Console
|
|
33
|
+
|
|
34
|
+
console.error
|
|
35
|
+
Warning: `ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info.
|
|
36
|
+
|
|
37
|
+
40 |
|
|
38
|
+
41 | it.each(['light', 'dark'] as const)('uses the custom %s color for a configured Lucide icon', mode => {
|
|
39
|
+
> 42 | const { container } = render(preview(colors, mode));
|
|
40
|
+
| ^
|
|
41
|
+
43 | const svg = container.querySelector('svg');
|
|
42
|
+
44 | expect(svg).toHaveClass('lucide-receipt');
|
|
43
|
+
45 | expect(svg).toHaveAttribute('stroke', mode === 'light' ? '#2563eb' : '#fbbf24');
|
|
44
|
+
|
|
45
|
+
at printWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:71:30)
|
|
46
|
+
at error (node_modules/react-dom/cjs/react-dom-test-utils.development.js:45:7)
|
|
47
|
+
at actWithWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:1736:7)
|
|
48
|
+
at node_modules/@testing-library/react/dist/act-compat.js:47:25
|
|
49
|
+
at renderRoot (node_modules/@testing-library/react/dist/pure.js:180:26)
|
|
50
|
+
at render (node_modules/@testing-library/react/dist/pure.js:271:10)
|
|
51
|
+
at src/components/IntegrationButtonIcon/__tests__/IntegrationButtonIcon.test.tsx:42:31
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Test Suites: 2 passed, 2 total
|
|
55
|
+
Tests: 23 passed, 23 total
|
|
56
|
+
Snapshots: 0 total
|
|
57
|
+
Time: 16.501 s
|
|
58
|
+
Ran all test suites matching /src\\components\\IntegrationButtonIcon\\__tests__\\IntegrationButtonIcon.test.tsx|src\\components\\ContactSidebar\\__tests__\\SidebarContent.test.tsx/i.
|