From 4740b7bb8588ef870c8250521c1b887446cfacd6 Mon Sep 17 00:00:00 2001 From: Sascha Eggenberger Date: Thu, 16 Jan 2025 09:24:03 +0100 Subject: [PATCH] Storybook: Fix broken stories --- .../customizable_dashboard.stories.js | 44 ++++++++++++------- .../components/secuity_list_item.stories.js | 5 ++- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/app/assets/javascripts/vue_shared/components/customizable_dashboard/customizable_dashboard.stories.js b/app/assets/javascripts/vue_shared/components/customizable_dashboard/customizable_dashboard.stories.js index 179b5c1a57f8cd..67fcbc92e00f0d 100644 --- a/app/assets/javascripts/vue_shared/components/customizable_dashboard/customizable_dashboard.stories.js +++ b/app/assets/javascripts/vue_shared/components/customizable_dashboard/customizable_dashboard.stories.js @@ -15,24 +15,36 @@ const Template = (args, { argTypes }) => ({ export const Default = Template.bind({}); Default.args = { editable: false, - panels: [ - { - component: 'CubeLineChart', - title: s__('ProductAnalytics|Audience'), - gridAttributes: { - width: 3, - height: 3, + initialDashboard: { + title: 'Dashboard', + description: 'Test description', + panels: [ + { + component: 'CubeLineChart', + title: s__('ProductAnalytics|Audience'), + gridAttributes: { + width: 3, + height: 3, + }, }, - }, - { - component: 'CubeLineChart', - title: s__('ProductAnalytics|Audience'), - gridAttributes: { - width: 3, - height: 3, + { + component: 'CubeLineChart', + title: s__('ProductAnalytics|Audience'), + gridAttributes: { + width: 3, + height: 3, + }, }, - }, - ], + ], + userDefined: true, + status: null, + errors: null, + }, + availableVisualizations: { + loading: true, + hasError: false, + visualizations: [], + }, }; export const Editable = Template.bind({}); diff --git a/ee/app/assets/javascripts/merge_requests/reports/components/secuity_list_item.stories.js b/ee/app/assets/javascripts/merge_requests/reports/components/secuity_list_item.stories.js index 9d782444c5c5ca..4b2cde429c5618 100644 --- a/ee/app/assets/javascripts/merge_requests/reports/components/secuity_list_item.stories.js +++ b/ee/app/assets/javascripts/merge_requests/reports/components/secuity_list_item.stories.js @@ -8,7 +8,7 @@ const defaultRender = (args) => ({ }; }, template: - '', + '', }); const Template = (args) => defaultRender(args); @@ -21,6 +21,7 @@ Default.args = { { severity: 'critical', name: 'Use of hard-coded password' }, { severity: 'high', name: 'Use of API key' }, ], + status: 'failed', }; export const Passed = Template.bind({}); @@ -28,6 +29,7 @@ Passed.args = { loading: false, policyName: 'Block Critical Security Findings', findings: [], + status: 'success', }; export const Loading = Template.bind({}); @@ -35,6 +37,7 @@ Loading.args = { loading: true, policyName: 'Block Critical Security Findings', findings: [], + status: 'RUNNING', }; export default { -- GitLab