From 4a4c22a28ee76db21695297974315eef6bbae4c3 Mon Sep 17 00:00:00 2001 From: Slawek Figiel Date: Mon, 16 Sep 2024 15:57:50 +0200 Subject: [PATCH] [#1447] Improve component story --- ...al-configuration-page.component.stories.ts | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/webui/src/app/kea-global-configuration-page/kea-global-configuration-page.component.stories.ts b/webui/src/app/kea-global-configuration-page/kea-global-configuration-page.component.stories.ts index 0c89be396..99f92cbbb 100644 --- a/webui/src/app/kea-global-configuration-page/kea-global-configuration-page.component.stories.ts +++ b/webui/src/app/kea-global-configuration-page/kea-global-configuration-page.component.stories.ts @@ -183,6 +183,24 @@ const mockGetDaemonConfig = { 'server-tag': '', }, }, + options: { + options: [ + { + alwaysSend: true, + code: 5, + encapsulate: '', + fields: [ + { + fieldType: 'ipv4-address', + values: ['192.0.2.2'], + }, + ], + options: [], + universe: 4, + }, + ], + optionsHash: '234', + } } export default { @@ -241,6 +259,12 @@ export default { }), toastDecorator, ], +} as Meta + +type Story = StoryObj + +export const Dhcp4Configuration: Story = { + args: {}, parameters: { mockData: [ { @@ -252,10 +276,26 @@ export default { }, ], }, -} as Meta - -type Story = StoryObj +} -export const Dhcp4Configuration: Story = { +export const Empty: Story = { args: {}, -} + parameters: { + mockData: [ + { + url: 'http://localhost/api/daemons/1/config', + method: 'GET', + status: 200, + delay: 2000, + response: { + appName: 'kea-server', + appType: 'kea', + appId: 1, + daemonName: 'dhcp4', + config: {}, + options: {}, + }, + }, + ], + }, +} \ No newline at end of file