@faststore/ui 1.12.5 → 1.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/atoms/Badge/Badge.js +1 -1
- package/dist/atoms/Badge/Badge.js.map +1 -1
- package/dist/atoms/Button/Button.js +1 -1
- package/dist/atoms/Button/Button.js.map +1 -1
- package/dist/atoms/Checkbox/Checkbox.js +1 -1
- package/dist/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/atoms/Icon/Icon.js +1 -1
- package/dist/atoms/Icon/Icon.js.map +1 -1
- package/dist/atoms/Incentive/Incentive.js +1 -1
- package/dist/atoms/Incentive/Incentive.js.map +1 -1
- package/dist/atoms/Input/Input.js +1 -1
- package/dist/atoms/Input/Input.js.map +1 -1
- package/dist/atoms/Label/Label.js +1 -1
- package/dist/atoms/Label/Label.js.map +1 -1
- package/dist/atoms/Link/Link.js +1 -1
- package/dist/atoms/Link/Link.js.map +1 -1
- package/dist/atoms/List/List.js +1 -1
- package/dist/atoms/List/List.js.map +1 -1
- package/dist/atoms/Overlay/Overlay.js +1 -1
- package/dist/atoms/Overlay/Overlay.js.map +1 -1
- package/dist/atoms/Popover/Popover.js +1 -1
- package/dist/atoms/Popover/Popover.js.map +1 -1
- package/dist/atoms/Price/Price.js +1 -1
- package/dist/atoms/Price/Price.js.map +1 -1
- package/dist/atoms/Radio/Radio.js +1 -1
- package/dist/atoms/Radio/Radio.js.map +1 -1
- package/dist/atoms/Select/Select.js +1 -1
- package/dist/atoms/Select/Select.js.map +1 -1
- package/dist/atoms/Skeleton/Skeleton.js +1 -1
- package/dist/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/atoms/Slider/Slider.js +1 -1
- package/dist/atoms/Slider/Slider.js.map +1 -1
- package/dist/atoms/Spinner/Spinner.js +1 -1
- package/dist/atoms/Spinner/Spinner.js.map +1 -1
- package/dist/atoms/TextArea/TextArea.js +1 -1
- package/dist/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/molecules/Accordion/Accordion.js +1 -1
- package/dist/molecules/Accordion/Accordion.js.map +1 -1
- package/dist/molecules/AggregateRating/AggregateRating.d.ts +1 -1
- package/dist/molecules/AggregateRating/AggregateRating.js +2 -2
- package/dist/molecules/AggregateRating/AggregateRating.js.map +1 -1
- package/dist/molecules/Alert/Alert.js +1 -1
- package/dist/molecules/Alert/Alert.js.map +1 -1
- package/dist/molecules/Banner/Banner.js +1 -1
- package/dist/molecules/Banner/Banner.js.map +1 -1
- package/dist/molecules/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/molecules/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/molecules/Bullets/Bullets.js +1 -1
- package/dist/molecules/Bullets/Bullets.js.map +1 -1
- package/dist/molecules/Card/Card.js +1 -1
- package/dist/molecules/Card/Card.js.map +1 -1
- package/dist/molecules/Carousel/Carousel.js +1 -1
- package/dist/molecules/Carousel/Carousel.js.map +1 -1
- package/dist/molecules/Dropdown/DropdownButton.js +1 -1
- package/dist/molecules/Dropdown/DropdownButton.js.map +1 -1
- package/dist/molecules/Dropdown/DropdownItem.js +1 -1
- package/dist/molecules/Dropdown/DropdownItem.js.map +1 -1
- package/dist/molecules/Dropdown/DropdownMenu.js +2 -2
- package/dist/molecules/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/molecules/Form/Form.js +1 -1
- package/dist/molecules/Form/Form.js.map +1 -1
- package/dist/molecules/IconButton/IconButton.js +1 -1
- package/dist/molecules/IconButton/IconButton.js.map +1 -1
- package/dist/molecules/LoadingButton/LoadingButton.js +1 -1
- package/dist/molecules/LoadingButton/LoadingButton.js.map +1 -1
- package/dist/molecules/Modal/ModalContent.js +1 -1
- package/dist/molecules/Modal/ModalContent.js.map +1 -1
- package/dist/molecules/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/molecules/PaymentMethods/PaymentMethods.js.map +1 -1
- package/dist/molecules/PriceRange/PriceRange.js +1 -1
- package/dist/molecules/PriceRange/PriceRange.js.map +1 -1
- package/dist/molecules/ProductCard/ProductCard.js +1 -1
- package/dist/molecules/ProductCard/ProductCard.js.map +1 -1
- package/dist/molecules/QuantitySelector/QuantitySelector.js +1 -1
- package/dist/molecules/QuantitySelector/QuantitySelector.js.map +1 -1
- package/dist/molecules/RadioGroup/RadioOption.js +2 -2
- package/dist/molecules/RadioGroup/RadioOption.js.map +1 -1
- package/dist/molecules/SearchInput/SearchInput.js +1 -1
- package/dist/molecules/SearchInput/SearchInput.js.map +1 -1
- package/dist/molecules/Table/Table.js +1 -1
- package/dist/molecules/Table/Table.js.map +1 -1
- package/dist/organisms/Hero/Hero.js +1 -1
- package/dist/organisms/Hero/Hero.js.map +1 -1
- package/dist/organisms/OutOfStock/OutOfStock.js +1 -1
- package/dist/organisms/OutOfStock/OutOfStock.js.map +1 -1
- package/package.json +3 -3
- package/src/atoms/Badge/Badge.test.tsx +2 -2
- package/src/atoms/Badge/Badge.tsx +1 -1
- package/src/atoms/Badge/stories/Badge.mdx +1 -1
- package/src/atoms/Button/Button.test.tsx +2 -2
- package/src/atoms/Button/Button.tsx +1 -1
- package/src/atoms/Button/stories/Button.mdx +1 -1
- package/src/atoms/Checkbox/Checkbox.test.tsx +2 -2
- package/src/atoms/Checkbox/Checkbox.tsx +1 -1
- package/src/atoms/Checkbox/stories/Checkbox.mdx +1 -1
- package/src/atoms/Icon/Icon.test.tsx +2 -2
- package/src/atoms/Icon/Icon.tsx +1 -1
- package/src/atoms/Icon/stories/Icon.mdx +1 -1
- package/src/atoms/Incentive/Incentive.test.tsx +2 -2
- package/src/atoms/Incentive/Incentive.tsx +1 -1
- package/src/atoms/Incentive/stories/Incentive.mdx +1 -1
- package/src/atoms/Input/Input.test.tsx +2 -2
- package/src/atoms/Input/Input.tsx +1 -1
- package/src/atoms/Input/stories/Input.mdx +1 -1
- package/src/atoms/Label/Label.test.tsx +2 -2
- package/src/atoms/Label/Label.tsx +1 -1
- package/src/atoms/Label/stories/Label.mdx +1 -1
- package/src/atoms/Link/Link.test.tsx +3 -3
- package/src/atoms/Link/Link.tsx +1 -1
- package/src/atoms/Link/stories/Link.mdx +1 -1
- package/src/atoms/List/List.test.tsx +5 -5
- package/src/atoms/List/List.tsx +1 -1
- package/src/atoms/List/stories/List.mdx +2 -2
- package/src/atoms/Overlay/Overlay.test.tsx +2 -2
- package/src/atoms/Overlay/Overlay.tsx +1 -1
- package/src/atoms/Overlay/stories/Overlay.mdx +1 -1
- package/src/atoms/Popover/Popover.test.tsx +2 -2
- package/src/atoms/Popover/Popover.tsx +1 -1
- package/src/atoms/Popover/stories/Popover.mdx +1 -1
- package/src/atoms/Price/Price.test.tsx +2 -2
- package/src/atoms/Price/Price.tsx +1 -1
- package/src/atoms/Price/stories/Price.mdx +1 -1
- package/src/atoms/Price/stories/Price.stories.tsx +1 -1
- package/src/atoms/Radio/Radio.test.tsx +2 -2
- package/src/atoms/Radio/Radio.tsx +1 -1
- package/src/atoms/Radio/stories/Radio.mdx +1 -1
- package/src/atoms/Select/Select.test.tsx +2 -2
- package/src/atoms/Select/Select.tsx +1 -1
- package/src/atoms/Select/stories/Select.mdx +1 -1
- package/src/atoms/Skeleton/Skeleton.test.tsx +2 -2
- package/src/atoms/Skeleton/Skeleton.tsx +1 -1
- package/src/atoms/Skeleton/stories/Skeleton.mdx +1 -1
- package/src/atoms/Slider/Slider.test.tsx +2 -2
- package/src/atoms/Slider/Slider.tsx +1 -1
- package/src/atoms/Slider/stories/Slider.mdx +1 -1
- package/src/atoms/Spinner/Spinner.test.tsx +2 -2
- package/src/atoms/Spinner/Spinner.tsx +1 -1
- package/src/atoms/Spinner/stories/Spinner.mdx +1 -1
- package/src/atoms/TextArea/TextArea.test.tsx +2 -2
- package/src/atoms/TextArea/TextArea.tsx +1 -1
- package/src/atoms/TextArea/stories/TextArea.mdx +1 -1
- package/src/molecules/Accordion/Accordion.test.tsx +2 -2
- package/src/molecules/Accordion/Accordion.tsx +1 -1
- package/src/molecules/Accordion/stories/Accordion.mdx +1 -1
- package/src/molecules/AggregateRating/AggregateRating.test.tsx +3 -3
- package/src/molecules/AggregateRating/AggregateRating.tsx +3 -3
- package/src/molecules/AggregateRating/stories/AggregateRating.mdx +1 -1
- package/src/molecules/AggregateRating/stories/AggregateRating.stories.tsx +1 -1
- package/src/molecules/Alert/Alert.test.tsx +2 -2
- package/src/molecules/Alert/Alert.tsx +1 -1
- package/src/molecules/Alert/stories/Alert.mdx +1 -1
- package/src/molecules/Banner/Banner.test.tsx +2 -2
- package/src/molecules/Banner/Banner.tsx +1 -1
- package/src/molecules/Banner/stories/Banner.mdx +2 -2
- package/src/molecules/Breadcrumb/Breadcrumb.test.tsx +2 -2
- package/src/molecules/Breadcrumb/Breadcrumb.tsx +1 -1
- package/src/molecules/Breadcrumb/stories/Breadcrumb.mdx +1 -1
- package/src/molecules/Bullets/Bullets.test.tsx +2 -2
- package/src/molecules/Bullets/Bullets.tsx +1 -1
- package/src/molecules/Bullets/stories/Bullets.mdx +1 -1
- package/src/molecules/Card/Card.test.tsx +2 -2
- package/src/molecules/Card/Card.tsx +1 -1
- package/src/molecules/Card/stories/Card.mdx +1 -1
- package/src/molecules/Carousel/Carousel.test.tsx +2 -2
- package/src/molecules/Carousel/Carousel.tsx +1 -1
- package/src/molecules/Carousel/stories/Carousel.mdx +2 -2
- package/src/molecules/Dropdown/DropdownButton.tsx +1 -1
- package/src/molecules/Dropdown/DropdownItem.tsx +1 -1
- package/src/molecules/Dropdown/DropdownMenu.tsx +2 -2
- package/src/molecules/Dropdown/stories/Dropdown.mdx +4 -4
- package/src/molecules/Form/Form.test.tsx +2 -2
- package/src/molecules/Form/Form.tsx +1 -1
- package/src/molecules/Form/stories/Form.mdx +1 -1
- package/src/molecules/IconButton/IconButton.test.tsx +2 -2
- package/src/molecules/IconButton/IconButton.tsx +1 -1
- package/src/molecules/IconButton/stories/IconButton.mdx +1 -1
- package/src/molecules/LoadingButton/LoadingButton.test.tsx +2 -2
- package/src/molecules/LoadingButton/LoadingButton.tsx +1 -1
- package/src/molecules/LoadingButton/stories/LoadingButton.mdx +1 -1
- package/src/molecules/Modal/Modal.test.tsx +2 -2
- package/src/molecules/Modal/ModalContent.tsx +1 -1
- package/src/molecules/Modal/stories/Modal.mdx +1 -1
- package/src/molecules/PaymentMethods/PaymentMethods.test.tsx +2 -2
- package/src/molecules/PaymentMethods/PaymentMethods.tsx +1 -1
- package/src/molecules/PaymentMethods/stories/PaymentMethods.mdx +1 -1
- package/src/molecules/PriceRange/PriceRange.test.tsx +2 -2
- package/src/molecules/PriceRange/PriceRange.tsx +1 -1
- package/src/molecules/PriceRange/stories/PriceRange.mdx +1 -1
- package/src/molecules/ProductCard/ProductCard.test.tsx +2 -2
- package/src/molecules/ProductCard/ProductCard.tsx +1 -1
- package/src/molecules/ProductCard/stories/ProductCard.mdx +1 -1
- package/src/molecules/QuantitySelector/QuantitySelector.tsx +1 -1
- package/src/molecules/QuantitySelector/stories/QuantitySelector.mdx +1 -1
- package/src/molecules/RadioGroup/RadioOption.tsx +2 -2
- package/src/molecules/RadioGroup/stories/RadioGroup.mdx +2 -2
- package/src/molecules/SearchInput/SearchInput.test.tsx +2 -2
- package/src/molecules/SearchInput/SearchInput.tsx +1 -1
- package/src/molecules/SearchInput/stories/SearchInput.mdx +1 -1
- package/src/molecules/Table/Table.test.tsx +1 -1
- package/src/molecules/Table/Table.tsx +1 -1
- package/src/molecules/Table/stories/Table.mdx +1 -1
- package/src/organisms/Hero/Hero.test.tsx +2 -2
- package/src/organisms/Hero/Hero.tsx +1 -1
- package/src/organisms/Hero/stories/Hero.mdx +1 -1
- package/src/organisms/OutOfStock/OutOfStock.test.tsx +1 -1
- package/src/organisms/OutOfStock/OutOfStock.tsx +1 -1
- package/src/organisms/OutOfStock/stories/OutOfStock.mdx +1 -1
|
@@ -115,14 +115,14 @@ const DropdownMenu = ({
|
|
|
115
115
|
? createPortal(
|
|
116
116
|
<div
|
|
117
117
|
role="presentation"
|
|
118
|
-
data-
|
|
118
|
+
data-fs-dropdown-overlay
|
|
119
119
|
onKeyDown={handleBackdropKeyDown}
|
|
120
120
|
data-testid={`${testId}-overlay`}
|
|
121
121
|
>
|
|
122
122
|
<div
|
|
123
123
|
role="menu"
|
|
124
124
|
aria-orientation="vertical"
|
|
125
|
-
data-
|
|
125
|
+
data-fs-dropdown-menu
|
|
126
126
|
data-testid={testId}
|
|
127
127
|
style={{ ...dropdownPosition, ...style }}
|
|
128
128
|
id={id}
|
|
@@ -53,11 +53,11 @@ The `Dropdown` uses the [Compound Component](https://kentcdodds.com/blog/compoun
|
|
|
53
53
|
## CSS Selectors
|
|
54
54
|
|
|
55
55
|
```css
|
|
56
|
-
[data-
|
|
56
|
+
[data-fs-dropdown-button] {}
|
|
57
57
|
|
|
58
|
-
[data-
|
|
58
|
+
[data-fs-dropdown-item] {}
|
|
59
59
|
|
|
60
|
-
[data-
|
|
60
|
+
[data-fs-dropdown-overlay] {}
|
|
61
61
|
|
|
62
|
-
[data-
|
|
62
|
+
[data-fs-dropdown-menu] {}
|
|
63
63
|
```
|
|
@@ -37,10 +37,10 @@ const TestForm = ({ onSubmit }: Pick<FormProps, 'onSubmit'>) => (
|
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
describe('Form', () => {
|
|
40
|
-
it('should have `data-
|
|
40
|
+
it('should have `data-fs-form` attribute', () => {
|
|
41
41
|
const { getByTestId } = render(<TestForm />)
|
|
42
42
|
|
|
43
|
-
expect(getByTestId('store-form')).toHaveAttribute('data-
|
|
43
|
+
expect(getByTestId('store-form')).toHaveAttribute('data-fs-form')
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
describe('Accessibility', () => {
|
|
@@ -14,7 +14,7 @@ const Form = forwardRef<HTMLFormElement, FormProps>(function Form(
|
|
|
14
14
|
ref
|
|
15
15
|
) {
|
|
16
16
|
return (
|
|
17
|
-
<form ref={ref} data-
|
|
17
|
+
<form ref={ref} data-fs-form data-testid={testId} {...otherProps}>
|
|
18
18
|
{children}
|
|
19
19
|
</form>
|
|
20
20
|
)
|
|
@@ -6,7 +6,7 @@ import IconButton from './IconButton'
|
|
|
6
6
|
describe('IconButton', () => {
|
|
7
7
|
const testId = 'store-icon-button'
|
|
8
8
|
|
|
9
|
-
it('data-
|
|
9
|
+
it('data-fs-icon-button is present', () => {
|
|
10
10
|
const { getByTestId } = render(
|
|
11
11
|
<IconButton testId={testId} aria-label="foo" icon={<div>foo</div>} />
|
|
12
12
|
)
|
|
@@ -14,7 +14,7 @@ describe('IconButton', () => {
|
|
|
14
14
|
const iconButton = getByTestId(testId)
|
|
15
15
|
|
|
16
16
|
expect(iconButton).toBeInTheDocument()
|
|
17
|
-
expect(iconButton).toHaveAttribute('data-
|
|
17
|
+
expect(iconButton).toHaveAttribute('data-fs-icon-button')
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
it('icon is present', () => {
|
|
@@ -26,7 +26,7 @@ const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButton(
|
|
|
26
26
|
ref
|
|
27
27
|
) {
|
|
28
28
|
return (
|
|
29
|
-
<Button ref={ref} data-
|
|
29
|
+
<Button ref={ref} data-fs-icon-button testId={testId} {...buttonProps}>
|
|
30
30
|
<Icon component={icon} />
|
|
31
31
|
</Button>
|
|
32
32
|
)
|
|
@@ -4,11 +4,11 @@ import React from 'react'
|
|
|
4
4
|
import LoadingButton from './LoadingButton'
|
|
5
5
|
|
|
6
6
|
describe('Loading Button', () => {
|
|
7
|
-
it('`data-
|
|
7
|
+
it('`data-fs-loading-button` is present', () => {
|
|
8
8
|
const { getByTestId } = render(<LoadingButton loading />)
|
|
9
9
|
|
|
10
10
|
expect(getByTestId('store-loading-button')).toHaveAttribute(
|
|
11
|
-
'data-
|
|
11
|
+
'data-fs-loading-button'
|
|
12
12
|
)
|
|
13
13
|
})
|
|
14
14
|
})
|
|
@@ -41,7 +41,7 @@ const TestModal = ({
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
describe('Modal', () => {
|
|
44
|
-
it('The attribute data-
|
|
44
|
+
it('The attribute data-fs-modal-content should be present', () => {
|
|
45
45
|
const { getByTestId } = render(
|
|
46
46
|
<Modal aria-label="test modal" testId="store-modal" isOpen>
|
|
47
47
|
Foo
|
|
@@ -49,7 +49,7 @@ describe('Modal', () => {
|
|
|
49
49
|
)
|
|
50
50
|
|
|
51
51
|
expect(getByTestId('store-modal')).toHaveAttribute(
|
|
52
|
-
'data-
|
|
52
|
+
'data-fs-modal-content'
|
|
53
53
|
)
|
|
54
54
|
})
|
|
55
55
|
|
|
@@ -17,8 +17,8 @@ describe('Payment methods', () => {
|
|
|
17
17
|
paymentMethodsData = getByTestId('store-payment-methods')
|
|
18
18
|
})
|
|
19
19
|
|
|
20
|
-
it('should have `data-
|
|
21
|
-
expect(paymentMethodsData).toHaveAttribute('data-
|
|
20
|
+
it('should have `data-fs-payment-methods` attribute', () => {
|
|
21
|
+
expect(paymentMethodsData).toHaveAttribute('data-fs-payment-methods')
|
|
22
22
|
})
|
|
23
23
|
|
|
24
24
|
it('Should render PaymentMethods Children', () => {
|
|
@@ -25,11 +25,11 @@ const props = {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
describe('PriceRange', () => {
|
|
28
|
-
it('`data-
|
|
28
|
+
it('`data-fs-price-range` is present', () => {
|
|
29
29
|
const { getByTestId } = render(<PriceRange {...props} />)
|
|
30
30
|
|
|
31
31
|
expect(getByTestId('store-price-range')).toHaveAttribute(
|
|
32
|
-
'data-
|
|
32
|
+
'data-fs-price-range'
|
|
33
33
|
)
|
|
34
34
|
})
|
|
35
35
|
|
|
@@ -57,7 +57,7 @@ const PriceRange = forwardRef<PriceRangeRefType | undefined, PriceRangeProps>(
|
|
|
57
57
|
}))
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
|
-
<div data-
|
|
60
|
+
<div data-fs-price-range data-testid={testId} className={className}>
|
|
61
61
|
<Slider
|
|
62
62
|
ref={sliderRef}
|
|
63
63
|
min={min}
|
|
@@ -42,8 +42,8 @@ describe('ProductCard', () => {
|
|
|
42
42
|
})
|
|
43
43
|
|
|
44
44
|
describe('Data attributes', () => {
|
|
45
|
-
it('`ProductCard` component should have `data-
|
|
46
|
-
expect(productCard).toHaveAttribute('data-
|
|
45
|
+
it('`ProductCard` component should have `data-fs-product-card` attribute', () => {
|
|
46
|
+
expect(productCard).toHaveAttribute('data-fs-product-card')
|
|
47
47
|
})
|
|
48
48
|
|
|
49
49
|
it('`ProductCardContent` component should have `data-product-card-content` attribute', () => {
|
|
@@ -29,9 +29,9 @@ const RadioOption = forwardRef<HTMLInputElement, RadioOptionProps>(
|
|
|
29
29
|
const { name, selectedValue, onChange } = useRadioGroup()
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<label aria-label={label} data-
|
|
32
|
+
<label aria-label={label} data-fs-radio-option>
|
|
33
33
|
<Radio
|
|
34
|
-
data-
|
|
34
|
+
data-fs-radio-option-item
|
|
35
35
|
ref={ref}
|
|
36
36
|
name={name}
|
|
37
37
|
checked={value === selectedValue}
|
|
@@ -10,11 +10,11 @@ const Wrapper = (props: Partial<SearchInputProps>) => (
|
|
|
10
10
|
)
|
|
11
11
|
|
|
12
12
|
describe('SearchInput', () => {
|
|
13
|
-
it('`data-
|
|
13
|
+
it('`data-fs-search-input` is present', () => {
|
|
14
14
|
const { getByTestId } = render(<Wrapper />)
|
|
15
15
|
|
|
16
16
|
expect(getByTestId('search-input')).toHaveAttribute(
|
|
17
|
-
'data-
|
|
17
|
+
'data-fs-search-input'
|
|
18
18
|
)
|
|
19
19
|
})
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ import CustomIcon from './assets/CustomIcon'
|
|
|
22
22
|
|
|
23
23
|
## CSS Selectors
|
|
24
24
|
```css
|
|
25
|
-
[data-
|
|
25
|
+
[data-fs-search-input] {}
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
This component inherits [Input](?path=/docs/atoms-input--input#css-selectors), [Button](?path=/docs/atoms-button--button#css-selectors), [Icon](?path=/docs/atoms-icon--icon#css-selectors) css selectors.
|
|
@@ -14,7 +14,7 @@ const Table = forwardRef<HTMLTableElement, TableProps>(function Table(
|
|
|
14
14
|
ref
|
|
15
15
|
) {
|
|
16
16
|
return (
|
|
17
|
-
<table ref={ref} data-
|
|
17
|
+
<table ref={ref} data-fs-table data-testid={testId} {...otherProps}>
|
|
18
18
|
{children}
|
|
19
19
|
</table>
|
|
20
20
|
)
|
|
@@ -32,8 +32,8 @@ describe('Hero', () => {
|
|
|
32
32
|
const heroImage = getByTestId('store-hero-image')
|
|
33
33
|
const heroHeading = getByTestId('store-hero-heading')
|
|
34
34
|
|
|
35
|
-
it('`Hero` component should have `data-
|
|
36
|
-
expect(hero).toHaveAttribute('data-
|
|
35
|
+
it('`Hero` component should have `data-fs-hero` attribute', () => {
|
|
36
|
+
expect(hero).toHaveAttribute('data-fs-hero')
|
|
37
37
|
})
|
|
38
38
|
|
|
39
39
|
it('`Hero` component should have custom data attribute `data-custom-attribute`', () => {
|
|
@@ -14,7 +14,7 @@ const Hero = forwardRef<HTMLDivElement, HeroProps>(function Hero(
|
|
|
14
14
|
ref
|
|
15
15
|
) {
|
|
16
16
|
return (
|
|
17
|
-
<article ref={ref} data-
|
|
17
|
+
<article ref={ref} data-fs-hero data-testid={testId} {...otherProps}>
|
|
18
18
|
{children}
|
|
19
19
|
</article>
|
|
20
20
|
)
|
|
@@ -32,7 +32,7 @@ describe('OutOfStock', () => {
|
|
|
32
32
|
const outOfStockMessage = screen.getByTestId('store-out-of-stock-message')
|
|
33
33
|
const outOfStockForm = screen.getByTestId('store-out-of-stock-form')
|
|
34
34
|
|
|
35
|
-
expect(outOfStock).toHaveAttribute('data-
|
|
35
|
+
expect(outOfStock).toHaveAttribute('data-fs-out-of-stock')
|
|
36
36
|
expect(outOfStockForm).toHaveAttribute('data-out-of-stock-form')
|
|
37
37
|
expect(outOfStockTitle).toHaveAttribute('data-out-of-stock-title')
|
|
38
38
|
expect(outOfStockMessage).toHaveAttribute('data-out-of-stock-message')
|
|
@@ -28,7 +28,7 @@ const OutOfStock = ({
|
|
|
28
28
|
...otherProps
|
|
29
29
|
}: OutOfStockProps) => {
|
|
30
30
|
return (
|
|
31
|
-
<section data-
|
|
31
|
+
<section data-fs-out-of-stock data-testid={testId}>
|
|
32
32
|
<Form data-out-of-stock-form testId={`${testId}-form`} {...otherProps}>
|
|
33
33
|
{children}
|
|
34
34
|
</Form>
|