Skip to content

Commit 9661060

Browse files
UI: fix unit tests (#9798)
1 parent 017cf2c commit 9661060

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

ui/tests/unit/components/view/ActionButton.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ import mockData from '../../../mockData/ActionButton.mock.json'
2323
import ActionButton from '@/components/view/ActionButton'
2424

2525
jest.mock('axios', () => mockAxios)
26+
jest.mock('@/vue-app', () => ({
27+
vueProps: {
28+
$localStorage: {
29+
set: jest.fn((key, value) => {}),
30+
get: jest.fn((key) => {
31+
return null
32+
})
33+
}
34+
}
35+
}))
2636

2737
let router, store, i18n
2838
const state = {

ui/tests/unit/views/compute/MigrateWizard.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ import mockData from '../../../mockData/MigrateWizard.mock'
2323
import MigrateWizard from '@/views/compute/MigrateWizard'
2424

2525
jest.mock('axios', () => mockAxios)
26+
jest.mock('@/vue-app', () => ({
27+
vueProps: {
28+
$localStorage: {
29+
set: jest.fn((key, value) => {}),
30+
get: jest.fn((key) => {
31+
return null
32+
})
33+
}
34+
}
35+
}))
2636

2737
let i18n
2838
let store

0 commit comments

Comments
 (0)