@webitel/ui-sdk 26.4.17 → 26.4.18
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/displayText-Cbh4IOfM.js +5 -0
- package/dist/{index-B_bOPX3o.js → index-B0AYwz58.js} +1 -1
- package/dist/{index-eEFER0lI.js → index-Dvhbo446.js} +1 -1
- package/dist/{install-C_4PcYy4.js → install-CrJnxpPS.js} +1729 -1726
- package/dist/{isObject-Bc_zejYi.js → isObject-BsWrydYX.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +232 -232
- package/dist/{useVidstackSrc-BjBi-Z6a.js → useVidstackSrc-Bmp2wHly.js} +1 -1
- package/dist/{vidstack-Bq6c3Bam-Do_GZqV0.js → vidstack-Bq6c3Bam-N3JOOQyW.js} +3 -3
- package/dist/{vidstack-D2pY00kU-DtEQuJNJ.js → vidstack-D2pY00kU-ByaRFZub.js} +3 -3
- package/dist/{vidstack-DDXt6fpN-BjUme5OE.js → vidstack-DDXt6fpN-H7PZzMEr.js} +2 -2
- package/dist/{vidstack-D_-9AA6_-BUgV5EDC.js → vidstack-D_-9AA6_-BgRVFwPt.js} +2 -2
- package/dist/{vidstack-DqAw8m9J-D5-emHfz.js → vidstack-DqAw8m9J-BODJkoui.js} +1 -1
- package/dist/{vidstack-audio-DmysFuAQ.js → vidstack-audio-Cnpq73DL.js} +2 -2
- package/dist/{vidstack-dash-CF4d8BuX.js → vidstack-dash-Bzo3Gzfd.js} +4 -4
- package/dist/{vidstack-google-cast-CNPyXY9S.js → vidstack-google-cast--giiu8Z5.js} +4 -4
- package/dist/{vidstack-hls-BLaXkLiF.js → vidstack-hls-CrDFf1Gs.js} +4 -4
- package/dist/{vidstack-video-v_RKZWR5.js → vidstack-video-h7Tsw5LU.js} +3 -3
- package/dist/{vidstack-vimeo-BCNYIpmz.js → vidstack-vimeo-CbcdGN2R.js} +4 -4
- package/dist/{vidstack-youtube-C1DaWOJU.js → vidstack-youtube-DKzx3LPK.js} +3 -3
- package/dist/{wt-action-bar-Ckg4xWY1.js → wt-action-bar-GCDVmO0b.js} +1 -1
- package/dist/{wt-button-select-DHqtUP4R.js → wt-button-select-BBsJj7FV.js} +1 -1
- package/dist/{wt-chat-emoji-BVMxNx8W.js → wt-chat-emoji-MhnNs-SG.js} +2 -2
- package/dist/{wt-confirm-dialog-BNjF-amp.js → wt-confirm-dialog-B4J3ZU2r.js} +1 -1
- package/dist/{wt-context-menu-DkK9-qLI.js → wt-context-menu-Cekc6Rva.js} +1 -1
- package/dist/{wt-copy-action-7hL0mEvW.js → wt-copy-action-CT_0bHmt.js} +1 -1
- package/dist/{wt-datepicker-Bvde1_4k.js → wt-datepicker-B513Tw-Z.js} +1 -1
- package/dist/wt-display-chip-items-CMB33VOU.js +47 -0
- package/dist/{wt-dual-panel-C6E7X3c8.js → wt-dual-panel-DjHHFx8Y.js} +1 -1
- package/dist/{wt-dummy-oCvw9ZAO.js → wt-dummy-BivOEKRK.js} +1 -1
- package/dist/{wt-error-page-BWRGUdsV.js → wt-error-page-krwX0484.js} +1 -1
- package/dist/{wt-expansion-card-DqdyzBFB.js → wt-expansion-card-Mrne6YQJ.js} +1 -1
- package/dist/{wt-expansion-panel-CGYB7-8V.js → wt-expansion-panel-D0SABYA1.js} +1 -1
- package/dist/{wt-filters-panel-wrapper-BdWYuFBU.js → wt-filters-panel-wrapper-Dffe4cS8.js} +1 -1
- package/dist/{wt-galleria-BBSNSwsR.js → wt-galleria-CB3UNqGT.js} +1 -1
- package/dist/{wt-navigation-menu-CubDPnaE.js → wt-navigation-menu-CozB-VN3.js} +1 -1
- package/dist/{wt-notifications-bar-B9gUZbnG.js → wt-notifications-bar-CBv9RpW3.js} +2 -2
- package/dist/{wt-pagination-Dafsnmhz.js → wt-pagination-CrnHm3Ei.js} +1 -1
- package/dist/{wt-player-DxvKDEYJ.js → wt-player-Be7Ts4oe.js} +2 -2
- package/dist/wt-screen-recordings-action-VJpYH40a.js +55 -0
- package/dist/{wt-search-bar-BSTKSDBo.js → wt-search-bar-BNUpiOyg.js} +1 -1
- package/dist/{wt-selection-popup-D_mDRYjd.js → wt-selection-popup-DZG_s5cn.js} +1 -1
- package/dist/{wt-start-page-BYGMWDsS.js → wt-start-page-B1Ya211Z.js} +1 -1
- package/dist/{wt-status-select-BDFd1JE-.js → wt-status-select-ByEBtG_Z.js} +1 -1
- package/dist/{wt-stepper-Db5aEz47.js → wt-stepper-Bke8hGIN.js} +1 -1
- package/dist/{wt-table-actions-BTmBjf1Q.js → wt-table-actions-D2QF78Jq.js} +1 -1
- package/dist/{wt-table-column-select-abILUxUr.js → wt-table-column-select-BtcIByjb.js} +2 -2
- package/dist/{wt-table-92BKexHp.js → wt-table-rT0puxyU.js} +1 -1
- package/dist/{wt-tabs-B21sWbPs.js → wt-tabs-BIn8m45h.js} +1 -1
- package/dist/{wt-tags-input-DNA22dSR.js → wt-tags-input-Bz3T5KC7.js} +2 -2
- package/dist/{wt-timepicker-CgowHF74.js → wt-timepicker-CuMYCWnA.js} +1 -1
- package/dist/{wt-tree-CvHw827i.js → wt-tree-DftQx0vm.js} +2 -2
- package/dist/{wt-tree-table-DWgEjAUG.js → wt-tree-table-Cqt8iSLj.js} +1 -1
- package/dist/{wt-type-extension-value-input-BvHowj58.js → wt-type-extension-value-input-rX_qRFjQ.js} +2 -2
- package/dist/{wt-vidstack-player-BnK8NLH3.js → wt-vidstack-player-CWmoXIAG.js} +10 -10
- package/package.json +5 -2
- package/src/api/clients/users/__tests__/users.spec.js +1 -1
- package/src/components/index.js +8 -0
- package/src/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue +72 -0
- package/src/components/wt-button/__tests__/WtButton.spec.js +10 -5
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +13 -16
- package/src/components/wt-checkbox/__tests__/WtCheckbox.spec.js +6 -2
- package/src/components/wt-chip/__tests__/WtChip.spec.js +3 -3
- package/src/components/wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js +4 -17
- package/src/components/wt-icon/__tests__/WtIcon.spec.js +19 -2
- package/src/components/wt-pagination/__tests__/WtPagination.spec.js +80 -16
- package/src/components/wt-radio/__tests__/WtRadio.spec.js +8 -2
- package/src/components/wt-rounded-action/__tests__/WtRoundedAction.spec.js +98 -0
- package/src/components/wt-switcher/__tests__/WtSwitcher.spec.js +9 -11
- package/src/components/wt-textarea/__tests__/WtTextarea.spec.js +2 -2
- package/src/components/wt-time-input/__tests__/WtTimeInput.spec.js +18 -1
- package/src/components/wt-timepicker/__tests__/WtTimepicker.spec.js +9 -15
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +60 -80
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +6 -47
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-pause-cause-popup.spec.js +31 -3
- package/src/modules/Appearance/components/__tests__/wt-dark-mode-switcher.spec.js +16 -10
- package/src/modules/AuditForm/components/form-questions/options/__tests__/audit-form-question-options.spec.js +4 -6
- package/src/modules/AuditForm/components/form-questions/score/__tests__/audit-form-question-score.spec.js +2 -2
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +7 -51
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +12 -8
- package/types/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue.d.ts +10 -0
- package/dist/wt-display-chip-items-DPoEtUZ-.js +0 -46
- package/src/components/wt-copy-action/__tests__/WtCopyAction.spec.js +0 -15
- package/src/components/wt-divider/__tests__/WtDivider.spec.js +0 -10
- package/src/components/wt-slider/__tests__/WtSlider.spec.js +0 -10
- package/src/components/wt-table/__tests__/WtTable.spec.js +0 -140
- package/src/modules/Filters/components/__tests__/filter-pagination.spec.js +0 -109
- package/src/modules/Filters/components/__tests__/filter-table-fields.spec.js +0 -112
- package/types/components/wt-copy-action/__tests__/WtCopyAction.spec.d.ts +0 -1
- package/types/components/wt-divider/__tests__/WtDivider.spec.d.ts +0 -1
- package/types/components/wt-slider/__tests__/WtSlider.spec.d.ts +0 -1
- package/types/components/wt-table/__tests__/WtTable.spec.d.ts +0 -1
- package/types/modules/Filters/components/__tests__/filter-pagination.spec.d.ts +0 -1
- package/types/modules/Filters/components/__tests__/filter-table-fields.spec.d.ts +0 -1
package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js
CHANGED
|
@@ -54,53 +54,8 @@ describe('Wt Cc Agent Status Select', () => {
|
|
|
54
54
|
const wrapper = shallowMount(WtCcAgentStatusSelect, mountOptions);
|
|
55
55
|
expect(wrapper.exists()).toBe(true);
|
|
56
56
|
});
|
|
57
|
-
it(`at wt-status-select "change" to "online" event, triggers agent status patch
|
|
58
|
-
with "online" status`, () => {
|
|
59
|
-
const wrapper = shallowMount(WtCcAgentStatusSelect, mountOptions);
|
|
60
|
-
wrapper
|
|
61
|
-
.findComponent({
|
|
62
|
-
name: 'wt-status-select',
|
|
63
|
-
})
|
|
64
|
-
.vm.$emit('change', AgentStatus.ONLINE);
|
|
65
|
-
const reqPayload = {
|
|
66
|
-
status: AgentStatus.ONLINE,
|
|
67
|
-
agentId: agent.agentId,
|
|
68
|
-
payload: undefined,
|
|
69
|
-
};
|
|
70
|
-
expect(agentStatusMock).toHaveBeenCalledWith(reqPayload);
|
|
71
|
-
});
|
|
72
|
-
it('at wt-status-select "change" to "pause" event, pause causes are loaded', async () => {
|
|
73
|
-
const wrapper = shallowMount(WtCcAgentStatusSelect, mountOptions);
|
|
74
|
-
wrapper
|
|
75
|
-
.findComponent({
|
|
76
|
-
name: 'wt-status-select',
|
|
77
|
-
})
|
|
78
|
-
.vm.$emit('change', AgentStatus.PAUSE);
|
|
79
|
-
await wrapper.vm.$nextTick();
|
|
80
|
-
expect(getAgentPauseCausesMock).toHaveBeenCalled();
|
|
81
|
-
});
|
|
82
|
-
it(`at wt-status-select "change" to "pause" event and pause causes truthy response,
|
|
83
|
-
pause-cause-popup appears`, async () => {
|
|
84
|
-
const wrapper = mount(WtCcAgentStatusSelect, mountOptions);
|
|
85
|
-
wrapper
|
|
86
|
-
.findComponent({
|
|
87
|
-
name: 'wt-status-select',
|
|
88
|
-
})
|
|
89
|
-
.vm.$emit('change', AgentStatus.PAUSE);
|
|
90
|
-
await wrapper.vm.$nextTick(); // load pause causes
|
|
91
|
-
await wrapper.vm.$nextTick();
|
|
92
|
-
await wrapper.vm.$nextTick(); // render popup
|
|
93
|
-
expect(
|
|
94
|
-
wrapper
|
|
95
|
-
.findComponent({
|
|
96
|
-
name: 'pause-cause-popup',
|
|
97
|
-
})
|
|
98
|
-
.isVisible(),
|
|
99
|
-
).toBe(true);
|
|
100
|
-
});
|
|
101
57
|
it(`at pause-cause-popup "change" event, triggers patch agent status
|
|
102
58
|
with "pause" status and passed pauseCause`, async () => {
|
|
103
|
-
const pauseCause = 'jest';
|
|
104
59
|
const wrapper = mount(WtCcAgentStatusSelect, mountOptions);
|
|
105
60
|
wrapper.vm.openPauseCausePopup();
|
|
106
61
|
await wrapper.vm.$nextTick();
|
|
@@ -109,11 +64,15 @@ describe('Wt Cc Agent Status Select', () => {
|
|
|
109
64
|
.findComponent({
|
|
110
65
|
name: 'pause-cause-popup',
|
|
111
66
|
})
|
|
112
|
-
.vm.$emit('change',
|
|
67
|
+
.vm.$emit('change', {
|
|
68
|
+
pauseCause: 'coffee',
|
|
69
|
+
statusComment: 'brb',
|
|
70
|
+
});
|
|
113
71
|
const reqPayload = {
|
|
114
72
|
status: AgentStatus.PAUSE,
|
|
115
73
|
agentId: agent.agentId,
|
|
116
|
-
pauseCause,
|
|
74
|
+
pauseCause: 'coffee',
|
|
75
|
+
statusComment: 'brb',
|
|
117
76
|
};
|
|
118
77
|
expect(agentStatusMock).toHaveBeenCalledWith(reqPayload);
|
|
119
78
|
});
|
|
@@ -13,7 +13,8 @@ describe('Pause cause popup', () => {
|
|
|
13
13
|
props: {
|
|
14
14
|
options: [
|
|
15
15
|
{
|
|
16
|
-
|
|
16
|
+
id: 1,
|
|
17
|
+
name: value,
|
|
17
18
|
},
|
|
18
19
|
],
|
|
19
20
|
},
|
|
@@ -22,7 +23,34 @@ describe('Pause cause popup', () => {
|
|
|
22
23
|
.findComponent({
|
|
23
24
|
name: 'wt-radio',
|
|
24
25
|
})
|
|
25
|
-
.vm.$emit('
|
|
26
|
-
expect(wrapper.vm.selected.
|
|
26
|
+
.vm.$emit('update:selected');
|
|
27
|
+
expect(wrapper.vm.selected.name).toEqual(value);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('emits payload and close on setPause', async () => {
|
|
31
|
+
const wrapper = mount(WtCcPauseCausePopup, {
|
|
32
|
+
props: {
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
id: 1,
|
|
36
|
+
name: 'coffee',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
wrapper.vm.select({
|
|
43
|
+
id: 1,
|
|
44
|
+
name: 'coffee',
|
|
45
|
+
statusComment: 'brb',
|
|
46
|
+
});
|
|
47
|
+
wrapper.vm.setPause();
|
|
48
|
+
await wrapper.vm.$nextTick();
|
|
49
|
+
|
|
50
|
+
expect(wrapper.emitted().change[0][0]).toEqual({
|
|
51
|
+
pauseCause: 'coffee',
|
|
52
|
+
statusComment: 'brb',
|
|
53
|
+
});
|
|
54
|
+
expect(wrapper.emitted().close).toBeTruthy();
|
|
27
55
|
});
|
|
28
56
|
});
|
|
@@ -5,16 +5,20 @@ import AppearanceStoreModule from '../../store/AppearanceStoreModule.js';
|
|
|
5
5
|
import WtDarkModeSwitcher from '../wt-dark-mode-switcher.vue';
|
|
6
6
|
|
|
7
7
|
describe('WtDarkModeSwitcher', () => {
|
|
8
|
-
let
|
|
8
|
+
let wrapper;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
const store = createStore(new AppearanceStoreModule().getModule());
|
|
12
|
+
localStorage.removeItem('theme');
|
|
13
|
+
document.documentElement.classList.remove('theme--dark');
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
wrapper = shallowMount(WtDarkModeSwitcher, {
|
|
16
|
+
global: {
|
|
17
|
+
plugins: [
|
|
18
|
+
store,
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
});
|
|
18
22
|
});
|
|
19
23
|
|
|
20
24
|
it('should render component', () => {
|
|
@@ -25,13 +29,15 @@ describe('WtDarkModeSwitcher', () => {
|
|
|
25
29
|
expect(
|
|
26
30
|
window.document.documentElement.classList.contains('theme--dark'),
|
|
27
31
|
).toBe(false);
|
|
28
|
-
|
|
32
|
+
wrapper
|
|
29
33
|
.findComponent({
|
|
30
34
|
name: 'wt-switcher',
|
|
31
35
|
})
|
|
32
|
-
.
|
|
36
|
+
.vm.$emit('update:model-value');
|
|
37
|
+
await wrapper.vm.$nextTick();
|
|
33
38
|
expect(
|
|
34
39
|
window.document.documentElement.classList.contains('theme--dark'),
|
|
35
40
|
).toBe(true);
|
|
41
|
+
expect(localStorage.getItem('theme')).toBe('dark');
|
|
36
42
|
});
|
|
37
43
|
});
|
|
@@ -25,7 +25,7 @@ describe('AuditFormQuestionOptions', () => {
|
|
|
25
25
|
wrapper
|
|
26
26
|
.findComponent('.audit-form-question-options-write__add-button')
|
|
27
27
|
.vm.$emit('click');
|
|
28
|
-
expect(wrapper.emitted()['
|
|
28
|
+
expect(wrapper.emitted()['update:question'][0][0].options.length).toBe(2);
|
|
29
29
|
});
|
|
30
30
|
it('deletes existing question option at "delete" icon-btn click', () => {
|
|
31
31
|
const wrapper = mount(AuditFormQuestionOptions, {
|
|
@@ -42,7 +42,7 @@ describe('AuditFormQuestionOptions', () => {
|
|
|
42
42
|
name: 'audit-form-question-options-write-row',
|
|
43
43
|
});
|
|
44
44
|
writeRow.vm.$emit('delete');
|
|
45
|
-
expect(wrapper.emitted()['
|
|
45
|
+
expect(wrapper.emitted()['update:question'][0][0].options.length).toBe(0);
|
|
46
46
|
});
|
|
47
47
|
it('emits result change with selected radio option score', () => {
|
|
48
48
|
const score = 11;
|
|
@@ -62,10 +62,8 @@ describe('AuditFormQuestionOptions', () => {
|
|
|
62
62
|
.findComponent({
|
|
63
63
|
name: 'wt-radio',
|
|
64
64
|
})
|
|
65
|
-
.vm.$emit('
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
expect(wrapper.emitted()['change:result'][0][0]).toEqual({
|
|
65
|
+
.vm.$emit('update:selected', score);
|
|
66
|
+
expect(wrapper.emitted()['update:answer'][0][0]).toEqual({
|
|
69
67
|
score,
|
|
70
68
|
});
|
|
71
69
|
});
|
|
@@ -29,8 +29,8 @@ describe('AuditFormQuestionScore', () => {
|
|
|
29
29
|
.findComponent({
|
|
30
30
|
name: 'wt-radio',
|
|
31
31
|
})
|
|
32
|
-
.vm.$emit('
|
|
33
|
-
expect(wrapper.emitted()['
|
|
32
|
+
.vm.$emit('update:selected', min);
|
|
33
|
+
expect(wrapper.emitted()['update:answer'][0][0]).toEqual({
|
|
34
34
|
score: min,
|
|
35
35
|
});
|
|
36
36
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
3
|
|
|
4
4
|
import { useValidation } from '../../../mixins/validationMixin/useValidation';
|
|
@@ -23,69 +23,25 @@ describe('DeleteConfirmationPopup', () => {
|
|
|
23
23
|
expect(wrapper.classes('delete-confirmation-popup')).toBe(true);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
it('yes button called props callback', async () => {
|
|
27
|
-
const callback = vi.fn();
|
|
28
|
-
const wrapper = mount(DeleteConfirmationPopup, {
|
|
29
|
-
props: {
|
|
30
|
-
deleteCount: 1,
|
|
31
|
-
callback,
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
const button = wrapper
|
|
35
|
-
.findAllComponents({
|
|
36
|
-
name: 'wt-button',
|
|
37
|
-
})
|
|
38
|
-
.find((btn) => btn.text().includes('Yes'));
|
|
39
|
-
expect(button.text()).toContain('Yes');
|
|
40
|
-
await button.trigger('click');
|
|
41
|
-
await wrapper.vm.$nextTick();
|
|
42
|
-
expect(callback).toHaveBeenCalled();
|
|
43
|
-
});
|
|
44
|
-
|
|
45
26
|
it('popup message block have delete count', () => {
|
|
46
27
|
const deleteCount = 123;
|
|
47
|
-
const wrapper =
|
|
28
|
+
const wrapper = shallowMount(DeleteConfirmationPopup, {
|
|
48
29
|
props: {
|
|
49
30
|
deleteCount,
|
|
50
31
|
callback: vi.fn(),
|
|
51
32
|
},
|
|
52
33
|
});
|
|
53
|
-
expect(
|
|
54
|
-
wrapper.find('.delete-confirmation-popup__content').text(),
|
|
55
|
-
).toContain(deleteCount.toString());
|
|
34
|
+
expect(wrapper.vm.deleteMessage).toContain(deleteCount.toString());
|
|
56
35
|
});
|
|
57
36
|
|
|
58
|
-
it('
|
|
59
|
-
const wrapper =
|
|
37
|
+
it('uses "delete all" text for zero count', () => {
|
|
38
|
+
const wrapper = shallowMount(DeleteConfirmationPopup, {
|
|
60
39
|
props: {
|
|
61
|
-
deleteCount:
|
|
40
|
+
deleteCount: 0,
|
|
62
41
|
callback: vi.fn(),
|
|
63
42
|
},
|
|
64
43
|
});
|
|
65
|
-
const button = wrapper
|
|
66
|
-
.findAllComponents({
|
|
67
|
-
name: 'wt-button',
|
|
68
|
-
})
|
|
69
|
-
.find((btn) => btn.text().includes('Yes'));
|
|
70
|
-
await button.vm.$emit('close');
|
|
71
|
-
await wrapper.vm.$nextTick();
|
|
72
|
-
expect(button.emitted('close')).toBeTruthy();
|
|
73
|
-
});
|
|
74
44
|
|
|
75
|
-
|
|
76
|
-
const wrapper = mount(DeleteConfirmationPopup, {
|
|
77
|
-
props: {
|
|
78
|
-
deleteCount: 1,
|
|
79
|
-
callback: vi.fn(),
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
const button = wrapper
|
|
83
|
-
.findAllComponents({
|
|
84
|
-
name: 'wt-button',
|
|
85
|
-
})
|
|
86
|
-
.find((btn) => btn.text().includes('No'));
|
|
87
|
-
await button.vm.$emit('close');
|
|
88
|
-
await wrapper.vm.$nextTick();
|
|
89
|
-
expect(button.emitted('close')).toBeTruthy();
|
|
45
|
+
expect(wrapper.vm.deleteMessage).toBeTruthy();
|
|
90
46
|
});
|
|
91
47
|
});
|
|
@@ -48,13 +48,17 @@ describe('QueryFiltersStoreModule getters', () => {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
describe('QueryFiltersStoreModule actions', () => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
let context;
|
|
52
|
+
let module;
|
|
53
|
+
beforeEach(() => {
|
|
54
|
+
context = {
|
|
55
|
+
state: {
|
|
56
|
+
...state,
|
|
57
|
+
},
|
|
58
|
+
commit: vi.fn(),
|
|
59
|
+
};
|
|
60
|
+
module = new QueryFiltersStoreModule().getModule();
|
|
61
|
+
});
|
|
58
62
|
it('SET_FILTER: single value filter', () => {
|
|
59
63
|
const filter = {
|
|
60
64
|
filter: valueFilter,
|
|
@@ -114,7 +118,7 @@ describe('QueryFiltersStoreModule actions', () => {
|
|
|
114
118
|
});
|
|
115
119
|
it('calls RESET_FILTERS mutation on RESET_FILTERS action call', () => {
|
|
116
120
|
module.actions.RESET_FILTERS(context);
|
|
117
|
-
expect(context.commit).toHaveBeenCalledWith('RESET_FILTERS');
|
|
121
|
+
expect(context.commit).toHaveBeenCalledWith('RESET_FILTERS', undefined);
|
|
118
122
|
});
|
|
119
123
|
});
|
|
120
124
|
|
package/types/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
files: unknown[];
|
|
3
|
+
}
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
"set-video": (val: unknown) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
7
|
+
"onSet-video"?: (val: unknown) => any;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { defineComponent as v, computed as p, createElementBlock as t, openBlock as s, createCommentVNode as a, renderSlot as m, createVNode as d, toDisplayString as n, createTextVNode as h, unref as u, withCtx as c, Fragment as k, renderList as C } from "vue";
|
|
2
|
-
import { ae as I, af as B, _ as S } from "./install-C_4PcYy4.js";
|
|
3
|
-
const y = "-", b = (i) => i || y, g = { class: "wt-display-chip-items" }, w = { key: 0 }, E = ["onClick"], F = /* @__PURE__ */ v({
|
|
4
|
-
__name: "wt-display-chip-items",
|
|
5
|
-
props: {
|
|
6
|
-
hideFirstItem: { type: Boolean },
|
|
7
|
-
useEmptySymbol: { type: Boolean },
|
|
8
|
-
title: {},
|
|
9
|
-
items: {}
|
|
10
|
-
},
|
|
11
|
-
setup(i) {
|
|
12
|
-
const e = i, f = p(() => e.items?.length ? e.items[0]?.name : e.useEmptySymbol ? y : ""), o = p(() => e.items?.length ? e.hideFirstItem ? e.items : e.items.slice(1) : []);
|
|
13
|
-
return (l, N) => (s(), t("div", g, [
|
|
14
|
-
e.title ? (s(), t("p", w, n(i.title) + ":", 1)) : a("", !0),
|
|
15
|
-
e.hideFirstItem ? a("", !0) : m(l.$slots, "first-item", { key: 1 }, () => [
|
|
16
|
-
h(n(u(b)(f.value)), 1)
|
|
17
|
-
], !0),
|
|
18
|
-
d(u(I), null, {
|
|
19
|
-
activator: c(({ toggle: r }) => [
|
|
20
|
-
m(l.$slots, "activator", { toggle: r }, () => [
|
|
21
|
-
o.value.length ? (s(), t("div", {
|
|
22
|
-
key: 0,
|
|
23
|
-
onClick: r
|
|
24
|
-
}, [
|
|
25
|
-
d(u(B), null, {
|
|
26
|
-
default: c(() => [
|
|
27
|
-
h(" +" + n(o.value.length), 1)
|
|
28
|
-
], void 0, !0),
|
|
29
|
-
_: 1
|
|
30
|
-
})
|
|
31
|
-
], 8, E)) : a("", !0)
|
|
32
|
-
], !0)
|
|
33
|
-
]),
|
|
34
|
-
default: c(() => [
|
|
35
|
-
m(l.$slots, "items", { items: o.value }, () => [
|
|
36
|
-
(s(!0), t(k, null, C(o.value, ({ name: r, id: _ }) => (s(), t("div", { key: _ }, n(r), 1))), 128))
|
|
37
|
-
], !0)
|
|
38
|
-
]),
|
|
39
|
-
_: 3
|
|
40
|
-
})
|
|
41
|
-
]));
|
|
42
|
-
}
|
|
43
|
-
}), T = /* @__PURE__ */ S(F, [["__scopeId", "data-v-4c67fbb7"]]);
|
|
44
|
-
export {
|
|
45
|
-
T as default
|
|
46
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
|
|
3
|
-
import WtIconBtn from '../../wt-icon-btn/wt-icon-btn.vue';
|
|
4
|
-
import WtCopyAction from '../wt-copy-action.vue';
|
|
5
|
-
|
|
6
|
-
describe('WtCopyAction', () => {
|
|
7
|
-
it('renders a component', () => {
|
|
8
|
-
const wrapper = shallowMount(WtCopyAction, {
|
|
9
|
-
stubs: {
|
|
10
|
-
WtIconBtn,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
expect(wrapper.classes('wt-copy-action')).toBe(true);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
|
|
3
|
-
import WtDivider from '../wt-divider.vue';
|
|
4
|
-
|
|
5
|
-
describe('WtDivider', () => {
|
|
6
|
-
it('renders a component', () => {
|
|
7
|
-
const wrapper = shallowMount(WtDivider);
|
|
8
|
-
expect(wrapper.classes('wt-divider')).toBe(true);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
|
|
3
|
-
import WtSlider from '../wt-slider.vue';
|
|
4
|
-
|
|
5
|
-
describe('WtSlider', () => {
|
|
6
|
-
it('renders a component', () => {
|
|
7
|
-
const wrapper = shallowMount(WtSlider, {});
|
|
8
|
-
expect(wrapper.classes('wt-slider')).toBe(true);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { mount, shallowMount } from '@vue/test-utils';
|
|
2
|
-
|
|
3
|
-
import WtCheckbox from '../../wt-checkbox/wt-checkbox.vue';
|
|
4
|
-
import WtTable from '../wt-table.vue';
|
|
5
|
-
|
|
6
|
-
const headers = [
|
|
7
|
-
{
|
|
8
|
-
text: 'heading 1',
|
|
9
|
-
value: 'h1',
|
|
10
|
-
sort: null,
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
text: 'heading2',
|
|
14
|
-
value: 'h2',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
text: 'heading 3',
|
|
18
|
-
value: 'h3',
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
const data = [
|
|
22
|
-
{
|
|
23
|
-
h1: 'value 1',
|
|
24
|
-
h2: 'value 2',
|
|
25
|
-
h3: 'value 3',
|
|
26
|
-
_isSelected: false,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
h1: 'value 1',
|
|
30
|
-
h2: 'value 2',
|
|
31
|
-
h3: 'value 3',
|
|
32
|
-
_isSelected: false,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
h1: 'value 1',
|
|
36
|
-
h2: 'value 2',
|
|
37
|
-
h3: 'value 3',
|
|
38
|
-
_isSelected: false,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
h1: 'value 1',
|
|
42
|
-
h2: 'value 2',
|
|
43
|
-
h3: 'value 3',
|
|
44
|
-
_isSelected: false,
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
describe('WtTable', () => {
|
|
49
|
-
it('renders a component', () => {
|
|
50
|
-
const wrapper = shallowMount(WtTable);
|
|
51
|
-
expect(wrapper.classes('wt-table')).toBe(true);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('renders table data rows', () => {
|
|
55
|
-
const wrapper = shallowMount(WtTable, {
|
|
56
|
-
props: {
|
|
57
|
-
headers,
|
|
58
|
-
data,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
expect(wrapper.findAll('.wt-table__tr__body').length).toBe(data.length);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('renders table headers', () => {
|
|
65
|
-
const wrapper = shallowMount(WtTable, {
|
|
66
|
-
props: {
|
|
67
|
-
headers,
|
|
68
|
-
data,
|
|
69
|
-
selectable: false,
|
|
70
|
-
gridActions: false,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
expect(wrapper.findAll('.wt-table__tr__head th').length).toBe(
|
|
74
|
-
headers.length,
|
|
75
|
-
);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
it('do not renders table footer by default', () => {
|
|
79
|
-
const wrapper = shallowMount(WtTable, {
|
|
80
|
-
props: {
|
|
81
|
-
headers,
|
|
82
|
-
data,
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
expect(wrapper.find('.wt-table__foot').exists()).toBe(false);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it('renders table footer if footer slot is passed', () => {
|
|
89
|
-
const wrapper = shallowMount(WtTable, {
|
|
90
|
-
props: {
|
|
91
|
-
headers,
|
|
92
|
-
data,
|
|
93
|
-
},
|
|
94
|
-
slots: {
|
|
95
|
-
'data-footer': '',
|
|
96
|
-
},
|
|
97
|
-
});
|
|
98
|
-
expect(wrapper.find('.wt-table__foot').isVisible()).toBe(true);
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it('emits sort event at header click when sortable is true', () => {
|
|
102
|
-
const wrapper = shallowMount(WtTable, {
|
|
103
|
-
props: {
|
|
104
|
-
headers,
|
|
105
|
-
data,
|
|
106
|
-
sortable: true,
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
wrapper.find('.wt-table__th--sortable').trigger('click');
|
|
110
|
-
expect(wrapper.emitted().sort.pop()).toBeTruthy();
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it('draws sort arrow, if a column is sorted', () => {
|
|
114
|
-
headers[0].sort = 'asc';
|
|
115
|
-
const wrapper = shallowMount(WtTable, {
|
|
116
|
-
props: {
|
|
117
|
-
headers,
|
|
118
|
-
data,
|
|
119
|
-
sortable: true,
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
expect(
|
|
123
|
-
wrapper
|
|
124
|
-
.find('.wt-table__th--sortable .wt-table__th__sort-arrow')
|
|
125
|
-
.exists(),
|
|
126
|
-
).toBe(true);
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
it('selects all rows at header checkbox click', async () => {
|
|
130
|
-
const wrapper = mount(WtTable, {
|
|
131
|
-
props: {
|
|
132
|
-
headers,
|
|
133
|
-
data,
|
|
134
|
-
selectable: true,
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
wrapper.findComponent(WtCheckbox).vm.$emit('change');
|
|
138
|
-
expect(data.every((item) => item._isSelected)).toBe(true);
|
|
139
|
-
});
|
|
140
|
-
});
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { mount } from '@vue/test-utils';
|
|
2
|
-
import { createStore } from 'vuex';
|
|
3
|
-
|
|
4
|
-
import FiltersStoreModule from '../../store/FiltersStoreModule.js';
|
|
5
|
-
import FilterPagination from '../filter-pagination.vue';
|
|
6
|
-
|
|
7
|
-
const filtersSchema = [
|
|
8
|
-
{
|
|
9
|
-
name: 'page',
|
|
10
|
-
value: 1,
|
|
11
|
-
get: [
|
|
12
|
-
'value',
|
|
13
|
-
],
|
|
14
|
-
set: [
|
|
15
|
-
'value',
|
|
16
|
-
],
|
|
17
|
-
restore: () => {},
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: 'size',
|
|
21
|
-
value: 11,
|
|
22
|
-
get: [
|
|
23
|
-
'value',
|
|
24
|
-
],
|
|
25
|
-
set: [
|
|
26
|
-
'value',
|
|
27
|
-
],
|
|
28
|
-
restore: () => {},
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
describe('FilterPagination', () => {
|
|
33
|
-
it('renders a component', () => {
|
|
34
|
-
const store = createStore({
|
|
35
|
-
modules: {
|
|
36
|
-
filters: new FiltersStoreModule().addFilter(filtersSchema).getModule(),
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const wrapper = mount(FilterPagination, {
|
|
41
|
-
props: {
|
|
42
|
-
namespace: 'filters',
|
|
43
|
-
},
|
|
44
|
-
global: {
|
|
45
|
-
plugins: [
|
|
46
|
-
store,
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
expect(wrapper.exists()).toBe(true);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it('size change dispatches SET_FILTER action', async () => {
|
|
54
|
-
const store = createStore({
|
|
55
|
-
modules: {
|
|
56
|
-
filters: new FiltersStoreModule().addFilter(filtersSchema).getModule(),
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
const wrapper = mount(FilterPagination, {
|
|
61
|
-
shallow: true,
|
|
62
|
-
props: {
|
|
63
|
-
namespace: 'filters',
|
|
64
|
-
},
|
|
65
|
-
global: {
|
|
66
|
-
plugins: [
|
|
67
|
-
store,
|
|
68
|
-
],
|
|
69
|
-
stubs: {
|
|
70
|
-
WtPagination: false,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const pagination = wrapper.findComponent('.wt-pagination');
|
|
76
|
-
pagination.vm.$emit('input', 321);
|
|
77
|
-
pagination.vm.$emit('change');
|
|
78
|
-
await wrapper.vm.$nextTick();
|
|
79
|
-
expect(store.getters['filters/GET_FILTER']('size')).toBe(321);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it('page change dispatches SET_FILTER action', async () => {
|
|
83
|
-
const store = createStore({
|
|
84
|
-
modules: {
|
|
85
|
-
filters: new FiltersStoreModule().addFilter(filtersSchema).getModule(),
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
const wrapper = mount(FilterPagination, {
|
|
90
|
-
shallow: true,
|
|
91
|
-
props: {
|
|
92
|
-
namespace: 'filters',
|
|
93
|
-
},
|
|
94
|
-
global: {
|
|
95
|
-
plugins: [
|
|
96
|
-
store,
|
|
97
|
-
],
|
|
98
|
-
stubs: {
|
|
99
|
-
WtPagination: false,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
const pagination = wrapper.findComponent('.wt-pagination');
|
|
105
|
-
pagination.vm.$emit('next');
|
|
106
|
-
await wrapper.vm.$nextTick();
|
|
107
|
-
expect(store.getters['filters/GET_FILTER']('page')).toBe(2);
|
|
108
|
-
});
|
|
109
|
-
});
|