This is an automated email from the ASF dual-hosted git repository.
vishesh pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new 96610603caf UI: fix unit tests (#9798)
96610603caf is described below
commit 96610603cafb251f29d21f7616ec3447b07ca203
Author: Wei Zhou <[email protected]>
AuthorDate: Wed Oct 16 07:14:45 2024 +0200
UI: fix unit tests (#9798)
---
ui/tests/unit/components/view/ActionButton.spec.js | 10 ++++++++++
ui/tests/unit/views/compute/MigrateWizard.spec.js | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/ui/tests/unit/components/view/ActionButton.spec.js
b/ui/tests/unit/components/view/ActionButton.spec.js
index 7e41f0bd2f8..1565b471548 100644
--- a/ui/tests/unit/components/view/ActionButton.spec.js
+++ b/ui/tests/unit/components/view/ActionButton.spec.js
@@ -23,6 +23,16 @@ import mockData from
'../../../mockData/ActionButton.mock.json'
import ActionButton from '@/components/view/ActionButton'
jest.mock('axios', () => mockAxios)
+jest.mock('@/vue-app', () => ({
+ vueProps: {
+ $localStorage: {
+ set: jest.fn((key, value) => {}),
+ get: jest.fn((key) => {
+ return null
+ })
+ }
+ }
+}))
let router, store, i18n
const state = {
diff --git a/ui/tests/unit/views/compute/MigrateWizard.spec.js
b/ui/tests/unit/views/compute/MigrateWizard.spec.js
index f352b2de2c4..d3ee49426dc 100644
--- a/ui/tests/unit/views/compute/MigrateWizard.spec.js
+++ b/ui/tests/unit/views/compute/MigrateWizard.spec.js
@@ -23,6 +23,16 @@ import mockData from '../../../mockData/MigrateWizard.mock'
import MigrateWizard from '@/views/compute/MigrateWizard'
jest.mock('axios', () => mockAxios)
+jest.mock('@/vue-app', () => ({
+ vueProps: {
+ $localStorage: {
+ set: jest.fn((key, value) => {}),
+ get: jest.fn((key) => {
+ return null
+ })
+ }
+ }
+}))
let i18n
let store