Skip to content

Commit

Permalink
Merge pull request #529 from Quetzacoalt91/fix-storybook-integrate-page
Browse files Browse the repository at this point in the history
Fix loading of Integrate tab on Storybook
  • Loading branch information
Quetzacoalt91 authored Jan 10, 2024
2 parents 1c72fa2 + 6ed9a62 commit 404482d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion _dev/stories/400-integrate.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ export default {
component: Integrate,
};

const managementRoutes = {
default: `https://www.facebook.com/facebook_business_extension?app_id=XXX&external_business_id=XXX`,
messenger_chat: `https://business.facebook.com/latest/inbox/settings/chat_plugin?asset_id=XXX`,
page_cta: `https://www.facebook.com/XXX`,
view_message_url: `https://business.facebook.com/latest/inbox/all?asset_id=XXX`,
};

const Template = (args: any, {argTypes}: any) => ({
props: Object.keys(argTypes),
components: {Integrate},
Expand All @@ -19,7 +26,7 @@ const Template = (args: any, {argTypes}: any) => ({

export const NoFeaturesEnabled: any = Template.bind({});
NoFeaturesEnabled.args = {
enabledFeatures: [],
enabledFeatures: {},
disabledFeatures: {
"messenger_chat": {
enabled: false
Expand All @@ -36,6 +43,7 @@ NoFeaturesEnabled.args = {
enabled: false
}
},
manageRoute: managementRoutes,
};

export const MessengerEnabled: any = Template.bind({});
Expand All @@ -58,6 +66,7 @@ MessengerEnabled.args = {
enabled: false
}
},
manageRoute: managementRoutes,
};

export const WithCatalogSynchronized: any = Template.bind({});
Expand All @@ -80,6 +89,7 @@ WithCatalogSynchronized.args = {
},
unavailableFeatures: {
},
manageRoute: managementRoutes,
};

export const AllFeaturesEnabled: any = Template.bind({});
Expand All @@ -102,6 +112,7 @@ AllFeaturesEnabled.args = {
},
unavailableFeatures: {
},
manageRoute: managementRoutes,
};

export const WarningWhenNoFeatures: any = Template.bind({});
Expand All @@ -112,4 +123,5 @@ WarningWhenNoFeatures.args = {
},
unavailableFeatures: {
},
manageRoute: managementRoutes,
};

0 comments on commit 404482d

Please sign in to comment.