From c393cba656dacbdcfbc0acbc8d6c0e18704c8973 Mon Sep 17 00:00:00 2001 From: Nancy <42977925+mantis-toboggan-md@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:34:18 -0700 Subject: [PATCH] fix driver unit tests (#10714) --- shell/edit/__tests__/kontainerDriver.test.ts | 7 +++++-- shell/edit/__tests__/nodeDriver.test.ts | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/shell/edit/__tests__/kontainerDriver.test.ts b/shell/edit/__tests__/kontainerDriver.test.ts index c98125849d..2a3c65580d 100644 --- a/shell/edit/__tests__/kontainerDriver.test.ts +++ b/shell/edit/__tests__/kontainerDriver.test.ts @@ -2,6 +2,7 @@ import { mount } from '@vue/test-utils'; import KontainerDriverEdit from '@shell/edit/kontainerDriver.vue'; import { _CREATE } from '@shell/config/query-params'; +import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive'; describe('view: kontainerdriver should', () => { const url = 'http://test.com'; @@ -15,12 +16,14 @@ describe('view: kontainerdriver should', () => { 'current_store/all': jest.fn(), 'i18n/t': (val: string) => val, 'i18n/exists': jest.fn(), - } + }, + dispatch: jest.fn() }, $route: { query: { AS: '' } }, $router: { applyQuery: jest.fn() }, }, - propsData: { + directives: { cleanHtmlDirective }, + propsData: { value: { spec: { active: true, diff --git a/shell/edit/__tests__/nodeDriver.test.ts b/shell/edit/__tests__/nodeDriver.test.ts index e1772ad46d..e869066722 100644 --- a/shell/edit/__tests__/nodeDriver.test.ts +++ b/shell/edit/__tests__/nodeDriver.test.ts @@ -2,6 +2,7 @@ import { mount } from '@vue/test-utils'; import NodeDriverEdit from '@shell/edit/nodeDriver.vue'; import { _CREATE } from '@shell/config/query-params'; +import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive'; describe('view: nodedriver should', () => { const url = 'http://test.com'; @@ -15,11 +16,14 @@ describe('view: nodedriver should', () => { 'current_store/all': jest.fn(), 'i18n/t': (val: string) => val, 'i18n/exists': jest.fn(), - } + }, + dispatch: jest.fn() }, $route: { query: { AS: '' } }, $router: { applyQuery: jest.fn() }, }, + directives: { cleanHtmlDirective }, + propsData: { value: { spec: {