Skip to content

Commit

Permalink
feat(cc-overview): add error story overview stories
Browse files Browse the repository at this point in the history
  • Loading branch information
Galimede committed Jul 3, 2023
1 parent 0380c1b commit 7d3b06e
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion src/components/cc-overview/cc-overview.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ export const orgaMode = makeStory(conf, {
}],
});

export const orgaModeWithError = makeStory(conf, {
items: [{
mode: 'orga',
children: () => [
createStoryItem(headerOrga, { class: 'head', error: true }),
createStoryItem(statusCodes, { error: true }),
createStoryItem(requests, { style: '', error: true }),
createStoryItem(logsmap, { class: 'main', error: true }),
],
}],
});

export const orgaModeWithTwoHeads = makeStory(conf, {
docs: 'If you place two or more heads in your overview, you\'ll need to specify how many with the CSS custom property: `--cc-overview-head-count: 2`.',
css: placeholderCss,
Expand Down Expand Up @@ -114,6 +126,22 @@ export const appMode = makeStory(conf, {
}],
});

export const appModeWithError = makeStory(conf, {
items: [{
mode: 'app',
children: () => [
createStoryItem(headerApp, { class: 'head', error: true }),
createStoryItem(instances, { error: true }),
createStoryItem(scalability, { error: true }),
createStoryItem(deployments, { error: true }),
createStoryItem(metrics, { metrics: { state: 'error' } }),
createStoryItem(statusCodes, { error: true }),
createStoryItem(requests, { style: '', error: true }),
createStoryItem(logsmap, { class: 'main', error: true }),
],
}],
});

export const appModeWithBeta = makeStory(conf, {
items: [{
mode: 'app',
Expand Down Expand Up @@ -152,4 +180,13 @@ export const appModeWithTwoHeads = makeStory(conf, {
],
});

enhanceStoriesNames({ defaultStory, orgaMode, orgaModeWithTwoHeads, appMode, appModeWithBeta, appModeWithTwoHeads });
enhanceStoriesNames({
defaultStory,
orgaMode,
orgaModeWithError,
orgaModeWithTwoHeads,
appMode,
appModeWithError,
appModeWithBeta,
appModeWithTwoHeads,
});

0 comments on commit 7d3b06e

Please sign in to comment.