diff options
-rw-r--r-- | src/components/AppHeader/AppHeader.vue | 16 | ||||
-rw-r--r-- | src/locales/en-US.json | 12 | ||||
-rw-r--r-- | src/store/index.js | 2 | ||||
-rw-r--r-- | src/store/modules/Control/ControlStore.js | 44 | ||||
-rw-r--r-- | src/store/modules/GlobalStore.js | 16 | ||||
-rw-r--r-- | src/store/plugins/WebSocketPlugin.js | 2 | ||||
-rw-r--r-- | src/views/Configuration/Firmware/Firmware.vue | 14 | ||||
-rw-r--r-- | src/views/Configuration/Firmware/FirmwareAlertServerPower.vue | 4 | ||||
-rw-r--r-- | src/views/Configuration/Firmware/FirmwareFormUpdate.vue | 4 | ||||
-rw-r--r-- | src/views/Control/FactoryReset/FactoryResetModal.vue | 12 | ||||
-rw-r--r-- | src/views/Control/Kvm/KvmConsole.vue | 8 | ||||
-rw-r--r-- | src/views/Control/SerialOverLan/SerialOverLanConsole.vue | 14 | ||||
-rw-r--r-- | src/views/Control/ServerPowerOperations/BootSettings.vue | 12 | ||||
-rw-r--r-- | src/views/Control/ServerPowerOperations/ServerPowerOperations.vue | 30 | ||||
-rw-r--r-- | tests/unit/AppHeader.spec.js | 6 |
15 files changed, 98 insertions, 98 deletions
diff --git a/src/components/AppHeader/AppHeader.vue b/src/components/AppHeader/AppHeader.vue index 0e8d3db4..f7989d2e 100644 --- a/src/components/AppHeader/AppHeader.vue +++ b/src/components/AppHeader/AppHeader.vue @@ -59,7 +59,7 @@ to="/control/server-power-operations" data-test-id="appHeader-container-power" > - <status-icon :status="hostStatusIcon" /> + <status-icon :status="serverStatusIcon" /> {{ $t('appHeader.power') }} </b-nav-item> <!-- Using LI elements instead of b-nav-item to support semantic button elements --> @@ -138,14 +138,14 @@ export default { isAuthorized() { return this.$store.getters['global/isAuthorized']; }, - hostStatus() { - return this.$store.getters['global/hostStatus']; + serverStatus() { + return this.$store.getters['global/serverStatus']; }, healthStatus() { return this.$store.getters['eventLog/healthStatus']; }, - hostStatusIcon() { - switch (this.hostStatus) { + serverStatusIcon() { + switch (this.serverStatus) { case 'on': return 'success'; case 'error': @@ -186,7 +186,7 @@ export default { // Reset auth state to check if user is authenticated based // on available browser cookies this.$store.dispatch('authentication/resetStoreState'); - this.getHostInfo(); + this.getServerInfo(); this.getEvents(); }, mounted() { @@ -196,8 +196,8 @@ export default { ); }, methods: { - getHostInfo() { - this.$store.dispatch('global/getHostStatus'); + getServerInfo() { + this.$store.dispatch('global/getServerStatus'); }, getEvents() { this.$store.dispatch('eventLog/getEventLogData'); diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 2bb34a23..437ce038 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -703,16 +703,16 @@ }, "pageServerPowerOperations": { "currentStatus": "Current status", - "hostOsBootSettings": "Host OS boot settings", - "hostStatus": "Host status", - "immediateReboot": "Immediate – Server reboots without OS shutting down; may cause data corruption", - "immediateShutdown": "Immediate - Server shuts down without OS shutting down; may cause data corruption", + "serverBootSettings": "Boot settings", + "serverStatus": "Server status", + "immediateReboot": "Immediate – Server reboots without operating system shutting down; may cause data corruption", + "immediateShutdown": "Immediate - Server shuts down without operating system shutting down; may cause data corruption", "lastPowerOperation": "Last power operation", "oneTimeBootWarning": "Pending one time boot. Next boot will be performed with the specified one time boot settings. Subsequent boots will be performed with the default settings.", "operationInProgress": "There are no options to display while a power operation is in progress. When complete, power operations will be displayed here.", "operations": "Operations", - "orderlyReboot": "Orderly – OS shuts down, then server reboots", - "orderlyShutdown": "Orderly - OS shuts down, then server shuts down", + "orderlyReboot": "Orderly – operating system shuts down, then server reboots", + "orderlyShutdown": "Orderly - operating system shuts down, then server shuts down", "powerOn": "Power on", "reboot": "Reboot", "rebootServer": "Reboot server", diff --git a/src/store/index.js b/src/store/index.js index 93386b1a..82efab91 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -44,7 +44,7 @@ export default new Vuex.Store({ ldap: LdapStore, localUsers: LocalUserManagementStore, firmware: FirmwareStore, - hostBootSettings: BootSettingsStore, + serverBootSettings: BootSettingsStore, controls: ControlStore, powerControl: PowerControlStore, powerPolicy: PowerPolicyStore, diff --git a/src/store/modules/Control/ControlStore.js b/src/store/modules/Control/ControlStore.js index 5f532d0e..9b8bf73d 100644 --- a/src/store/modules/Control/ControlStore.js +++ b/src/store/modules/Control/ControlStore.js @@ -2,23 +2,23 @@ import api from '@/store/api'; import i18n from '@/i18n'; /** - * Watch for hostStatus changes in GlobalStore module + * Watch for serverStatus changes in GlobalStore module * to set isOperationInProgress state * Stop watching status changes and resolve Promise when - * hostStatus value matches passed argument or after 5 minutes - * @param {string} hostStatus + * serverStatus value matches passed argument or after 5 minutes + * @param {string} serverStatus * @returns {Promise} */ -const checkForHostStatus = function (hostStatus) { +const checkForServerStatus = function (serverStatus) { return new Promise((resolve) => { const timer = setTimeout(() => { resolve(); unwatch(); }, 300000 /*5mins*/); const unwatch = this.watch( - (state) => state.global.hostStatus, + (state) => state.global.serverStatus, (value) => { - if (value === hostStatus) { + if (value === serverStatus) { resolve(); unwatch(); clearTimeout(timer); @@ -82,42 +82,42 @@ const ControlStore = { throw new Error(i18n.t('pageRebootBmc.toast.errorRebootStart')); }); }, - async hostPowerOn({ dispatch, commit }) { + async serverPowerOn({ dispatch, commit }) { const data = { ResetType: 'On' }; - dispatch('hostPowerChange', data); - await checkForHostStatus.bind(this, 'on')(); + dispatch('serverPowerChange', data); + await checkForServerStatus.bind(this, 'on')(); commit('setOperationInProgress', false); dispatch('getLastPowerOperationTime'); }, - async hostSoftReboot({ dispatch, commit }) { + async serverSoftReboot({ dispatch, commit }) { const data = { ResetType: 'GracefulRestart' }; - dispatch('hostPowerChange', data); - await checkForHostStatus.bind(this, 'on')(); + dispatch('serverPowerChange', data); + await checkForServerStatus.bind(this, 'on')(); commit('setOperationInProgress', false); dispatch('getLastPowerOperationTime'); }, - async hostHardReboot({ dispatch, commit }) { + async serverHardReboot({ dispatch, commit }) { const data = { ResetType: 'ForceRestart' }; - dispatch('hostPowerChange', data); - await checkForHostStatus.bind(this, 'on')(); + dispatch('serverPowerChange', data); + await checkForServerStatus.bind(this, 'on')(); commit('setOperationInProgress', false); dispatch('getLastPowerOperationTime'); }, - async hostSoftPowerOff({ dispatch, commit }) { + async serverSoftPowerOff({ dispatch, commit }) { const data = { ResetType: 'GracefulShutdown' }; - dispatch('hostPowerChange', data); - await checkForHostStatus.bind(this, 'off')(); + dispatch('serverPowerChange', data); + await checkForServerStatus.bind(this, 'off')(); commit('setOperationInProgress', false); dispatch('getLastPowerOperationTime'); }, - async hostHardPowerOff({ dispatch, commit }) { + async serverHardPowerOff({ dispatch, commit }) { const data = { ResetType: 'ForceOff' }; - dispatch('hostPowerChange', data); - await checkForHostStatus.bind(this, 'off')(); + dispatch('serverPowerChange', data); + await checkForServerStatus.bind(this, 'off')(); commit('setOperationInProgress', false); dispatch('getLastPowerOperationTime'); }, - hostPowerChange({ commit }, data) { + serverPowerChange({ commit }, data) { commit('setOperationInProgress', true); api .post('/redfish/v1/Systems/system/Actions/ComputerSystem.Reset', data) diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js index 6e9bd962..fdfdc93f 100644 --- a/src/store/modules/GlobalStore.js +++ b/src/store/modules/GlobalStore.js @@ -7,7 +7,7 @@ const HOST_STATE = { diagnosticMode: 'xyz.openbmc_project.State.Host.HostState.DiagnosticMode', }; -const hostStateMapper = (hostState) => { +const serverStateMapper = (hostState) => { switch (hostState) { case HOST_STATE.on: case 'On': // Redfish PowerState @@ -31,7 +31,7 @@ const GlobalStore = { state: { assetTag: null, bmcTime: null, - hostStatus: 'unreachable', + serverStatus: 'unreachable', languagePreference: localStorage.getItem('storedLanguage') || 'en-US', isUtcDisplay: localStorage.getItem('storedUtcDisplay') ? JSON.parse(localStorage.getItem('storedUtcDisplay')) @@ -41,7 +41,7 @@ const GlobalStore = { }, getters: { assetTag: (state) => state.assetTag, - hostStatus: (state) => state.hostStatus, + serverStatus: (state) => state.serverStatus, bmcTime: (state) => state.bmcTime, languagePreference: (state) => state.languagePreference, isUtcDisplay: (state) => state.isUtcDisplay, @@ -51,8 +51,8 @@ const GlobalStore = { mutations: { setAssetTag: (state, assetTag) => (state.assetTag = assetTag), setBmcTime: (state, bmcTime) => (state.bmcTime = bmcTime), - setHostStatus: (state, hostState) => - (state.hostStatus = hostStateMapper(hostState)), + setServerStatus: (state, serverState) => + (state.serverStatus = serverStateMapper(serverState)), setLanguagePreference: (state, language) => (state.languagePreference = language), setUsername: (state, username) => (state.username = username), @@ -75,7 +75,7 @@ const GlobalStore = { }) .catch((error) => console.log(error)); }, - getHostStatus({ commit }) { + getServerStatus({ commit }) { api .get('/redfish/v1/Systems/system') .then( @@ -85,9 +85,9 @@ const GlobalStore = { // OpenBMC's host state interface is mapped to 2 Redfish // properties "Status""State" and "PowerState". Look first // at State for certain cases. - commit('setHostStatus', State); + commit('setServerStatus', State); } else { - commit('setHostStatus', PowerState); + commit('setServerStatus', PowerState); } } ) diff --git a/src/store/plugins/WebSocketPlugin.js b/src/store/plugins/WebSocketPlugin.js index 5780d749..c9f7a89e 100644 --- a/src/store/plugins/WebSocketPlugin.js +++ b/src/store/plugins/WebSocketPlugin.js @@ -38,7 +38,7 @@ const WebSocketPlugin = (store) => { if (eventInterface === 'xyz.openbmc_project.State.Host') { const { properties: { CurrentHostState } = {} } = data; - store.commit('global/setHostStatus', CurrentHostState); + store.commit('global/setServerStatus', CurrentHostState); } else if (path === '/xyz/openbmc_project/logging') { store.dispatch('eventLog/getEventLogData'); } diff --git a/src/views/Configuration/Firmware/Firmware.vue b/src/views/Configuration/Firmware/Firmware.vue index e27c8a26..a2acb9b0 100644 --- a/src/views/Configuration/Firmware/Firmware.vue +++ b/src/views/Configuration/Firmware/Firmware.vue @@ -3,7 +3,7 @@ <page-title /> <alerts-server-power v-if="isServerPowerOffRequired" - :is-host-off="isHostOff" + :is-server-off="isServerOff" /> <!-- Firmware cards --> @@ -25,7 +25,7 @@ <b-col sm="8" md="6" xl="4"> <!-- Update form --> <form-update - :is-host-off="isHostOff" + :is-server-off="isServerOff" :is-page-disabled="isPageDisabled" /> </b-col> @@ -67,18 +67,18 @@ export default { }; }, computed: { - hostStatus() { - return this.$store.getters['global/hostStatus']; + serverStatus() { + return this.$store.getters['global/serverStatus']; }, - isHostOff() { - return this.hostStatus === 'off' ? true : false; + isServerOff() { + return this.serverStatus === 'off' ? true : false; }, isSingleFileUploadEnabled() { return this.$store.getters['firmware/isSingleFileUploadEnabled']; }, isPageDisabled() { if (this.isServerPowerOffRequired) { - return !this.isHostOff || this.loading || this.isOperationInProgress; + return !this.isServerOff || this.loading || this.isOperationInProgress; } return this.loading || this.isOperationInProgress; }, diff --git a/src/views/Configuration/Firmware/FirmwareAlertServerPower.vue b/src/views/Configuration/Firmware/FirmwareAlertServerPower.vue index 04713115..2a3bcba1 100644 --- a/src/views/Configuration/Firmware/FirmwareAlertServerPower.vue +++ b/src/views/Configuration/Firmware/FirmwareAlertServerPower.vue @@ -8,7 +8,7 @@ </p> </alert> <!-- Power off server warning alert --> - <alert v-else-if="!isHostOff" variant="warning" class="mb-5"> + <alert v-else-if="!isServerOff" variant="warning" class="mb-5"> <p class="mb-0"> {{ $t('pageFirmware.alert.serverMustBePoweredOffTo') }} </p> @@ -36,7 +36,7 @@ import Alert from '@/components/Global/Alert'; export default { components: { Alert }, props: { - isHostOff: { + isServerOff: { required: true, type: Boolean, }, diff --git a/src/views/Configuration/Firmware/FirmwareFormUpdate.vue b/src/views/Configuration/Firmware/FirmwareFormUpdate.vue index 9f67e8d0..702352f2 100644 --- a/src/views/Configuration/Firmware/FirmwareFormUpdate.vue +++ b/src/views/Configuration/Firmware/FirmwareFormUpdate.vue @@ -69,7 +69,7 @@ {{ $t('pageFirmware.form.updateFirmware.startUpdate') }} </b-btn> <alert - v-if="isServerPowerOffRequired && !isHostOff" + v-if="isServerPowerOffRequired && !isServerOff" variant="warning" :small="true" class="mt-4" @@ -108,7 +108,7 @@ export default { type: Boolean, default: false, }, - isHostOff: { + isServerOff: { required: true, type: Boolean, }, diff --git a/src/views/Control/FactoryReset/FactoryResetModal.vue b/src/views/Control/FactoryReset/FactoryResetModal.vue index bf92b173..170bf284 100644 --- a/src/views/Control/FactoryReset/FactoryResetModal.vue +++ b/src/views/Control/FactoryReset/FactoryResetModal.vue @@ -22,7 +22,7 @@ </ul> <!-- Warning message --> - <template v-if="!isHostOff"> + <template v-if="!isServerOff"> <p class="d-flex mb-2"> <status-icon status="danger" /> <span id="reset-to-default-warning" class="ml-1"> @@ -82,17 +82,17 @@ export default { }; }, computed: { - hostStatus() { - return this.$store.getters['global/hostStatus']; + serverStatus() { + return this.$store.getters['global/serverStatus']; }, - isHostOff() { - return this.hostStatus === 'off' ? true : false; + isServerOff() { + return this.serverStatus === 'off' ? true : false; }, }, validations: { confirm: { mustBeTrue: function (value) { - return this.isHostOff || value === true; + return this.isServerOff || value === true; }, }, }, diff --git a/src/views/Control/Kvm/KvmConsole.vue b/src/views/Control/Kvm/KvmConsole.vue index d844b4b8..d7ec31e0 100644 --- a/src/views/Control/Kvm/KvmConsole.vue +++ b/src/views/Control/Kvm/KvmConsole.vue @@ -8,8 +8,8 @@ {{ $t('pageKvm.status') }}: </dt> <dd class="d-inline"> - <status-icon :status="hostStatusIcon" /> - <span class="d-none d-md-inline"> {{ hostStatus }}</span> + <status-icon :status="serverStatusIcon" /> + <span class="d-none d-md-inline"> {{ serverStatus }}</span> </dd> </dl> </b-col> @@ -72,7 +72,7 @@ export default { }; }, computed: { - hostStatusIcon() { + serverStatusIcon() { if (this.status === Connected) { return 'success'; } else if (this.status === Disconnected) { @@ -80,7 +80,7 @@ export default { } return 'secondary'; }, - hostStatus() { + serverStatus() { if (this.status === Connected) { return this.$t('pageKvm.connected'); } else if (this.status === Disconnected) { diff --git a/src/views/Control/SerialOverLan/SerialOverLanConsole.vue b/src/views/Control/SerialOverLan/SerialOverLanConsole.vue index 6c16c551..0bda43db 100644 --- a/src/views/Control/SerialOverLan/SerialOverLanConsole.vue +++ b/src/views/Control/SerialOverLan/SerialOverLanConsole.vue @@ -7,7 +7,7 @@ {{ $t('pageSerialOverLan.status') }}: </dt> <dd class="d-inline"> - <status-icon :status="hostStatusIcon" /> {{ connectionStatus }} + <status-icon :status="serverStatusIcon" /> {{ connectionStatus }} </dd> </dl> </b-col> @@ -49,20 +49,20 @@ export default { }; }, computed: { - hostStatus() { - return this.$store.getters['global/hostStatus']; + serverStatus() { + return this.$store.getters['global/serverStatus']; }, - hostStatusIcon() { - return this.hostStatus === 'on' ? 'success' : 'danger'; + serverStatusIcon() { + return this.serverStatus === 'on' ? 'success' : 'danger'; }, connectionStatus() { - return this.hostStatus === 'on' + return this.serverStatus === 'on' ? this.$t('pageSerialOverLan.connected') : this.$t('pageSerialOverLan.disconnected'); }, }, created() { - this.$store.dispatch('global/getHostStatus'); + this.$store.dispatch('global/getServerStatus'); }, mounted() { this.openTerminal(); diff --git a/src/views/Control/ServerPowerOperations/BootSettings.vue b/src/views/Control/ServerPowerOperations/BootSettings.vue index eda4edaf..efd8d347 100644 --- a/src/views/Control/ServerPowerOperations/BootSettings.vue +++ b/src/views/Control/ServerPowerOperations/BootSettings.vue @@ -60,14 +60,14 @@ export default { data() { return { form: { - bootOption: this.$store.getters['hostBootSettings/bootSource'], - oneTimeBoot: this.$store.getters['hostBootSettings/overrideEnabled'], - tpmPolicyOn: this.$store.getters['hostBootSettings/tpmEnabled'], + bootOption: this.$store.getters['serverBootSettings/bootSource'], + oneTimeBoot: this.$store.getters['serverBootSettings/overrideEnabled'], + tpmPolicyOn: this.$store.getters['serverBootSettings/tpmEnabled'], }, }; }, computed: { - ...mapState('hostBootSettings', [ + ...mapState('serverBootSettings', [ 'bootSourceOptions', 'bootSource', 'overrideEnabled', @@ -96,7 +96,7 @@ export default { }, created() { this.$store - .dispatch('hostBootSettings/getTpmPolicy') + .dispatch('serverBootSettings/getTpmPolicy') .finally(() => this.$root.$emit('server-power-operations-boot-settings-complete') ); @@ -122,7 +122,7 @@ export default { settings = { bootSource, overrideEnabled, tpmEnabled }; this.$store - .dispatch('hostBootSettings/saveSettings', settings) + .dispatch('serverBootSettings/saveSettings', settings) .then((message) => this.successToast(message)) .catch(({ message }) => this.errorToast(message)) .finally(() => { diff --git a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue index 4ea77655..9e030837 100644 --- a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue +++ b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue @@ -9,15 +9,15 @@ <b-row> <b-col> <dl> - <dt>{{ $t('pageServerPowerOperations.hostStatus') }}</dt> + <dt>{{ $t('pageServerPowerOperations.serverStatus') }}</dt> <dd - v-if="hostStatus === 'on'" + v-if="serverStatus === 'on'" data-test-id="powerServerOps-text-hostStatus" > {{ $t('global.status.on') }} </dd> <dd - v-else-if="hostStatus === 'off'" + v-else-if="serverStatus === 'off'" data-test-id="powerServerOps-text-hostStatus" > {{ $t('global.status.off') }} @@ -51,7 +51,7 @@ <b-row> <b-col v-if="hasBootSourceOptions" sm="8" md="6" xl="4"> <page-section - :section-title="$t('pageServerPowerOperations.hostOsBootSettings')" + :section-title="$t('pageServerPowerOperations.serverBootSettings')" > <boot-settings /> </page-section> @@ -68,7 +68,7 @@ {{ $t('pageServerPowerOperations.operationInProgress') }} </alert> </template> - <template v-else-if="hostStatus === 'off'"> + <template v-else-if="serverStatus === 'off'"> <b-button variant="primary" data-test-id="serverPowerOperations-button-powerOn" @@ -170,8 +170,8 @@ export default { }; }, computed: { - hostStatus() { - return this.$store.getters['global/hostStatus']; + serverStatus() { + return this.$store.getters['global/serverStatus']; }, isOperationInProgress() { return this.$store.getters['controls/isOperationInProgress']; @@ -180,11 +180,11 @@ export default { return this.$store.getters['controls/lastPowerOperationTime']; }, oneTimeBootEnabled() { - return this.$store.getters['hostBootSettings/overrideEnabled']; + return this.$store.getters['serverBootSettings/overrideEnabled']; }, hasBootSourceOptions() { let bootOptions = this.$store.getters[ - 'hostBootSettings/bootSourceOptions' + 'serverBootSettings/bootSourceOptions' ]; return bootOptions.length !== 0; }, @@ -197,14 +197,14 @@ export default { ); }); Promise.all([ - this.$store.dispatch('hostBootSettings/getBootSettings'), + this.$store.dispatch('serverBootSettings/getBootSettings'), this.$store.dispatch('controls/getLastPowerOperationTime'), bootSettingsPromise, ]).finally(() => this.endLoader()); }, methods: { powerOn() { - this.$store.dispatch('controls/hostPowerOn'); + this.$store.dispatch('controls/serverPowerOn'); }, rebootServer() { const modalMessage = this.$t( @@ -220,13 +220,13 @@ export default { this.$bvModal .msgBoxConfirm(modalMessage, modalOptions) .then((confirmed) => { - if (confirmed) this.$store.dispatch('controls/hostSoftReboot'); + if (confirmed) this.$store.dispatch('controls/serverSoftReboot'); }); } else if (this.form.rebootOption === 'immediate') { this.$bvModal .msgBoxConfirm(modalMessage, modalOptions) .then((confirmed) => { - if (confirmed) this.$store.dispatch('controls/hostHardReboot'); + if (confirmed) this.$store.dispatch('controls/serverHardReboot'); }); } }, @@ -244,14 +244,14 @@ export default { this.$bvModal .msgBoxConfirm(modalMessage, modalOptions) .then((confirmed) => { - if (confirmed) this.$store.dispatch('controls/hostSoftPowerOff'); + if (confirmed) this.$store.dispatch('controls/serverSoftPowerOff'); }); } if (this.form.shutdownOption === 'immediate') { this.$bvModal .msgBoxConfirm(modalMessage, modalOptions) .then((confirmed) => { - if (confirmed) this.$store.dispatch('controls/hostHardPowerOff'); + if (confirmed) this.$store.dispatch('controls/serverHardPowerOff'); }); } }, diff --git a/tests/unit/AppHeader.spec.js b/tests/unit/AppHeader.spec.js index 1a4075f4..9135c007 100644 --- a/tests/unit/AppHeader.spec.js +++ b/tests/unit/AppHeader.spec.js @@ -10,7 +10,7 @@ localVue.use(Vuex); describe('AppHeader.vue', () => { const actions = { - 'global/getHostStatus': jest.fn(), + 'global/getServerStatus': jest.fn(), 'eventLog/getEventLogData': jest.fn(), 'authentication/resetStoreState': jest.fn(), }; @@ -65,8 +65,8 @@ describe('AppHeader.vue', () => { }); describe('Created lifecycle hook', () => { - it('getHostInfo should dispatch global/getHostStatus', () => { - wrapper.vm.getHostInfo(); + it('getServerInfo should dispatch global/getServerStatus', () => { + wrapper.vm.getServerInfo(); expect(store.dispatch).toHaveBeenCalledTimes(1); }); |