@webitel/ui-sdk 26.4.16 → 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-CRJrntZh.js → index-B0AYwz58.js} +1 -1
- package/dist/{index-Bi3e-yvC.js → index-Dvhbo446.js} +1 -1
- package/dist/{install-BduuMOLN.js → install-CrJnxpPS.js} +1905 -1893
- package/dist/{isObject-CzE0nrvV.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 +241 -241
- package/dist/{useVidstackSrc-CLxGvfx7.js → useVidstackSrc-Bmp2wHly.js} +1 -1
- package/dist/{vidstack-Bq6c3Bam-BAJLRjUL.js → vidstack-Bq6c3Bam-N3JOOQyW.js} +3 -3
- package/dist/{vidstack-D2pY00kU-BUwc6A8v.js → vidstack-D2pY00kU-ByaRFZub.js} +3 -3
- package/dist/{vidstack-DDXt6fpN-CLi5zfDH.js → vidstack-DDXt6fpN-H7PZzMEr.js} +2 -2
- package/dist/{vidstack-D_-9AA6_-BV38l14i.js → vidstack-D_-9AA6_-BgRVFwPt.js} +2 -2
- package/dist/{vidstack-DqAw8m9J-jbgzgoAn.js → vidstack-DqAw8m9J-BODJkoui.js} +1 -1
- package/dist/{vidstack-audio-B4T0OD88.js → vidstack-audio-Cnpq73DL.js} +2 -2
- package/dist/{vidstack-dash-C-EzK5NU.js → vidstack-dash-Bzo3Gzfd.js} +4 -4
- package/dist/{vidstack-google-cast-BND83Re6.js → vidstack-google-cast--giiu8Z5.js} +4 -4
- package/dist/{vidstack-hls-xaDBRbO-.js → vidstack-hls-CrDFf1Gs.js} +4 -4
- package/dist/{vidstack-video-BDSTzD3w.js → vidstack-video-h7Tsw5LU.js} +3 -3
- package/dist/{vidstack-vimeo-B4xYeH9Q.js → vidstack-vimeo-CbcdGN2R.js} +4 -4
- package/dist/{vidstack-youtube-rDfIJqG7.js → vidstack-youtube-DKzx3LPK.js} +3 -3
- package/dist/{wt-action-bar-lVU52KrC.js → wt-action-bar-GCDVmO0b.js} +1 -1
- package/dist/{wt-button-select-C7wNgMqI.js → wt-button-select-BBsJj7FV.js} +1 -1
- package/dist/{wt-chat-emoji-D2nEPIDy.js → wt-chat-emoji-MhnNs-SG.js} +2 -2
- package/dist/{wt-confirm-dialog-CAX92f_I.js → wt-confirm-dialog-B4J3ZU2r.js} +1 -1
- package/dist/{wt-context-menu-2CaTxYJx.js → wt-context-menu-Cekc6Rva.js} +1 -1
- package/dist/{wt-copy-action-BrhZR265.js → wt-copy-action-CT_0bHmt.js} +1 -1
- package/dist/{wt-datepicker-2AQYoSOi.js → wt-datepicker-B513Tw-Z.js} +1 -1
- package/dist/wt-display-chip-items-CMB33VOU.js +47 -0
- package/dist/{wt-dual-panel-CGBeh_yX.js → wt-dual-panel-DjHHFx8Y.js} +1 -1
- package/dist/{wt-dummy-CiVhtg3s.js → wt-dummy-BivOEKRK.js} +1 -1
- package/dist/{wt-error-page-CbYKAqR3.js → wt-error-page-krwX0484.js} +1 -1
- package/dist/{wt-expansion-card-zBUn8aGk.js → wt-expansion-card-Mrne6YQJ.js} +1 -1
- package/dist/{wt-expansion-panel-BmkuYFI9.js → wt-expansion-panel-D0SABYA1.js} +1 -1
- package/dist/{wt-filters-panel-wrapper-B_kiQbJU.js → wt-filters-panel-wrapper-Dffe4cS8.js} +1 -1
- package/dist/{wt-galleria-DtV88s0G.js → wt-galleria-CB3UNqGT.js} +1 -1
- package/dist/{wt-navigation-menu-DPrkKcay.js → wt-navigation-menu-CozB-VN3.js} +1 -1
- package/dist/{wt-notifications-bar-B1MdVgU5.js → wt-notifications-bar-CBv9RpW3.js} +2 -2
- package/dist/{wt-pagination-DeNIA-Rj.js → wt-pagination-CrnHm3Ei.js} +37 -26
- package/dist/{wt-player-Z6LVaHke.js → wt-player-Be7Ts4oe.js} +2 -2
- package/dist/wt-screen-recordings-action-VJpYH40a.js +55 -0
- package/dist/{wt-search-bar-JemSkyKl.js → wt-search-bar-BNUpiOyg.js} +1 -1
- package/dist/{wt-selection-popup-DvScmlyg.js → wt-selection-popup-DZG_s5cn.js} +1 -1
- package/dist/{wt-start-page-C--6cL1x.js → wt-start-page-B1Ya211Z.js} +1 -1
- package/dist/{wt-status-select-B97OCBvE.js → wt-status-select-ByEBtG_Z.js} +1 -1
- package/dist/{wt-stepper-B48Se9mZ.js → wt-stepper-Bke8hGIN.js} +1 -1
- package/dist/{wt-table-actions-DYT34nCQ.js → wt-table-actions-D2QF78Jq.js} +1 -1
- package/dist/{wt-table-column-select-BMVbzN0g.js → wt-table-column-select-BtcIByjb.js} +2 -2
- package/dist/{wt-table-CemrI6D7.js → wt-table-rT0puxyU.js} +1 -1
- package/dist/{wt-tabs-A0gMEnTl.js → wt-tabs-BIn8m45h.js} +1 -1
- package/dist/{wt-tags-input-D9BVloW9.js → wt-tags-input-Bz3T5KC7.js} +2 -2
- package/dist/{wt-timepicker-zbgCNBxA.js → wt-timepicker-CuMYCWnA.js} +1 -1
- package/dist/{wt-tree-Di-glh2x.js → wt-tree-DftQx0vm.js} +2 -2
- package/dist/{wt-tree-table-BUDxyApa.js → wt-tree-table-Cqt8iSLj.js} +1 -1
- package/dist/{wt-type-extension-value-input-BZzPpD02.js → wt-type-extension-value-input-rX_qRFjQ.js} +2 -2
- package/dist/{wt-vidstack-player-IX8uh__X.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-pagination/wt-pagination.vue +28 -8
- 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-rounded-action/wt-rounded-action.vue +21 -8
- 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-DO2rtX0h.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
|
@@ -2,137 +2,117 @@ import { useRepresentableAgentPauseCause } from '../useRepresentableAgentPauseCa
|
|
|
2
2
|
|
|
3
3
|
describe('useRepresentableAgentPauseCause', () => {
|
|
4
4
|
it('correctly computes duration', () => {
|
|
5
|
-
const pauseCauses =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
],
|
|
12
|
-
};
|
|
5
|
+
const pauseCauses = [
|
|
6
|
+
{
|
|
7
|
+
durationMin: 10,
|
|
8
|
+
limitMin: 12,
|
|
9
|
+
},
|
|
10
|
+
];
|
|
13
11
|
const { representablePauseCause } =
|
|
14
12
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
15
13
|
expect(representablePauseCause.value[0].duration).toBe('00:10');
|
|
16
14
|
});
|
|
17
15
|
it('isOverflow with limit = 0 returns false', () => {
|
|
18
|
-
const pauseCauses =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
],
|
|
25
|
-
};
|
|
16
|
+
const pauseCauses = [
|
|
17
|
+
{
|
|
18
|
+
durationMin: 10,
|
|
19
|
+
limitMin: 0,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
26
22
|
const { representablePauseCause } =
|
|
27
23
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
28
24
|
expect(representablePauseCause.value[0].isOverflow).toBe(false);
|
|
29
25
|
});
|
|
30
26
|
it('isOverflow with duration < limit returns false', () => {
|
|
31
|
-
const pauseCauses =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
],
|
|
38
|
-
};
|
|
27
|
+
const pauseCauses = [
|
|
28
|
+
{
|
|
29
|
+
durationMin: 10,
|
|
30
|
+
limitMin: 12,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
39
33
|
const { representablePauseCause } =
|
|
40
34
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
41
35
|
expect(representablePauseCause.value[0].isOverflow).toBe(false);
|
|
42
36
|
});
|
|
43
37
|
it('isOverflow with duration > limit returns true', () => {
|
|
44
|
-
const pauseCauses =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
],
|
|
51
|
-
};
|
|
38
|
+
const pauseCauses = [
|
|
39
|
+
{
|
|
40
|
+
durationMin: 14,
|
|
41
|
+
limitMin: 12,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
52
44
|
const { representablePauseCause } =
|
|
53
45
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
54
46
|
expect(representablePauseCause.value[0].isOverflow).toBe(true);
|
|
55
47
|
});
|
|
56
48
|
|
|
57
49
|
it('isOverflow with duration = limit returns false', () => {
|
|
58
|
-
const pauseCauses =
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
],
|
|
65
|
-
};
|
|
50
|
+
const pauseCauses = [
|
|
51
|
+
{
|
|
52
|
+
durationMin: 12,
|
|
53
|
+
limitMin: 12,
|
|
54
|
+
},
|
|
55
|
+
];
|
|
66
56
|
const { representablePauseCause } =
|
|
67
57
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
68
58
|
expect(representablePauseCause.value[0].isOverflow).toBe(false);
|
|
69
59
|
});
|
|
70
60
|
|
|
71
61
|
it('correctly computes progressColor', () => {
|
|
72
|
-
const pauseCauses =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
],
|
|
79
|
-
};
|
|
62
|
+
const pauseCauses = [
|
|
63
|
+
{
|
|
64
|
+
durationMin: 10,
|
|
65
|
+
limitMin: 12,
|
|
66
|
+
},
|
|
67
|
+
];
|
|
80
68
|
const { representablePauseCause } =
|
|
81
69
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
82
70
|
expect(representablePauseCause.value[0].progressColor).toBe('primary');
|
|
83
71
|
});
|
|
84
72
|
|
|
85
73
|
it('correctly computes progressColor with duration > limit', () => {
|
|
86
|
-
const pauseCauses =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
],
|
|
93
|
-
};
|
|
74
|
+
const pauseCauses = [
|
|
75
|
+
{
|
|
76
|
+
durationMin: 14,
|
|
77
|
+
limitMin: 12,
|
|
78
|
+
},
|
|
79
|
+
];
|
|
94
80
|
const { representablePauseCause } =
|
|
95
81
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
96
82
|
expect(representablePauseCause.value[0].progressColor).toBe('error');
|
|
97
83
|
});
|
|
98
84
|
|
|
99
85
|
it('correctly computes progressColor with duration < limit', () => {
|
|
100
|
-
const pauseCauses =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
],
|
|
107
|
-
};
|
|
86
|
+
const pauseCauses = [
|
|
87
|
+
{
|
|
88
|
+
durationMin: 3,
|
|
89
|
+
limitMin: 12,
|
|
90
|
+
},
|
|
91
|
+
];
|
|
108
92
|
const { representablePauseCause } =
|
|
109
93
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
110
94
|
expect(representablePauseCause.value[0].progressColor).toBe('success');
|
|
111
95
|
});
|
|
112
96
|
|
|
113
97
|
it('correctly computes progressColor with duration = limit', () => {
|
|
114
|
-
const pauseCauses =
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
],
|
|
121
|
-
};
|
|
98
|
+
const pauseCauses = [
|
|
99
|
+
{
|
|
100
|
+
durationMin: 12,
|
|
101
|
+
limitMin: 12,
|
|
102
|
+
},
|
|
103
|
+
];
|
|
122
104
|
const { representablePauseCause } =
|
|
123
105
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
124
106
|
expect(representablePauseCause.value[0].progressColor).toBe('primary');
|
|
125
107
|
});
|
|
126
108
|
|
|
127
109
|
it('correctly computes limit', () => {
|
|
128
|
-
const pauseCauses =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
],
|
|
135
|
-
};
|
|
110
|
+
const pauseCauses = [
|
|
111
|
+
{
|
|
112
|
+
durationMin: 12,
|
|
113
|
+
limitMin: 12,
|
|
114
|
+
},
|
|
115
|
+
];
|
|
136
116
|
const { representablePauseCause } =
|
|
137
117
|
useRepresentableAgentPauseCause(pauseCauses);
|
|
138
118
|
expect(representablePauseCause.value[0].limit).toBe('00:12');
|
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-BduuMOLN.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
|
-
});
|