@rancher/shell 3.0.9-rc.5 → 3.0.9
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/assets/images/providers/oci-open-containers.svg +22 -0
- package/assets/images/providers/traefik.png +0 -0
- package/assets/styles/themes/_dark.scss +2 -0
- package/assets/styles/themes/_light.scss +2 -0
- package/assets/styles/themes/_modern.scss +6 -0
- package/assets/translations/en-us.yaml +129 -25
- package/components/CruResource.vue +3 -1
- package/components/ExplorerProjectsNamespaces.vue +12 -12
- package/components/IconOrSvg.vue +61 -42
- package/components/Resource/Detail/Card/StatusCard/__tests__/StatusCard.test.ts +109 -0
- package/components/Resource/Detail/Card/StatusCard/index.vue +21 -4
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +19 -2
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +19 -11
- package/components/Resource/Detail/ResourcePopover/__tests__/index.test.ts +12 -0
- package/components/Resource/Detail/ResourcePopover/index.vue +2 -0
- package/components/Resource/Detail/ResourceRow.vue +2 -2
- package/components/ResourceList/index.vue +7 -4
- package/components/SortableTable/index.vue +2 -2
- package/components/Window/ContainerLogs.vue +48 -37
- package/components/fleet/FleetClusterTargets/TargetsList.vue +2 -2
- package/components/fleet/FleetClusterTargets/index.vue +6 -1
- package/components/fleet/GitRepoAdvancedTab.vue +333 -0
- package/components/fleet/GitRepoMetadataTab.vue +43 -0
- package/components/fleet/GitRepoRepositoryTab.vue +101 -0
- package/components/fleet/GitRepoTargetTab.vue +77 -0
- package/components/fleet/HelmOpAdvancedTab.vue +247 -0
- package/components/fleet/HelmOpChartTab.vue +158 -0
- package/components/fleet/HelmOpMetadataTab.vue +46 -0
- package/components/fleet/HelmOpTargetTab.vue +84 -0
- package/components/fleet/HelmOpValuesTab.vue +147 -0
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +119 -70
- package/components/form/BannerSettings.vue +2 -2
- package/components/form/NodeScheduling.vue +81 -7
- package/components/form/NotificationSettings.vue +2 -2
- package/components/form/PodAffinity.vue +1 -36
- package/components/form/ResourceLabeledSelect.vue +8 -4
- package/components/form/ResourceQuota/Namespace.vue +30 -9
- package/components/form/ResourceQuota/NamespaceRow.vue +25 -7
- package/components/form/ResourceQuota/Project.vue +140 -82
- package/components/form/ResourceQuota/ResourceQuotaEntry.vue +145 -0
- package/components/form/ResourceQuota/__tests__/Namespace.test.ts +307 -0
- package/components/form/ResourceQuota/__tests__/NamespaceRow.test.ts +281 -0
- package/components/form/ResourceQuota/__tests__/Project.test.ts +274 -27
- package/components/form/ResourceQuota/__tests__/ResourceQuotaEntry.test.ts +215 -0
- package/components/form/SchedulingCustomization.vue +14 -6
- package/components/form/SelectOrCreateAuthSecret.vue +107 -18
- package/components/form/__tests__/NodeScheduling.test.ts +12 -9
- package/components/form/__tests__/PodAffinity.test.ts +21 -2
- package/components/form/__tests__/SchedulingCustomization.test.ts +240 -0
- package/components/formatter/ClusterLink.vue +8 -0
- package/components/formatter/SecretOrigin.vue +79 -0
- package/config/labels-annotations.js +7 -6
- package/config/pagination-table-headers.js +6 -4
- package/config/product/explorer.js +1 -11
- package/config/product/manager.js +0 -1
- package/config/query-params.js +3 -0
- package/config/settings.ts +15 -2
- package/config/table-headers.js +21 -17
- package/config/types.js +23 -8
- package/detail/fleet.cattle.io.cluster.vue +1 -1
- package/detail/workload/index.vue +11 -16
- package/dialog/DeactivateDriverDialog.vue +1 -1
- package/dialog/FeatureFlagListDialog.vue +1 -1
- package/dialog/Ipv6NetworkingDialog.vue +156 -0
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +1 -1
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +1 -0
- package/edit/__tests__/management.cattle.io.project.test.js +56 -128
- package/edit/auth/oidc.vue +1 -1
- package/edit/catalog.cattle.io.clusterrepo.vue +155 -25
- package/edit/fleet.cattle.io.gitrepo.vue +153 -283
- package/edit/fleet.cattle.io.helmop.vue +190 -332
- package/edit/management.cattle.io.project.vue +5 -42
- package/edit/management.cattle.io.setting.vue +6 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/__tests__/auth.spec.ts +145 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/__tests__/index.test.ts +202 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/__tests__/tls.spec.ts +226 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +24 -21
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/__tests__/opsgenie.spec.ts +157 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/__tests__/pagerduty.spec.ts +132 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/__tests__/slack.spec.ts +108 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +2 -1
- package/edit/monitoring.coreos.com.receiver/__tests__/auth.spec.ts +165 -0
- package/edit/monitoring.coreos.com.receiver/__tests__/index.test.ts +153 -0
- package/edit/monitoring.coreos.com.receiver/__tests__/tls.spec.ts +115 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/email.spec.ts +86 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/opsgenie.spec.ts +209 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/pagerduty.spec.ts +105 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/slack.spec.ts +92 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/webhook.spec.ts +131 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +55 -24
- package/edit/provisioning.cattle.io.cluster/__tests__/Networking.test.ts +1 -103
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +13 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2-fleet-cluster-agent.test.ts +283 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +65 -49
- package/edit/provisioning.cattle.io.cluster/ingress/IngressCards.vue +114 -0
- package/edit/provisioning.cattle.io.cluster/ingress/IngressConfiguration.vue +158 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +167 -69
- package/edit/provisioning.cattle.io.cluster/shared.ts +36 -1
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +70 -7
- package/edit/provisioning.cattle.io.cluster/tabs/Ingress.vue +343 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/__tests__/S3Config.test.ts +13 -1
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +10 -44
- package/edit/secret/index.vue +1 -1
- package/edit/token.vue +68 -29
- package/edit/workload/__tests__/index.test.ts +2 -37
- package/edit/workload/index.vue +6 -2
- package/edit/workload/mixins/workload.js +0 -32
- package/list/__tests__/management.cattle.io.setting.test.ts +198 -0
- package/list/management.cattle.io.setting.vue +13 -0
- package/list/provisioning.cattle.io.cluster.vue +50 -1
- package/list/secret.vue +4 -9
- package/list/service.vue +6 -8
- package/machine-config/amazonec2.vue +11 -4
- package/machine-config/components/EC2Networking.vue +46 -30
- package/machine-config/components/__tests__/EC2Networking.test.ts +7 -7
- package/machine-config/components/__tests__/utils/vpcSubnetMockData.js +0 -9
- package/machine-config/digitalocean.vue +3 -3
- package/models/__tests__/chart.test.ts +2 -2
- package/models/__tests__/namespace.test.ts +11 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +96 -0
- package/models/__tests__/workload.test.ts +42 -1
- package/models/catalog.cattle.io.clusterrepo.js +30 -4
- package/models/chart.js +3 -3
- package/models/ext.cattle.io.token.js +48 -0
- package/models/kontainerdriver.js +2 -2
- package/models/namespace.js +7 -1
- package/models/nodedriver.js +2 -2
- package/models/provisioning.cattle.io.cluster.js +28 -7
- package/models/secret.js +0 -17
- package/models/service.js +44 -1
- package/models/token.js +4 -0
- package/models/workload.js +12 -6
- package/package.json +1 -1
- package/pages/account/index.vue +96 -67
- package/pages/auth/setup.vue +5 -14
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +45 -18
- package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +4 -1
- package/pages/c/_cluster/apps/charts/index.vue +82 -3
- package/pages/c/_cluster/apps/charts/install.vue +317 -42
- package/pages/c/_cluster/explorer/tools/index.vue +1 -1
- package/pages/c/_cluster/manager/cloudCredential/index.vue +1 -1
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +5 -4
- package/pages/c/_cluster/settings/index.vue +3 -1
- package/pages/c/_cluster/uiplugins/index.vue +1 -1
- package/plugins/dashboard-store/__tests__/getters.test.ts +108 -0
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +27 -0
- package/plugins/dashboard-store/actions.js +3 -8
- package/plugins/dashboard-store/getters.js +7 -5
- package/plugins/dashboard-store/mutations.js +4 -1
- package/plugins/dashboard-store/resource-class.js +3 -3
- package/plugins/steve/__tests__/steve-class.test.ts +102 -141
- package/plugins/steve/steve-class.js +12 -3
- package/plugins/steve/steve-pagination-utils.ts +6 -2
- package/rancher-components/RcIcon/types.ts +2 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +72 -20
- package/store/prefs.js +3 -0
- package/types/aws-sdk.d.ts +121 -0
- package/types/resources/node.ts +15 -0
- package/types/shell/index.d.ts +537 -506
- package/types/store/pagination.types.ts +5 -5
- package/utils/__tests__/array.test.ts +1 -29
- package/utils/__tests__/cluster-agent-configuration.test.ts +203 -0
- package/utils/array.ts +0 -11
- package/utils/aws.ts +21 -0
- package/utils/cluster.js +22 -2
- package/utils/selector-typed.ts +1 -1
- package/utils/svg-filter.js +4 -3
- package/components/__tests__/ProjectRow.test.ts +0 -206
- package/components/form/ResourceQuota/ProjectRow.vue +0 -277
|
@@ -4,6 +4,55 @@ import FleetClusterTargets from '@shell/components/fleet/FleetClusterTargets/ind
|
|
|
4
4
|
import { _CREATE, _EDIT } from '@shell/config/query-params';
|
|
5
5
|
import { Selector } from '@shell/types/fleet';
|
|
6
6
|
|
|
7
|
+
function requiredSetup() {
|
|
8
|
+
return {
|
|
9
|
+
global: {
|
|
10
|
+
mocks: {
|
|
11
|
+
$store: {
|
|
12
|
+
getters: {
|
|
13
|
+
'cluster/all': () => [],
|
|
14
|
+
'management/all': () => [],
|
|
15
|
+
'management/byId': () => () => ({}),
|
|
16
|
+
'i18n/t': () => '',
|
|
17
|
+
'i18n/withFallback': () => '',
|
|
18
|
+
currentStore: () => 'current_store',
|
|
19
|
+
'current_store/all': () => [],
|
|
20
|
+
'current_store/inStore': () => 'current_store',
|
|
21
|
+
'prefs/theme': () => 'light',
|
|
22
|
+
'prefs/get': () => false,
|
|
23
|
+
'features/get': () => false
|
|
24
|
+
},
|
|
25
|
+
dispatch: () => {}
|
|
26
|
+
},
|
|
27
|
+
$router: {
|
|
28
|
+
resolve: () => ({ href: '' }),
|
|
29
|
+
push: () => {},
|
|
30
|
+
replace: () => {}
|
|
31
|
+
},
|
|
32
|
+
$route: {
|
|
33
|
+
query: {},
|
|
34
|
+
hash: ''
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
stubs: {
|
|
38
|
+
'router-link': { template: '<a><slot /></a>' },
|
|
39
|
+
'n-link': { template: '<a><slot /></a>' },
|
|
40
|
+
'nuxt-link': { template: '<a><slot /></a>' },
|
|
41
|
+
FleetTargetsList: { template: '<div class="fleet-targets-list-stub"><slot /></div>' }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function mountWithSetup(component: any, options: any = {}) {
|
|
48
|
+
const setup = requiredSetup();
|
|
49
|
+
|
|
50
|
+
return mount(component, {
|
|
51
|
+
...options,
|
|
52
|
+
...setup
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
7
56
|
describe('component: FleetClusterTargets', () => {
|
|
8
57
|
describe('mode: edit', () => {
|
|
9
58
|
const mode = _EDIT;
|
|
@@ -14,7 +63,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
14
63
|
clusterName: 'fleet-5-france',
|
|
15
64
|
clusterSelector: { matchLabels: { foo: 'true' } }
|
|
16
65
|
};
|
|
17
|
-
const wrapper =
|
|
66
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
18
67
|
props: {
|
|
19
68
|
targets: [target1],
|
|
20
69
|
namespace: 'fleet-default',
|
|
@@ -42,7 +91,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
42
91
|
}]
|
|
43
92
|
}
|
|
44
93
|
};
|
|
45
|
-
const wrapper =
|
|
94
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
46
95
|
props: {
|
|
47
96
|
targets: [target1],
|
|
48
97
|
namespace: 'fleet-default',
|
|
@@ -64,7 +113,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
64
113
|
|
|
65
114
|
const target2 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
66
115
|
|
|
67
|
-
const wrapper =
|
|
116
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
68
117
|
props: {
|
|
69
118
|
targets: [target1, target2],
|
|
70
119
|
namespace: 'fleet-default',
|
|
@@ -89,7 +138,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
89
138
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
90
139
|
const target2 = { clusterSelector: { matchLabels: { hci: 'true' } } };
|
|
91
140
|
|
|
92
|
-
const wrapper =
|
|
141
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
93
142
|
props: {
|
|
94
143
|
targets: [target1, target2],
|
|
95
144
|
namespace: 'fleet-default',
|
|
@@ -117,7 +166,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
117
166
|
it('should set targetMode to "advanced" and return early if clusterGroupSelector is present', () => {
|
|
118
167
|
const target1 = { clusterGroupSelector: {} };
|
|
119
168
|
|
|
120
|
-
const wrapper =
|
|
169
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
121
170
|
props: {
|
|
122
171
|
targets: [target1],
|
|
123
172
|
namespace: 'fleet-default',
|
|
@@ -158,7 +207,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
158
207
|
name: 'tt1',
|
|
159
208
|
};
|
|
160
209
|
|
|
161
|
-
const wrapper =
|
|
210
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
162
211
|
props: {
|
|
163
212
|
targets: [target1],
|
|
164
213
|
namespace: 'fleet-default',
|
|
@@ -177,7 +226,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
177
226
|
});
|
|
178
227
|
|
|
179
228
|
it('should return early and not modify state if targets is empty', () => {
|
|
180
|
-
const wrapper =
|
|
229
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
181
230
|
props: {
|
|
182
231
|
targets: [],
|
|
183
232
|
namespace: 'fleet-default',
|
|
@@ -196,7 +245,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
196
245
|
|
|
197
246
|
it('should return targetMode local if namespace is fleet-local', () => {
|
|
198
247
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
199
|
-
const wrapper =
|
|
248
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
200
249
|
props: {
|
|
201
250
|
targets: [target1],
|
|
202
251
|
namespace: 'fleet-local',
|
|
@@ -212,7 +261,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
212
261
|
it('should handle targets with multiple clusterName', () => {
|
|
213
262
|
const target1 = { clusterName: 'prod-cluster' };
|
|
214
263
|
const target2 = { clusterName: 'test-cluster' };
|
|
215
|
-
const wrapper =
|
|
264
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
216
265
|
props: {
|
|
217
266
|
targets: [target1, target2],
|
|
218
267
|
namespace: 'fleet-default',
|
|
@@ -244,7 +293,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
244
293
|
}
|
|
245
294
|
};
|
|
246
295
|
|
|
247
|
-
const wrapper =
|
|
296
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
248
297
|
props: {
|
|
249
298
|
targets: [target1],
|
|
250
299
|
namespace: 'fleet-default',
|
|
@@ -272,7 +321,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
272
321
|
it('should correctly process targets when targetMode is "all" and no clusterName or clusterSelector is present', () => {
|
|
273
322
|
const target1 = { name: 'simple-target' };
|
|
274
323
|
|
|
275
|
-
const wrapper =
|
|
324
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
276
325
|
props: {
|
|
277
326
|
targets: [target1],
|
|
278
327
|
namespace: 'fleet-default',
|
|
@@ -301,7 +350,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
301
350
|
name: 'simple-target'
|
|
302
351
|
};
|
|
303
352
|
|
|
304
|
-
const wrapper =
|
|
353
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
305
354
|
props: {
|
|
306
355
|
targets: [target1],
|
|
307
356
|
namespace: 'fleet-default',
|
|
@@ -325,7 +374,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
325
374
|
clusterName: 'fleet-5-france',
|
|
326
375
|
clusterSelector: { matchLabels: { foo: 'true' } }
|
|
327
376
|
};
|
|
328
|
-
const wrapper =
|
|
377
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
329
378
|
props: {
|
|
330
379
|
targets: [target1],
|
|
331
380
|
namespace: 'fleet-default',
|
|
@@ -350,7 +399,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
350
399
|
}]
|
|
351
400
|
}
|
|
352
401
|
};
|
|
353
|
-
const wrapper =
|
|
402
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
354
403
|
props: {
|
|
355
404
|
targets: [target1],
|
|
356
405
|
namespace: 'fleet-default',
|
|
@@ -375,7 +424,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
375
424
|
|
|
376
425
|
const target2 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
377
426
|
|
|
378
|
-
const wrapper =
|
|
427
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
379
428
|
props: {
|
|
380
429
|
targets: [target1, target2],
|
|
381
430
|
namespace: 'fleet-default',
|
|
@@ -393,7 +442,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
393
442
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
394
443
|
const target2 = { clusterSelector: { matchLabels: { hci: 'true' } } };
|
|
395
444
|
|
|
396
|
-
const wrapper =
|
|
445
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
397
446
|
props: {
|
|
398
447
|
targets: [target1, target2],
|
|
399
448
|
namespace: 'fleet-default',
|
|
@@ -410,7 +459,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
410
459
|
it('should emit advanced cases untouched', async() => {
|
|
411
460
|
const target1 = { clusterGroupSelector: {} };
|
|
412
461
|
|
|
413
|
-
const wrapper =
|
|
462
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
414
463
|
props: {
|
|
415
464
|
targets: [target1],
|
|
416
465
|
namespace: 'fleet-default',
|
|
@@ -447,7 +496,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
447
496
|
name: 'tt1',
|
|
448
497
|
};
|
|
449
498
|
|
|
450
|
-
const wrapper =
|
|
499
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
451
500
|
props: {
|
|
452
501
|
targets: [target1],
|
|
453
502
|
namespace: 'fleet-default',
|
|
@@ -478,7 +527,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
478
527
|
});
|
|
479
528
|
|
|
480
529
|
it('should emit harvester rule from empty targets source', async() => {
|
|
481
|
-
const wrapper =
|
|
530
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
482
531
|
props: {
|
|
483
532
|
targets: [], // targetMode === 'none'
|
|
484
533
|
namespace: 'fleet-default',
|
|
@@ -495,7 +544,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
495
544
|
it('should emit untouched targets from source when operating in fleet-local workspace', async() => {
|
|
496
545
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
497
546
|
|
|
498
|
-
const wrapper =
|
|
547
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
499
548
|
props: {
|
|
500
549
|
targets: [target1],
|
|
501
550
|
namespace: 'fleet-local',
|
|
@@ -524,7 +573,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
524
573
|
}
|
|
525
574
|
};
|
|
526
575
|
|
|
527
|
-
const wrapper =
|
|
576
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
528
577
|
props: {
|
|
529
578
|
targets: [target1],
|
|
530
579
|
namespace: 'fleet-default',
|
|
@@ -547,7 +596,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
547
596
|
it('should emit targets excluding target names and adding harvester rule', async() => {
|
|
548
597
|
const target1 = { name: 'simple-target' };
|
|
549
598
|
|
|
550
|
-
const wrapper =
|
|
599
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
551
600
|
props: {
|
|
552
601
|
targets: [target1],
|
|
553
602
|
namespace: 'fleet-default',
|
|
@@ -579,7 +628,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
579
628
|
name: 'simple-target'
|
|
580
629
|
};
|
|
581
630
|
|
|
582
|
-
const wrapper =
|
|
631
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
583
632
|
props: {
|
|
584
633
|
targets: [target1],
|
|
585
634
|
namespace: 'fleet-default',
|
|
@@ -610,7 +659,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
610
659
|
clusterName: 'fleet-5-france',
|
|
611
660
|
clusterSelector: { matchLabels: { foo: 'true' } }
|
|
612
661
|
};
|
|
613
|
-
const wrapper =
|
|
662
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
614
663
|
props: {
|
|
615
664
|
targets: [target1],
|
|
616
665
|
namespace: 'fleet-default',
|
|
@@ -639,7 +688,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
639
688
|
}]
|
|
640
689
|
}
|
|
641
690
|
};
|
|
642
|
-
const wrapper =
|
|
691
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
643
692
|
props: {
|
|
644
693
|
targets: [target1],
|
|
645
694
|
namespace: 'fleet-default',
|
|
@@ -661,7 +710,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
661
710
|
|
|
662
711
|
const target2 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
663
712
|
|
|
664
|
-
const wrapper =
|
|
713
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
665
714
|
props: {
|
|
666
715
|
targets: [target1, target2],
|
|
667
716
|
namespace: 'fleet-default',
|
|
@@ -687,7 +736,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
687
736
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
688
737
|
const target2 = { clusterSelector: { matchLabels: { hci: 'true' } } };
|
|
689
738
|
|
|
690
|
-
const wrapper =
|
|
739
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
691
740
|
props: {
|
|
692
741
|
targets: [target1, target2],
|
|
693
742
|
namespace: 'fleet-default',
|
|
@@ -716,7 +765,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
716
765
|
it('should set targetMode to "advanced" and return early if clusterGroupSelector is present', () => {
|
|
717
766
|
const target1 = { clusterGroupSelector: {} };
|
|
718
767
|
|
|
719
|
-
const wrapper =
|
|
768
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
720
769
|
props: {
|
|
721
770
|
targets: [target1],
|
|
722
771
|
namespace: 'fleet-default',
|
|
@@ -758,7 +807,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
758
807
|
name: 'tt1',
|
|
759
808
|
};
|
|
760
809
|
|
|
761
|
-
const wrapper =
|
|
810
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
762
811
|
props: {
|
|
763
812
|
targets: [target1],
|
|
764
813
|
namespace: 'fleet-default',
|
|
@@ -778,7 +827,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
778
827
|
});
|
|
779
828
|
|
|
780
829
|
it('should return early and not modify state if targets is empty', () => {
|
|
781
|
-
const wrapper =
|
|
830
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
782
831
|
props: {
|
|
783
832
|
targets: [],
|
|
784
833
|
namespace: 'fleet-default',
|
|
@@ -798,7 +847,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
798
847
|
|
|
799
848
|
it('should return targetMode local if namespace is fleet-local', () => {
|
|
800
849
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
801
|
-
const wrapper =
|
|
850
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
802
851
|
props: {
|
|
803
852
|
targets: [target1],
|
|
804
853
|
namespace: 'fleet-local',
|
|
@@ -815,7 +864,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
815
864
|
it('should handle targets with multiple clusterName', () => {
|
|
816
865
|
const target1 = { clusterName: 'prod-cluster' };
|
|
817
866
|
const target2 = { clusterName: 'test-cluster' };
|
|
818
|
-
const wrapper =
|
|
867
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
819
868
|
props: {
|
|
820
869
|
targets: [target1, target2],
|
|
821
870
|
namespace: 'fleet-default',
|
|
@@ -848,7 +897,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
848
897
|
}
|
|
849
898
|
};
|
|
850
899
|
|
|
851
|
-
const wrapper =
|
|
900
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
852
901
|
props: {
|
|
853
902
|
targets: [target1],
|
|
854
903
|
namespace: 'fleet-default',
|
|
@@ -877,7 +926,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
877
926
|
it('should correctly process targets when targetMode is "all" and no clusterName or clusterSelector is present', () => {
|
|
878
927
|
const target1 = { name: 'simple-target' };
|
|
879
928
|
|
|
880
|
-
const wrapper =
|
|
929
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
881
930
|
props: {
|
|
882
931
|
targets: [target1],
|
|
883
932
|
namespace: 'fleet-default',
|
|
@@ -906,7 +955,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
906
955
|
name: 'simple-target'
|
|
907
956
|
};
|
|
908
957
|
|
|
909
|
-
const wrapper =
|
|
958
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
910
959
|
props: {
|
|
911
960
|
targets: [target1],
|
|
912
961
|
namespace: 'fleet-default',
|
|
@@ -930,7 +979,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
930
979
|
clusterName: 'fleet-5-france',
|
|
931
980
|
clusterSelector: { matchLabels: { foo: 'true' } }
|
|
932
981
|
};
|
|
933
|
-
const wrapper =
|
|
982
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
934
983
|
props: {
|
|
935
984
|
targets: [target1],
|
|
936
985
|
namespace: 'fleet-default',
|
|
@@ -957,7 +1006,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
957
1006
|
}]
|
|
958
1007
|
}
|
|
959
1008
|
};
|
|
960
|
-
const wrapper =
|
|
1009
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
961
1010
|
props: {
|
|
962
1011
|
targets: [target1],
|
|
963
1012
|
namespace: 'fleet-default',
|
|
@@ -982,7 +1031,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
982
1031
|
|
|
983
1032
|
const target2 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
984
1033
|
|
|
985
|
-
const wrapper =
|
|
1034
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
986
1035
|
props: {
|
|
987
1036
|
targets: [target1, target2],
|
|
988
1037
|
namespace: 'fleet-default',
|
|
@@ -1002,7 +1051,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1002
1051
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
1003
1052
|
const target2 = { clusterSelector: { matchLabels: { hci: 'true' } } };
|
|
1004
1053
|
|
|
1005
|
-
const wrapper =
|
|
1054
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1006
1055
|
props: {
|
|
1007
1056
|
targets: [target1, target2],
|
|
1008
1057
|
namespace: 'fleet-default',
|
|
@@ -1021,7 +1070,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1021
1070
|
it('should emit advanced cases untouched', async() => {
|
|
1022
1071
|
const target1 = { clusterGroupSelector: {} };
|
|
1023
1072
|
|
|
1024
|
-
const wrapper =
|
|
1073
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1025
1074
|
props: {
|
|
1026
1075
|
targets: [target1],
|
|
1027
1076
|
namespace: 'fleet-default',
|
|
@@ -1060,7 +1109,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1060
1109
|
name: 'tt1',
|
|
1061
1110
|
};
|
|
1062
1111
|
|
|
1063
|
-
const wrapper =
|
|
1112
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1064
1113
|
props: {
|
|
1065
1114
|
targets: [target1],
|
|
1066
1115
|
namespace: 'fleet-default',
|
|
@@ -1093,7 +1142,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1093
1142
|
});
|
|
1094
1143
|
|
|
1095
1144
|
it('should emit harvester rule from empty targets source', async() => {
|
|
1096
|
-
const wrapper =
|
|
1145
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1097
1146
|
props: {
|
|
1098
1147
|
targets: [], // targetMode === 'none'
|
|
1099
1148
|
namespace: 'fleet-default',
|
|
@@ -1112,7 +1161,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1112
1161
|
it('should emit untouched targets from source when operating in fleet-local workspace', async() => {
|
|
1113
1162
|
const target1 = { clusterSelector: { matchLabels: { foo: 'true' } } };
|
|
1114
1163
|
|
|
1115
|
-
const wrapper =
|
|
1164
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1116
1165
|
props: {
|
|
1117
1166
|
targets: [target1],
|
|
1118
1167
|
namespace: 'fleet-local',
|
|
@@ -1143,7 +1192,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1143
1192
|
}
|
|
1144
1193
|
};
|
|
1145
1194
|
|
|
1146
|
-
const wrapper =
|
|
1195
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1147
1196
|
props: {
|
|
1148
1197
|
targets: [target1],
|
|
1149
1198
|
namespace: 'fleet-default',
|
|
@@ -1168,7 +1217,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1168
1217
|
it('should emit targets excluding target names and adding harvester rule', async() => {
|
|
1169
1218
|
const target1 = { name: 'simple-target' };
|
|
1170
1219
|
|
|
1171
|
-
const wrapper =
|
|
1220
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1172
1221
|
props: {
|
|
1173
1222
|
targets: [target1],
|
|
1174
1223
|
namespace: 'fleet-default',
|
|
@@ -1200,7 +1249,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1200
1249
|
name: 'simple-target'
|
|
1201
1250
|
};
|
|
1202
1251
|
|
|
1203
|
-
const wrapper =
|
|
1252
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1204
1253
|
props: {
|
|
1205
1254
|
targets: [target1],
|
|
1206
1255
|
namespace: 'fleet-default',
|
|
@@ -1225,7 +1274,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1225
1274
|
describe('clusterGroup Functionality Tests', () => {
|
|
1226
1275
|
describe('clusterGroup Data Management', () => {
|
|
1227
1276
|
it('should initialize with empty selectedClusterGroups', () => {
|
|
1228
|
-
const wrapper =
|
|
1277
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1229
1278
|
props: {
|
|
1230
1279
|
targets: [],
|
|
1231
1280
|
namespace: 'fleet-default',
|
|
@@ -1248,7 +1297,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1248
1297
|
}
|
|
1249
1298
|
];
|
|
1250
1299
|
|
|
1251
|
-
const wrapper =
|
|
1300
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1252
1301
|
props: {
|
|
1253
1302
|
targets: [],
|
|
1254
1303
|
namespace: 'fleet-default',
|
|
@@ -1278,7 +1327,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1278
1327
|
}
|
|
1279
1328
|
];
|
|
1280
1329
|
|
|
1281
|
-
const wrapper =
|
|
1330
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1282
1331
|
props: {
|
|
1283
1332
|
targets: [],
|
|
1284
1333
|
namespace: 'fleet-default',
|
|
@@ -1300,7 +1349,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1300
1349
|
|
|
1301
1350
|
describe('clusterGroup Selection Methods', () => {
|
|
1302
1351
|
it('should update selectedClusterGroups when selectClusterGroups is called', async() => {
|
|
1303
|
-
const wrapper =
|
|
1352
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1304
1353
|
props: {
|
|
1305
1354
|
targets: [],
|
|
1306
1355
|
namespace: 'fleet-default',
|
|
@@ -1318,7 +1367,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1318
1367
|
});
|
|
1319
1368
|
|
|
1320
1369
|
it('should emit update:value when selectClusterGroups is called', async() => {
|
|
1321
|
-
const wrapper =
|
|
1370
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1322
1371
|
props: {
|
|
1323
1372
|
targets: [],
|
|
1324
1373
|
namespace: 'fleet-default',
|
|
@@ -1333,7 +1382,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1333
1382
|
});
|
|
1334
1383
|
|
|
1335
1384
|
it('should handle empty array in selectClusterGroups', async() => {
|
|
1336
|
-
const wrapper =
|
|
1385
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1337
1386
|
props: {
|
|
1338
1387
|
targets: [],
|
|
1339
1388
|
namespace: 'fleet-default',
|
|
@@ -1353,7 +1402,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1353
1402
|
});
|
|
1354
1403
|
|
|
1355
1404
|
it('should replace existing selectedClusterGroups on new selection', async() => {
|
|
1356
|
-
const wrapper =
|
|
1405
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1357
1406
|
props: {
|
|
1358
1407
|
targets: [],
|
|
1359
1408
|
namespace: 'fleet-default',
|
|
@@ -1381,7 +1430,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1381
1430
|
{ clusterName: 'specific-cluster' }
|
|
1382
1431
|
];
|
|
1383
1432
|
|
|
1384
|
-
const wrapper =
|
|
1433
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1385
1434
|
props: {
|
|
1386
1435
|
targets,
|
|
1387
1436
|
namespace: 'fleet-default',
|
|
@@ -1394,7 +1443,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1394
1443
|
});
|
|
1395
1444
|
|
|
1396
1445
|
it('should include clusterGroups in normalizeTargets output', () => {
|
|
1397
|
-
const wrapper =
|
|
1446
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1398
1447
|
props: {
|
|
1399
1448
|
targets: [],
|
|
1400
1449
|
namespace: 'fleet-default',
|
|
@@ -1417,7 +1466,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1417
1466
|
});
|
|
1418
1467
|
|
|
1419
1468
|
it('should handle only clusterGroups in normalizeTargets', () => {
|
|
1420
|
-
const wrapper =
|
|
1469
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1421
1470
|
props: {
|
|
1422
1471
|
targets: [],
|
|
1423
1472
|
namespace: 'fleet-default',
|
|
@@ -1434,7 +1483,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1434
1483
|
});
|
|
1435
1484
|
|
|
1436
1485
|
it('should return undefined when normalizeTargets has no inputs', () => {
|
|
1437
|
-
const wrapper =
|
|
1486
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1438
1487
|
props: {
|
|
1439
1488
|
targets: [],
|
|
1440
1489
|
namespace: 'fleet-default',
|
|
@@ -1448,7 +1497,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1448
1497
|
});
|
|
1449
1498
|
|
|
1450
1499
|
it('should include clusterGroups in toTargets when targetMode is clusters', () => {
|
|
1451
|
-
const wrapper =
|
|
1500
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1452
1501
|
props: {
|
|
1453
1502
|
targets: [],
|
|
1454
1503
|
namespace: 'fleet-default',
|
|
@@ -1479,7 +1528,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1479
1528
|
{ clusterGroup: 'test-group' }
|
|
1480
1529
|
];
|
|
1481
1530
|
|
|
1482
|
-
const wrapper =
|
|
1531
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1483
1532
|
props: {
|
|
1484
1533
|
targets,
|
|
1485
1534
|
namespace: 'fleet-default',
|
|
@@ -1500,7 +1549,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1500
1549
|
{ clusterGroup: 'development-group' }
|
|
1501
1550
|
];
|
|
1502
1551
|
|
|
1503
|
-
const wrapper =
|
|
1552
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1504
1553
|
props: {
|
|
1505
1554
|
targets,
|
|
1506
1555
|
namespace: 'fleet-default',
|
|
@@ -1515,7 +1564,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1515
1564
|
});
|
|
1516
1565
|
|
|
1517
1566
|
it('should reset selectedClusterGroups when reset method is called', () => {
|
|
1518
|
-
const wrapper =
|
|
1567
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1519
1568
|
props: {
|
|
1520
1569
|
targets: [],
|
|
1521
1570
|
namespace: 'fleet-default',
|
|
@@ -1543,7 +1592,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1543
1592
|
|
|
1544
1593
|
describe('clusterGroup Event Handling and Updates', () => {
|
|
1545
1594
|
it('should emit correct targets when both clusters and clusterGroups are selected', async() => {
|
|
1546
|
-
const wrapper =
|
|
1595
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1547
1596
|
props: {
|
|
1548
1597
|
targets: [],
|
|
1549
1598
|
namespace: 'fleet-default',
|
|
@@ -1570,7 +1619,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1570
1619
|
});
|
|
1571
1620
|
|
|
1572
1621
|
it('should handle clusterGroup selection in CREATE mode with proper event emission', async() => {
|
|
1573
|
-
const wrapper =
|
|
1622
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1574
1623
|
props: {
|
|
1575
1624
|
targets: [],
|
|
1576
1625
|
namespace: 'fleet-default',
|
|
@@ -1597,7 +1646,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1597
1646
|
it('should update component state correctly when clusterGroups prop changes', async() => {
|
|
1598
1647
|
const initialTargets = [{ clusterGroup: 'initial-group' }];
|
|
1599
1648
|
|
|
1600
|
-
const wrapper =
|
|
1649
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1601
1650
|
props: {
|
|
1602
1651
|
targets: initialTargets,
|
|
1603
1652
|
namespace: 'fleet-default',
|
|
@@ -1631,7 +1680,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1631
1680
|
{ clusterName: 'cluster-1' }
|
|
1632
1681
|
];
|
|
1633
1682
|
|
|
1634
|
-
const wrapper =
|
|
1683
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1635
1684
|
props: {
|
|
1636
1685
|
targets: targets as any,
|
|
1637
1686
|
namespace: 'fleet-default',
|
|
@@ -1648,7 +1697,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1648
1697
|
{ clusterGroup: 'valid-group' }
|
|
1649
1698
|
];
|
|
1650
1699
|
|
|
1651
|
-
const wrapper =
|
|
1700
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1652
1701
|
props: {
|
|
1653
1702
|
targets: targets as any,
|
|
1654
1703
|
namespace: 'fleet-default',
|
|
@@ -1660,7 +1709,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1660
1709
|
});
|
|
1661
1710
|
|
|
1662
1711
|
it('should handle empty allClusterGroups data', () => {
|
|
1663
|
-
const wrapper =
|
|
1712
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1664
1713
|
props: {
|
|
1665
1714
|
targets: [],
|
|
1666
1715
|
namespace: 'fleet-default',
|
|
@@ -1686,7 +1735,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1686
1735
|
}
|
|
1687
1736
|
];
|
|
1688
1737
|
|
|
1689
|
-
const wrapper =
|
|
1738
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1690
1739
|
props: {
|
|
1691
1740
|
targets: [],
|
|
1692
1741
|
namespace: 'fleet-default',
|
|
@@ -1707,7 +1756,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1707
1756
|
|
|
1708
1757
|
describe('clusterGroup Component Lifecycle', () => {
|
|
1709
1758
|
it('should preserve clusterGroup selections during component updates', async() => {
|
|
1710
|
-
const wrapper =
|
|
1759
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1711
1760
|
props: {
|
|
1712
1761
|
targets: [],
|
|
1713
1762
|
namespace: 'fleet-default',
|
|
@@ -1728,7 +1777,7 @@ describe('component: FleetClusterTargets', () => {
|
|
|
1728
1777
|
});
|
|
1729
1778
|
|
|
1730
1779
|
it('should clear clusterGroup selections on namespace change in CREATE mode', async() => {
|
|
1731
|
-
const wrapper =
|
|
1780
|
+
const wrapper = mountWithSetup(FleetClusterTargets, {
|
|
1732
1781
|
props: {
|
|
1733
1782
|
targets: [],
|
|
1734
1783
|
namespace: 'fleet-default',
|
|
@@ -9,7 +9,7 @@ import { ToggleSwitch } from '@components/Form/ToggleSwitch';
|
|
|
9
9
|
import { TextAreaAutoGrow } from '@components/Form/TextArea';
|
|
10
10
|
import { Banner } from '@components/Banner';
|
|
11
11
|
|
|
12
|
-
export default
|
|
12
|
+
export default {
|
|
13
13
|
name: 'BannerSettings',
|
|
14
14
|
|
|
15
15
|
props: {
|
|
@@ -112,7 +112,7 @@ export default ({
|
|
|
112
112
|
return this.bannerType === 'bannerConsent';
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
}
|
|
115
|
+
};
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
118
|
<template>
|