From 8ba52ad01e3e9eb314e114a5922cf6468ddcf816 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez Date: Mon, 5 Aug 2024 15:37:22 +0200 Subject: [PATCH] Update Storybook Stories for `AvailableSoftwareUpdates` --- .../AvailableSoftwareUpdates.stories.jsx | 21 ++++++------------- .../HostDetailsPage/HostDetails.stories.jsx | 7 +++++-- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/assets/js/common/AvailableSoftwareUpdates/AvailableSoftwareUpdates.stories.jsx b/assets/js/common/AvailableSoftwareUpdates/AvailableSoftwareUpdates.stories.jsx index f70cba50a6..bebdae5686 100644 --- a/assets/js/common/AvailableSoftwareUpdates/AvailableSoftwareUpdates.stories.jsx +++ b/assets/js/common/AvailableSoftwareUpdates/AvailableSoftwareUpdates.stories.jsx @@ -31,18 +31,12 @@ export default { type: 'function', }, }, - softwareUpdatesSettingsLoading: { + loading: { control: { type: 'boolean', }, description: 'are software updates settings being fetched?', }, - softwareUpdatesLoading: { - control: { - type: 'boolean', - }, - description: 'are software updates being fetched?', - }, relevantPatches: { type: 'number', description: 'Number of relevant patches available for the system', @@ -82,17 +76,14 @@ export const Cool = { export const NoSettingsConfigured = { args: { settingsConfigured: false } }; -export const SoftwareUpdateSettingsLoading = { - args: { softwareUpdatesSettingsLoading: true }, -}; - -export const SoftwareUpdatesLoading = { - args: { settingsConfigured: true, softwareUpdatesLoading: true }, +export const Loading = { + args: { settingsConfigured: true, loading: true }, }; -export const Unknown = { +export const Error = { args: { settingsConfigured: true, - tooltip: 'Trento was not able to retrieve the requested data', + errorMessage: 'Connection to SUMA not working', + tooltip: 'Please review SUSE Manager settings', }, }; diff --git a/assets/js/pages/HostDetailsPage/HostDetails.stories.jsx b/assets/js/pages/HostDetailsPage/HostDetails.stories.jsx index 4edc185d50..eab4e4b1fa 100644 --- a/assets/js/pages/HostDetailsPage/HostDetails.stories.jsx +++ b/assets/js/pages/HostDetailsPage/HostDetails.stories.jsx @@ -289,6 +289,8 @@ export const WithSuseManager = { args: { ...Default.args, suseManagerEnabled: true, + softwareUpdatesSettingsSaved: true, + softwareUpdatesLoading: false, relevantPatches: 123, upgradablePackages: 456, }, @@ -306,9 +308,10 @@ export const SuseManagerUnknown = { args: { ...Default.args, suseManagerEnabled: true, + softwareUpdatesSettingsSaved: true, relevantPatches: undefined, upgradablePackages: undefined, - softwareUpdatesTooltip: - 'SUSE Manager was not able to retrieve the requested data', + softwareUpdatesErrorMessage: 'Connection to SUMA not working', + softwareUpdatesTooltip: 'Please review SUSE Manager settings', }, };