Fix tests
This commit is contained in:
parent
e2b48e30e6
commit
13458a929b
2 changed files with 232 additions and 286 deletions
|
@ -69,7 +69,7 @@ const props: ProductVariantCreateContentProps = {
|
||||||
},
|
},
|
||||||
dispatchFormDataAction: () => undefined,
|
dispatchFormDataAction: () => undefined,
|
||||||
errors: [],
|
errors: [],
|
||||||
step: "attributes"
|
step: "values"
|
||||||
};
|
};
|
||||||
|
|
||||||
storiesOf("Views / Products / Create multiple variants", module)
|
storiesOf("Views / Products / Create multiple variants", module)
|
||||||
|
@ -85,10 +85,7 @@ storiesOf("Views / Products / Create multiple variants", module)
|
||||||
</Card>
|
</Card>
|
||||||
))
|
))
|
||||||
.addDecorator(Decorator)
|
.addDecorator(Decorator)
|
||||||
.add("choose attributes", () => <ProductVariantCreateContent {...props} />)
|
.add("choose values", () => <ProductVariantCreateContent {...props} />)
|
||||||
.add("select values", () => (
|
|
||||||
<ProductVariantCreateContent {...props} step="values" />
|
|
||||||
))
|
|
||||||
.add("prices and SKU", () => (
|
.add("prices and SKU", () => (
|
||||||
<ProductVariantCreateContent {...props} step="prices" />
|
<ProductVariantCreateContent {...props} step="prices" />
|
||||||
));
|
));
|
||||||
|
@ -118,6 +115,7 @@ storiesOf("Views / Products / Create multiple variants", module)
|
||||||
.add("interactive", () => (
|
.add("interactive", () => (
|
||||||
<ProductVariantCreateDialog
|
<ProductVariantCreateDialog
|
||||||
{...props}
|
{...props}
|
||||||
|
defaultPrice="10.99"
|
||||||
open={true}
|
open={true}
|
||||||
onClose={() => undefined}
|
onClose={() => undefined}
|
||||||
onSubmit={() => undefined}
|
onSubmit={() => undefined}
|
||||||
|
|
|
@ -83462,7 +83462,7 @@ exports[`Storyshots Views / Products / Create multiple variants / summary errors
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Storyshots Views / Products / Create multiple variants choose attributes 1`] = `
|
exports[`Storyshots Views / Products / Create multiple variants choose values 1`] = `
|
||||||
<div
|
<div
|
||||||
style="padding:24px"
|
style="padding:24px"
|
||||||
>
|
>
|
||||||
|
@ -83478,7 +83478,7 @@ exports[`Storyshots Views / Products / Create multiple variants choose attribute
|
||||||
class="ProductVariantCreateTabs-root-id"
|
class="ProductVariantCreateTabs-root-id"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ProductVariantCreateTabs-tab-id"
|
class="ProductVariantCreateTabs-tab-id ProductVariantCreateTabs-tabActive-id ProductVariantCreateTabs-tabUnderline-id"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="MuiTypography-root-id MuiTypography-caption-id ProductVariantCreateTabs-label-id"
|
class="MuiTypography-root-id MuiTypography-caption-id ProductVariantCreateTabs-label-id"
|
||||||
|
@ -83507,7 +83507,233 @@ exports[`Storyshots Views / Products / Create multiple variants choose attribute
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="Hook-root-id"
|
class="Hook-root-id"
|
||||||
/>
|
>
|
||||||
|
<h5
|
||||||
|
class="MuiTypography-root-id MuiTypography-h5-id MuiTypography-colorTextSecondary-id"
|
||||||
|
>
|
||||||
|
Box Size
|
||||||
|
</h5>
|
||||||
|
<hr
|
||||||
|
class="Hr-root-id Hook-hr-id"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="Hook-valueContainer-id"
|
||||||
|
>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id Checkbox-checked-id"
|
||||||
|
name="value:100g"
|
||||||
|
type="checkbox"
|
||||||
|
value="true"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
100g
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id"
|
||||||
|
name="value:250g"
|
||||||
|
type="checkbox"
|
||||||
|
value="false"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
250g
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id Checkbox-checked-id"
|
||||||
|
name="value:500g"
|
||||||
|
type="checkbox"
|
||||||
|
value="true"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
500g
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id"
|
||||||
|
name="value:1kg"
|
||||||
|
type="checkbox"
|
||||||
|
value="false"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
1kg
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<h5
|
||||||
|
class="MuiTypography-root-id MuiTypography-h5-id MuiTypography-colorTextSecondary-id"
|
||||||
|
>
|
||||||
|
Coffee Genre
|
||||||
|
</h5>
|
||||||
|
<hr
|
||||||
|
class="Hr-root-id Hook-hr-id"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="Hook-valueContainer-id"
|
||||||
|
>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id Checkbox-checked-id"
|
||||||
|
name="value:arabica"
|
||||||
|
type="checkbox"
|
||||||
|
value="true"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
Arabica
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id"
|
||||||
|
name="value:robusta"
|
||||||
|
type="checkbox"
|
||||||
|
value="false"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
Robusta
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<h5
|
||||||
|
class="MuiTypography-root-id MuiTypography-h5-id MuiTypography-colorTextSecondary-id"
|
||||||
|
>
|
||||||
|
Collar
|
||||||
|
</h5>
|
||||||
|
<hr
|
||||||
|
class="Hr-root-id Hook-hr-id"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="Hook-valueContainer-id"
|
||||||
|
>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id Checkbox-checked-id"
|
||||||
|
name="value:round"
|
||||||
|
type="checkbox"
|
||||||
|
value="true"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
Round
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id"
|
||||||
|
name="value:v-neck"
|
||||||
|
type="checkbox"
|
||||||
|
value="false"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
V-Neck
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="MuiButtonBase-root-id Checkbox-root-id"
|
||||||
|
tabindex="0"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="Checkbox-box-id Checkbox-checked-id"
|
||||||
|
name="value:polo"
|
||||||
|
type="checkbox"
|
||||||
|
value="true"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
||||||
|
>
|
||||||
|
Polo
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84070,284 +84296,6 @@ exports[`Storyshots Views / Products / Create multiple variants prices and SKU 1
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Storyshots Views / Products / Create multiple variants select values 1`] = `
|
|
||||||
<div
|
|
||||||
style="padding:24px"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="MuiPaper-root-id MuiPaper-elevation1-id MuiPaper-rounded-id MuiCard-root-id"
|
|
||||||
style="margin:auto;overflow:visible;width:800px"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="MuiCardContent-root-id"
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<div
|
|
||||||
class="ProductVariantCreateTabs-root-id"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="ProductVariantCreateTabs-tab-id ProductVariantCreateTabs-tabActive-id ProductVariantCreateTabs-tabUnderline-id"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-caption-id ProductVariantCreateTabs-label-id"
|
|
||||||
>
|
|
||||||
Select Values
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="ProductVariantCreateTabs-tab-id"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-caption-id ProductVariantCreateTabs-label-id"
|
|
||||||
>
|
|
||||||
Prices and SKU
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="ProductVariantCreateTabs-tab-id"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-caption-id ProductVariantCreateTabs-label-id"
|
|
||||||
>
|
|
||||||
Summary
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="Hook-root-id"
|
|
||||||
>
|
|
||||||
<h5
|
|
||||||
class="MuiTypography-root-id MuiTypography-h5-id MuiTypography-colorTextSecondary-id"
|
|
||||||
>
|
|
||||||
Box Size
|
|
||||||
</h5>
|
|
||||||
<hr
|
|
||||||
class="Hr-root-id Hook-hr-id"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="Hook-valueContainer-id"
|
|
||||||
>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id Checkbox-checked-id"
|
|
||||||
name="value:100g"
|
|
||||||
type="checkbox"
|
|
||||||
value="true"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
100g
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id"
|
|
||||||
name="value:250g"
|
|
||||||
type="checkbox"
|
|
||||||
value="false"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
250g
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id Checkbox-checked-id"
|
|
||||||
name="value:500g"
|
|
||||||
type="checkbox"
|
|
||||||
value="true"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
500g
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id"
|
|
||||||
name="value:1kg"
|
|
||||||
type="checkbox"
|
|
||||||
value="false"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
1kg
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<h5
|
|
||||||
class="MuiTypography-root-id MuiTypography-h5-id MuiTypography-colorTextSecondary-id"
|
|
||||||
>
|
|
||||||
Coffee Genre
|
|
||||||
</h5>
|
|
||||||
<hr
|
|
||||||
class="Hr-root-id Hook-hr-id"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="Hook-valueContainer-id"
|
|
||||||
>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id Checkbox-checked-id"
|
|
||||||
name="value:arabica"
|
|
||||||
type="checkbox"
|
|
||||||
value="true"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
Arabica
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id"
|
|
||||||
name="value:robusta"
|
|
||||||
type="checkbox"
|
|
||||||
value="false"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
Robusta
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<h5
|
|
||||||
class="MuiTypography-root-id MuiTypography-h5-id MuiTypography-colorTextSecondary-id"
|
|
||||||
>
|
|
||||||
Collar
|
|
||||||
</h5>
|
|
||||||
<hr
|
|
||||||
class="Hr-root-id Hook-hr-id"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="Hook-valueContainer-id"
|
|
||||||
>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id Checkbox-checked-id"
|
|
||||||
name="value:round"
|
|
||||||
type="checkbox"
|
|
||||||
value="true"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
Round
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id"
|
|
||||||
name="value:v-neck"
|
|
||||||
type="checkbox"
|
|
||||||
value="false"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
V-Neck
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label
|
|
||||||
class="MuiFormControlLabel-root-id"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="MuiButtonBase-root-id Checkbox-root-id"
|
|
||||||
tabindex="0"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="Checkbox-box-id Checkbox-checked-id"
|
|
||||||
name="value:polo"
|
|
||||||
type="checkbox"
|
|
||||||
value="true"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<span
|
|
||||||
class="MuiTypography-root-id MuiTypography-body2-id MuiFormControlLabel-label-id"
|
|
||||||
>
|
|
||||||
Polo
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`Storyshots Views / Products / Create product When loading 1`] = `
|
exports[`Storyshots Views / Products / Create product When loading 1`] = `
|
||||||
<div
|
<div
|
||||||
style="padding:24px"
|
style="padding:24px"
|
||||||
|
|
Loading…
Reference in a new issue