@webitel/ui-sdk 3.1.66 → 3.1.68

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 (53) hide show
  1. package/dist/ui-sdk.common.js +72 -77
  2. package/dist/ui-sdk.common.js.map +1 -1
  3. package/dist/ui-sdk.css +1 -1
  4. package/dist/ui-sdk.umd.js +72 -77
  5. package/dist/ui-sdk.umd.js.map +1 -1
  6. package/dist/ui-sdk.umd.min.js +1 -1
  7. package/dist/ui-sdk.umd.min.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/molecules/wt-button-select/__tests__/WtButtonSelect.spec.js +1 -1
  10. package/src/components/molecules/wt-checkbox/__tests__/WtCheckbox.spec.js +3 -3
  11. package/src/components/molecules/wt-datepicker/__tests__/WtDatepicker.spec.js +2 -2
  12. package/src/components/molecules/wt-input/__tests__/WtInput.spec.js +2 -2
  13. package/src/components/molecules/wt-radio/__tests__/WtRadio.spec.js +3 -3
  14. package/src/components/molecules/wt-select/__tests__/WtSelect.spec.js +2 -2
  15. package/src/components/molecules/wt-select/mixins/__tests__/multiselectMixin.spec.js +2 -2
  16. package/src/components/molecules/wt-switcher/__tests__/WtSwitcher.spec.js +3 -3
  17. package/src/components/molecules/wt-tags-input/__tests__/WtTagsInput.spec.js +4 -4
  18. package/src/components/molecules/wt-textarea/__tests__/WtTextarea.spec.js +2 -2
  19. package/src/components/molecules/wt-time-input/__tests__/WtTimeInput.spec.js +2 -2
  20. package/src/components/molecules/wt-time-input/wt-time-input.vue +126 -132
  21. package/src/components/molecules/wt-timepicker/__tests__/WtTimepicker.spec.js +9 -9
  22. package/src/components/molecules/wt-timepicker/wt-timepicker.vue +7 -4
  23. package/src/components/organisms/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +2 -2
  24. package/src/components/organisms/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +4 -4
  25. package/src/components/organisms/wt-notifications-bar/wt-notifications-bar.vue +49 -48
  26. package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +1 -1
  27. package/src/components/organisms/wt-table/__tests__/WtTable.spec.js +3 -3
  28. package/src/components/organisms/wt-table/wt-table.vue +1 -1
  29. package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +5 -7
  30. package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +3 -3
  31. package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +23 -31
  32. package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +6 -6
  33. package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +4 -4
  34. package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +2 -2
  35. package/src/mixins/dataFilterMixins/paginationFilterMixin.js +3 -3
  36. package/src/mixins/dataFilterMixins/sortFilterMixin.js +2 -2
  37. package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +2 -2
  38. package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +1 -1
  39. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
  40. package/src/modules/AuditForm/components/audit-form.vue +1 -1
  41. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +1 -0
  42. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +9 -11
  43. package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +9 -11
  44. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +11 -11
  45. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +9 -11
  46. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +9 -11
  47. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +11 -11
  48. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +11 -13
  49. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +18 -25
  50. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +14 -9
  51. package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +12 -14
  52. package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +4 -4
  53. package/src/scripts/eventBus.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "3.1.66",
3
+ "version": "3.1.68",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -9,7 +9,7 @@ describe('WtSelectButton', () => {
9
9
 
10
10
  it('renders a button content via default slot', () => {
11
11
  const content = 'button content';
12
- const wrapper = shallowMount(WtSelectButton, {
12
+ const wrapper = mount(WtSelectButton, {
13
13
  slots: {
14
14
  default: content,
15
15
  },
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtCheckbox from '../wt-checkbox.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
  import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
@@ -16,7 +16,7 @@ describe('WtCheckbox', () => {
16
16
 
17
17
  it('renders label text when passed', () => {
18
18
  const label = 'Hello there';
19
- const wrapper = shallowMount(WtCheckbox, {
19
+ const wrapper = mount(WtCheckbox, {
20
20
  stubs: {
21
21
  WtLabel,
22
22
  WtIcon,
@@ -28,7 +28,7 @@ describe('WtCheckbox', () => {
28
28
 
29
29
  it('toggles passed value at click', () => {
30
30
  const selected = true;
31
- const wrapper = shallowMount(WtCheckbox, {
31
+ const wrapper = mount(WtCheckbox, {
32
32
  stubs: {
33
33
  WtLabel,
34
34
  WtIcon,
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtDatepicker from '../wt-datepicker.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
  import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
@@ -16,7 +16,7 @@ describe('WtDatepicker', () => {
16
16
 
17
17
  it('renders label text when passed', () => {
18
18
  const label = 'Hello there';
19
- const wrapper = shallowMount(WtDatepicker, {
19
+ const wrapper = mount(WtDatepicker, {
20
20
  stubs: {
21
21
  WtLabel,
22
22
  WtIcon,
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtInput from '../wt-input.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
 
@@ -14,7 +14,7 @@ describe('WtInput', () => {
14
14
 
15
15
  it('renders label text when passed', () => {
16
16
  const label = 'Hello there';
17
- const wrapper = shallowMount(WtInput, {
17
+ const wrapper = mount(WtInput, {
18
18
  stubs: {
19
19
  WtLabel,
20
20
  },
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { mount, shallowMount } from '@vue/test-utils';
2
2
  import WtRadio from '../wt-radio.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
  import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
@@ -16,7 +16,7 @@ describe('WtRadio', () => {
16
16
 
17
17
  it('renders label text when passed', () => {
18
18
  const label = 'Hello there';
19
- const wrapper = shallowMount(WtRadio, {
19
+ const wrapper = mount(WtRadio, {
20
20
  stubs: {
21
21
  WtLabel,
22
22
  WtIcon,
@@ -29,7 +29,7 @@ describe('WtRadio', () => {
29
29
  it('toggles passed value at click', () => {
30
30
  const selected = '';
31
31
  const value = 'jest';
32
- const wrapper = shallowMount(WtRadio, {
32
+ const wrapper = mount(WtRadio, {
33
33
  stubs: {
34
34
  WtLabel,
35
35
  WtIcon,
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { mount, shallowMount } from '@vue/test-utils';
2
2
  import WtSelect from '../wt-select.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
 
@@ -15,7 +15,7 @@ describe('WtSelect', () => {
15
15
 
16
16
  it('renders label text when passed', () => {
17
17
  const label = 'Hello there';
18
- const wrapper = shallowMount(WtSelect, {
18
+ const wrapper = mount(WtSelect, {
19
19
  stubs: {
20
20
  WtLabel,
21
21
  WtIcon: true,
@@ -17,7 +17,7 @@ describe('MultiselectMixin', () => {
17
17
  const wrapper = shallowMount(Component, {
18
18
  props: { options },
19
19
  });
20
- expect(wrapper.vm.selectOptions).toBe(options);
20
+ expect(wrapper.vm.selectOptions).toEqual(options);
21
21
  });
22
22
 
23
23
  it('Correctly computes internal search options: search case', async () => {
@@ -27,6 +27,6 @@ describe('MultiselectMixin', () => {
27
27
  props: { options, searchMethod: () => ({ items: searchOptions }) },
28
28
  });
29
29
  await wrapper.vm.$nextTick();
30
- expect(wrapper.vm.selectOptions).toBe(searchOptions);
30
+ expect(wrapper.vm.selectOptions).toEqual(searchOptions);
31
31
  });
32
32
  });
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtSwitcher from '../wt-switcher.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
 
@@ -12,7 +12,7 @@ describe('WtSwitcher', () => {
12
12
 
13
13
  it('renders label text when passed', () => {
14
14
  const label = 'Hello there';
15
- const wrapper = shallowMount(WtSwitcher, {
15
+ const wrapper = mount(WtSwitcher, {
16
16
  stubs: { WtLabel },
17
17
  props: { label },
18
18
  });
@@ -21,7 +21,7 @@ describe('WtSwitcher', () => {
21
21
 
22
22
  it('toggles passed value at click', () => {
23
23
  const value = true;
24
- const wrapper = shallowMount(WtSwitcher, {
24
+ const wrapper = mount(WtSwitcher, {
25
25
  stubs: { WtLabel },
26
26
  props: { value },
27
27
  });
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtTagsInput from '../wt-tags-input.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
 
@@ -10,7 +10,7 @@ describe('WtTagsInput', () => {
10
10
 
11
11
  it('renders label text when passed', () => {
12
12
  const label = 'Hello there';
13
- const wrapper = shallowMount(WtTagsInput, {
13
+ const wrapper = mount(WtTagsInput, {
14
14
  stubs: { WtLabel },
15
15
  props: { label },
16
16
  });
@@ -19,7 +19,7 @@ describe('WtTagsInput', () => {
19
19
 
20
20
  it('by default emits "input" event at native "tag" event', () => {
21
21
  const tag = '123';
22
- const wrapper = shallowMount(WtTagsInput, {
22
+ const wrapper = mount(WtTagsInput, {
23
23
  props: {
24
24
  value: [],
25
25
  },
@@ -30,7 +30,7 @@ describe('WtTagsInput', () => {
30
30
 
31
31
  it('in manual mode doesnt emit "input" event at native "tag" event', () => {
32
32
  const tag = '123';
33
- const wrapper = shallowMount(WtTagsInput, {
33
+ const wrapper = mount(WtTagsInput, {
34
34
  props: {
35
35
  value: [],
36
36
  manualTagging: true,
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { mount, shallowMount } from '@vue/test-utils';
2
2
  import WtTextarea from '../wt-textarea.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
 
@@ -14,7 +14,7 @@ describe('WtTextarea', () => {
14
14
 
15
15
  it('renders label text when passed', () => {
16
16
  const label = 'Hello there';
17
- const wrapper = shallowMount(WtTextarea, {
17
+ const wrapper = mount(WtTextarea, {
18
18
  stubs: {
19
19
  WtLabel,
20
20
  },
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtTimeInput from '../wt-time-input.vue';
3
3
  import WtLabel from '../../wt-label/wt-label.vue';
4
4
 
@@ -14,7 +14,7 @@ describe('WtTimeInput', () => {
14
14
 
15
15
  it('renders label text when passed', () => {
16
16
  const label = 'Hello there';
17
- const wrapper = shallowMount(WtTimeInput, {
17
+ const wrapper = mount(WtTimeInput, {
18
18
  stubs: {
19
19
  WtLabel,
20
20
  },
@@ -27,7 +27,7 @@
27
27
  :max="maxValue"
28
28
  :disabled="disabled"
29
29
  type="number"
30
- v-on="listeners"
30
+ @input="$emit('input', $event.target.value)"
31
31
  >
32
32
  </div>
33
33
  <wt-input-info
@@ -41,150 +41,144 @@
41
41
  <script>
42
42
  import validationMixin from '../../../mixins/validationMixin/validationMixin';
43
43
 
44
- export default {
45
- name: 'wt-time-input',
46
- mixins: [validationMixin],
47
- props: {
48
- /**
49
- * Current input value (`v-model`)
50
- */
51
- value: {
52
- type: Number,
53
- default: 0,
54
- },
55
- /**
56
- * Form input label
57
- */
58
- label: {
59
- type: String,
60
- default: '',
61
- },
62
- /**
63
- * Form input name
64
- */
65
- name: {
66
- type: String,
67
- default: '',
68
- },
69
- /**
70
- * Time type: day, minute, second
71
- */
72
- maxValue: {
73
- type: Number,
74
- },
75
- /**
76
- * Native input required attribute
77
- */
78
- required: {
79
- type: Boolean,
80
- default: false,
81
- description: 'Native input required attribute',
82
- },
83
- /**
84
- * Native input disabled attribute
85
- */
86
- disabled: {
87
- type: Boolean,
88
- default: false,
89
- description: 'Native input disabled attribute',
90
- },
91
-
92
- outline: {
93
- type: Boolean,
94
- default: false,
95
- },
96
-
97
- labelProps: {
98
- type: Object,
99
- description: 'Object with props, passed down to wt-label as props',
100
- },
101
-
102
- hideInputInfo: {
103
- type: Boolean,
104
- default: false,
105
- },
44
+ export default {
45
+ name: 'wt-time-input',
46
+ mixins: [validationMixin],
47
+ props: {
48
+ /**
49
+ * Current input value (`v-model`)
50
+ */
51
+ value: {
52
+ type: Number,
53
+ default: 0,
106
54
  },
107
- computed: {
108
- hasLabel() {
109
- return !!(this.label || this.$slots.label);
110
- },
111
- listeners() {
112
- return {
113
- ...this.$listeners,
114
- input: (event) => this.$emit('input', event.target.value),
115
- };
116
- },
117
- showInfo() {
118
- return this.isValidation && !this.hideInputInfo;
119
- },
55
+ /**
56
+ * Form input label
57
+ */
58
+ label: {
59
+ type: String,
60
+ default: '',
120
61
  },
121
- };
62
+ /**
63
+ * Form input name
64
+ */
65
+ name: {
66
+ type: String,
67
+ default: '',
68
+ },
69
+ /**
70
+ * Time type: day, minute, second
71
+ */
72
+ maxValue: {
73
+ type: Number,
74
+ },
75
+ /**
76
+ * Native input required attribute
77
+ */
78
+ required: {
79
+ type: Boolean,
80
+ default: false,
81
+ description: 'Native input required attribute',
82
+ },
83
+ /**
84
+ * Native input disabled attribute
85
+ */
86
+ disabled: {
87
+ type: Boolean,
88
+ default: false,
89
+ description: 'Native input disabled attribute',
90
+ },
91
+
92
+ outline: {
93
+ type: Boolean,
94
+ default: false,
95
+ },
96
+
97
+ labelProps: {
98
+ type: Object,
99
+ description: 'Object with props, passed down to wt-label as props',
100
+ },
101
+
102
+ hideInputInfo: {
103
+ type: Boolean,
104
+ default: false,
105
+ },
106
+ },
107
+ computed: {
108
+ hasLabel() {
109
+ return !!(this.label || this.$slots.label);
110
+ },
111
+ showInfo() {
112
+ return this.isValidation && !this.hideInputInfo;
113
+ },
114
+ },
115
+ };
122
116
  </script>
123
117
 
124
118
  <style lang="scss" scoped>
125
- .wt-time-input {
126
- display: inline-block;
127
- cursor: text;
119
+ .wt-time-input {
120
+ display: inline-block;
121
+ cursor: text;
128
122
 
129
- &--disabled {
130
- pointer-events: none;
131
- }
123
+ &--disabled {
124
+ pointer-events: none;
132
125
  }
126
+ }
127
+
128
+ .wt-time-input__wrapper {
129
+ position: relative;
130
+ }
133
131
 
134
- .wt-time-input__wrapper {
135
- position: relative;
132
+ .wt-label {
133
+ text-align: center;
134
+
135
+ .wt-time-input:hover &,
136
+ .wt-time-input:focus-within & {
137
+ color: var(--form-label--hover-color);
136
138
  }
137
139
 
138
- .wt-label {
139
- text-align: center;
140
+ .wt-time-input--invalid:hover &,
141
+ .wt-time-input--invalid:focus-within & {
142
+ color: var(--label--invalid-color);
143
+ }
144
+ }
145
+
146
+ .wt-time-input__input {
147
+ @extend %typo-body-1;
148
+
149
+ display: block;
150
+ width: 100%;
151
+ box-sizing: border-box;
152
+ padding: var(--input-padding);
153
+ color: var(--form-input-color);
154
+ border: var(--input-border);
155
+ border-color: var(--form-border-color);
156
+ border-radius: var(--border-radius);
157
+ transition: var(--transition);
158
+
159
+ .wt-time-input:hover &,
160
+ &:focus {
161
+ border-color: var(--form-border--hover-color);
162
+ }
163
+
164
+ .wt-time-input--outline & {
165
+ border-color: var(--form-outline-border-color);
166
+ }
140
167
 
141
- .wt-time-input:hover &,
142
- .wt-time-input:focus-within & {
143
- color: var(--form-label--hover-color);
144
- }
168
+ .wt-time-input--outline:hover &,
169
+ .wt-time-input--outline &:focus {
170
+ border-color: var(--form-outline-border--hover-color);
171
+ }
145
172
 
146
- .wt-time-input--invalid:hover &,
147
- .wt-time-input--invalid:focus-within & {
148
- color: var(--label--invalid-color);
149
- }
173
+ .wt-time-input--disabled & {
174
+ background: var(--form-border--disabled-color);
175
+ border-color: var(--form-border--disabled-color);
150
176
  }
151
177
 
152
- .wt-time-input__input {
153
- @extend %typo-body-1;
154
-
155
- display: block;
156
- width: 100%;
157
- box-sizing: border-box;
158
- padding: var(--input-padding);
159
- color: var(--form-input-color);
160
- border: var(--input-border);
161
- border-color: var(--form-border-color);
162
- border-radius: var(--border-radius);
163
- transition: var(--transition);
164
-
165
- .wt-time-input:hover &,
166
- &:focus {
167
- border-color: var(--form-border--hover-color);
168
- }
169
-
170
- .wt-time-input--outline & {
171
- border-color: var(--form-outline-border-color);
172
- }
173
-
174
- .wt-time-input--outline:hover &,
175
- .wt-time-input--outline &:focus {
176
- border-color: var(--form-outline-border--hover-color);
177
- }
178
-
179
- .wt-time-input--disabled & {
180
- background: var(--form-border--disabled-color);
181
- border-color: var(--form-border--disabled-color);
182
- }
183
-
184
- .wt-time-input--invalid &,
185
- .wt-time-input--invalid:hover & {
186
- border-color: var(--false-color);
187
- outline: none; // prevent outline overlapping false color
188
- }
178
+ .wt-time-input--invalid &,
179
+ .wt-time-input--invalid:hover & {
180
+ border-color: var(--false-color);
181
+ outline: none; // prevent outline overlapping false color
189
182
  }
183
+ }
190
184
  </style>
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtTimepicker from '../wt-timepicker.vue';
3
3
  import WtTimeInput from '../../wt-time-input/wt-time-input.vue';
4
4
 
@@ -13,7 +13,7 @@ describe('WtTimepicker', () => {
13
13
  });
14
14
 
15
15
  it('renders only specified by format time inputs', () => {
16
- const wrapper = shallowMount(WtTimepicker, {
16
+ const wrapper = mount(WtTimepicker, {
17
17
  stubs: {
18
18
  WtTimeInput,
19
19
  },
@@ -22,12 +22,12 @@ describe('WtTimepicker', () => {
22
22
  expect(wrapper.findAllComponents(WtTimeInput).length).toBe(1);
23
23
  });
24
24
 
25
- it('Correctly converts value from MIN time-input to output', () => {
25
+ it('Correctly converts value from MIN time-input to output', async () => {
26
26
  const value = 0;
27
- const wrapper = shallowMount(WtTimepicker, {
28
- stubs: {
29
- WtTimeInput,
30
- },
27
+ const wrapper = mount(WtTimepicker, {
28
+ // stubs: {
29
+ // WtTimeInput,
30
+ // },
31
31
  props: { value },
32
32
  });
33
33
  wrapper.findAllComponents(WtTimeInput).at(0).vm.$emit('input', 21);
@@ -36,7 +36,7 @@ describe('WtTimepicker', () => {
36
36
 
37
37
  it('Correctly converts value from HOUR time-input to output', () => {
38
38
  const value = 0;
39
- const wrapper = shallowMount(WtTimepicker, {
39
+ const wrapper = mount(WtTimepicker, {
40
40
  stubs: {
41
41
  WtTimeInput,
42
42
  },
@@ -48,7 +48,7 @@ describe('WtTimepicker', () => {
48
48
 
49
49
  it('Correctly converts value from SEC time-input to output', () => {
50
50
  const value = 0;
51
- const wrapper = shallowMount(WtTimepicker, {
51
+ const wrapper = mount(WtTimepicker, {
52
52
  stubs: {
53
53
  WtTimeInput,
54
54
  },
@@ -10,30 +10,33 @@
10
10
  <div class="wt-timepicker__wrapper">
11
11
  <wt-time-input
12
12
  v-if="isHour"
13
- v-model="hour"
13
+ :value="hour"
14
14
  :v="v"
15
15
  :label="label ? null : $t('webitelUI.timepicker.hour') "
16
16
  :maxValue="dateMode ? null : 23"
17
17
  :disabled="disabled"
18
18
  hide-input-info
19
+ @input="hour = $event"
19
20
  ></wt-time-input>
20
21
  <wt-time-input
21
22
  v-if="isMin"
22
- v-model="min"
23
+ :value="min"
23
24
  :v="v"
24
25
  :label="label ? null : $t('webitelUI.timepicker.min')"
25
26
  :maxValue="59"
26
27
  :disabled="disabled"
27
28
  hide-input-info
29
+ @input="min = $event"
28
30
  ></wt-time-input>
29
31
  <wt-time-input
30
32
  v-if="isSec"
31
- v-model="sec"
33
+ :value="sec"
32
34
  :v="v"
33
35
  :label="label ? null : $t('webitelUI.timepicker.sec')"
34
36
  :maxValue="59"
35
37
  :disabled="disabled"
36
38
  hide-input-info
39
+ @input="sec = $event"
37
40
  ></wt-time-input>
38
41
  </div>
39
42
  <wt-input-info
@@ -50,7 +53,7 @@ import validationMixin from '../../../mixins/validationMixin/validationMixin';
50
53
  const SEC_IN_HOUR = 60 * 60;
51
54
  const SEC_IN_MIN = 60;
52
55
 
53
- export default {
56
+ export default {
54
57
  name: 'wt-timepicker',
55
58
  mixins: [validationMixin],
56
59
  props: {
@@ -60,9 +60,9 @@ describe('WtNavigationBar', () => {
60
60
  },
61
61
  props: { nav },
62
62
  });
63
- wrapper.find('.wt-navigation-bar__nav-expansion').trigger('click');
63
+ await wrapper.find('.wt-navigation-bar__nav-expansion').trigger('click');
64
64
  await wrapper.vm.$nextTick();
65
- expect(wrapper.find('.wt-navigation-bar__nav-item-link--subnav').attributes('to'))
65
+ expect(wrapper.findComponent('.wt-navigation-bar__nav-item-link--subnav').attributes('href'))
66
66
  .toBe('/2/3');
67
67
  });
68
68
  });
@@ -6,14 +6,14 @@ import eventBus from '../../../../scripts/eventBus';
6
6
  describe('WtNotificationsBar', () => {
7
7
  it('renders a component', () => {
8
8
  const wrapper = shallowMount(WtNotificationsBar, {
9
- mocks: { $eventBus: eventBus },
9
+ global: { provide: { $eventBus: eventBus } },
10
10
  });
11
11
  expect(wrapper.classes('wt-notifications-bar')).toBe(true);
12
12
  });
13
13
 
14
14
  it('shows notification at event bus event', async () => {
15
15
  const wrapper = shallowMount(WtNotificationsBar, {
16
- mocks: { $eventBus: eventBus },
16
+ global: { provide: { $eventBus: eventBus } },
17
17
  });
18
18
  wrapper.vm.$eventBus.$emit('notification', {
19
19
  type: 'error', text: 'error',
@@ -24,7 +24,7 @@ describe('WtNotificationsBar', () => {
24
24
 
25
25
  it('closes notification manually', async () => {
26
26
  const wrapper = shallowMount(WtNotificationsBar, {
27
- mocks: { $eventBus: eventBus },
27
+ global: { provide: { $eventBus: eventBus } },
28
28
  });
29
29
  wrapper.vm.$eventBus.$emit('notification', {
30
30
  type: 'error', text: 'error',
@@ -37,7 +37,7 @@ describe('WtNotificationsBar', () => {
37
37
 
38
38
  it('closes notification automatically', async () => {
39
39
  const wrapper = shallowMount(WtNotificationsBar, {
40
- mocks: { $eventBus: eventBus },
40
+ global: { provide: { $eventBus: eventBus } },
41
41
  data: () => ({ notificationDuration: 100 }),
42
42
  });
43
43
  wrapper.vm.$eventBus.$emit('notification', {