Skip to content

Commit

Permalink
Update Storybook Stories for AvailableSoftwareUpdates (#2857)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-suse authored Aug 6, 2024
1 parent e95564b commit 9fe36ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
},
};
7 changes: 5 additions & 2 deletions assets/js/pages/HostDetailsPage/HostDetails.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ export const WithSuseManager = {
args: {
...Default.args,
suseManagerEnabled: true,
softwareUpdatesSettingsSaved: true,
softwareUpdatesLoading: false,
relevantPatches: 123,
upgradablePackages: 456,
},
Expand All @@ -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',
},
};

0 comments on commit 9fe36ab

Please sign in to comment.