-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into SFINT-5785
- Loading branch information
Showing
32 changed files
with
1,270 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...template-components/atomic-product-description/atomic-product-description.new.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import {wrapInCommerceInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; | ||
import {wrapInCommerceProductList} from '@coveo/atomic-storybook-utils/commerce/commerce-product-list-wrapper'; | ||
import {wrapInProductTemplate} from '@coveo/atomic-storybook-utils/commerce/commerce-product-template-wrapper'; | ||
import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; | ||
import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; | ||
import type {Meta, StoryObj as Story} from '@storybook/web-components'; | ||
import {updateQuery} from '../../../../../../headless/src/features/commerce/query/query-actions'; | ||
|
||
const { | ||
decorator: commerceInterfaceDecorator, | ||
play: initializeCommerceInterface, | ||
} = wrapInCommerceInterface({ | ||
skipFirstSearch: true, | ||
}); | ||
|
||
const {decorator: commerceProductListDecorator} = wrapInCommerceProductList(); | ||
const {decorator: productTemplateDecorator} = wrapInProductTemplate(); | ||
|
||
const meta: Meta = { | ||
component: 'atomic-product-description', | ||
title: 'Atomic-Commerce/Product Template Components/ProductDescription', | ||
id: 'atomic-product-description', | ||
render: renderComponent, | ||
parameters, | ||
argTypes: { | ||
'attributes-truncate-after': { | ||
name: 'truncate-after', | ||
type: 'string', | ||
}, | ||
'attributes-field': { | ||
name: 'field', | ||
type: 'string', | ||
}, | ||
'attributes-is-collapsible': { | ||
name: 'is-collapsible', | ||
type: 'boolean', | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Default: Story = { | ||
name: 'atomic-product-description', | ||
parameters: { | ||
viewport: { | ||
defaultViewport: 'mobile1', | ||
}, | ||
}, | ||
decorators: [ | ||
productTemplateDecorator, | ||
commerceProductListDecorator, | ||
commerceInterfaceDecorator, | ||
], | ||
play: async (context) => { | ||
await initializeCommerceInterface(context); | ||
|
||
const searchInterface = context.canvasElement.querySelector( | ||
'atomic-commerce-interface' | ||
); | ||
searchInterface?.engine?.dispatch(updateQuery({query: 'kayak'})); | ||
|
||
await searchInterface!.executeFirstRequest(); | ||
}, | ||
args: { | ||
'attributes-field': 'ec_description', | ||
}, | ||
}; |
1 change: 0 additions & 1 deletion
1
...ce/product-template-components/atomic-product-description/atomic-product-description.pcss
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.