mirror of https://github.com/rancher/dashboard.git
fix driver unit tests (#10714)
This commit is contained in:
parent
ba94731a93
commit
c393cba656
|
|
@ -2,6 +2,7 @@
|
||||||
import { mount } from '@vue/test-utils';
|
import { mount } from '@vue/test-utils';
|
||||||
import KontainerDriverEdit from '@shell/edit/kontainerDriver.vue';
|
import KontainerDriverEdit from '@shell/edit/kontainerDriver.vue';
|
||||||
import { _CREATE } from '@shell/config/query-params';
|
import { _CREATE } from '@shell/config/query-params';
|
||||||
|
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
|
||||||
|
|
||||||
describe('view: kontainerdriver should', () => {
|
describe('view: kontainerdriver should', () => {
|
||||||
const url = 'http://test.com';
|
const url = 'http://test.com';
|
||||||
|
|
@ -15,12 +16,14 @@ describe('view: kontainerdriver should', () => {
|
||||||
'current_store/all': jest.fn(),
|
'current_store/all': jest.fn(),
|
||||||
'i18n/t': (val: string) => val,
|
'i18n/t': (val: string) => val,
|
||||||
'i18n/exists': jest.fn(),
|
'i18n/exists': jest.fn(),
|
||||||
}
|
},
|
||||||
|
dispatch: jest.fn()
|
||||||
},
|
},
|
||||||
$route: { query: { AS: '' } },
|
$route: { query: { AS: '' } },
|
||||||
$router: { applyQuery: jest.fn() },
|
$router: { applyQuery: jest.fn() },
|
||||||
},
|
},
|
||||||
propsData: {
|
directives: { cleanHtmlDirective },
|
||||||
|
propsData: {
|
||||||
value: {
|
value: {
|
||||||
spec: {
|
spec: {
|
||||||
active: true,
|
active: true,
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
import { mount } from '@vue/test-utils';
|
import { mount } from '@vue/test-utils';
|
||||||
import NodeDriverEdit from '@shell/edit/nodeDriver.vue';
|
import NodeDriverEdit from '@shell/edit/nodeDriver.vue';
|
||||||
import { _CREATE } from '@shell/config/query-params';
|
import { _CREATE } from '@shell/config/query-params';
|
||||||
|
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
|
||||||
|
|
||||||
describe('view: nodedriver should', () => {
|
describe('view: nodedriver should', () => {
|
||||||
const url = 'http://test.com';
|
const url = 'http://test.com';
|
||||||
|
|
@ -15,11 +16,14 @@ describe('view: nodedriver should', () => {
|
||||||
'current_store/all': jest.fn(),
|
'current_store/all': jest.fn(),
|
||||||
'i18n/t': (val: string) => val,
|
'i18n/t': (val: string) => val,
|
||||||
'i18n/exists': jest.fn(),
|
'i18n/exists': jest.fn(),
|
||||||
}
|
},
|
||||||
|
dispatch: jest.fn()
|
||||||
},
|
},
|
||||||
$route: { query: { AS: '' } },
|
$route: { query: { AS: '' } },
|
||||||
$router: { applyQuery: jest.fn() },
|
$router: { applyQuery: jest.fn() },
|
||||||
},
|
},
|
||||||
|
directives: { cleanHtmlDirective },
|
||||||
|
|
||||||
propsData: {
|
propsData: {
|
||||||
value: {
|
value: {
|
||||||
spec: {
|
spec: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue