Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix stories and snapshots

dominik-zeglen622ccf1f4efe
diff --git a/saleor/static/dashboard-next/categories/fixtures.ts b/saleor/static/dashboard-next/categories/fixtures.ts
index 91d8ef75f8..6909d428c4 100644
--- a/saleor/static/dashboard-next/categories/fixtures.ts
+++ b/saleor/static/dashboard-next/categories/fixtures.ts
@@ -66,6 +66,11 @@ export const category: (
placeholderImage: string
) => CategoryDetails_category = (placeholderImage: string) => ({
__typename: "Category",
+ backgroundImage: {
+ __typename: "Image",
+ alt: "Alt text",
+ url: placeholderImage
+ },
children: {
__typename: "CategoryCountableConnection",
edges: []
diff --git a/saleor/static/dashboard-next/collections/fixtures.ts b/saleor/static/dashboard-next/collections/fixtures.ts
index ef352e4d9f..5225803cd7 100644
--- a/saleor/static/dashboard-next/collections/fixtures.ts
+++ b/saleor/static/dashboard-next/collections/fixtures.ts
@@ -33,6 +33,7 @@ export const collection: (
__typename: "Collection",
backgroundImage: {
__typename: "Image",
+ alt: "Alt text",
url: placeholderCollectionImage
},
description: "Lorem ipsum dolor sit amet",
diff --git a/saleor/static/dashboard-next/orders/fixtures.ts b/saleor/static/dashboard-next/orders/fixtures.ts
index 32c77313fa..50edea3aff 100644
--- a/saleor/static/dashboard-next/orders/fixtures.ts
+++ b/saleor/static/dashboard-next/orders/fixtures.ts
@@ -795,6 +795,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
streetAddress1: "487 Roberto Shores",
streetAddress2: ""
},
+ canFinalize: true,
created: "2018-09-11T09:37:28.185874+00:00",
customerNote: "Lorem ipsum dolor sit amet",
events: [
@@ -826,6 +827,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
orderLine: {
__typename: "OrderLine",
id: "T3JkZXJMaW5lOjIz",
+ isShippingRequired: false,
productName: "Williams, Garcia and Walker (XS)",
productSku: "5-1337",
quantity: 2,
@@ -862,6 +864,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
orderLine: {
__typename: "OrderLine",
id: "T3JkZXJMaW5lOjIz",
+ isShippingRequired: false,
productName: "Williams, Garcia and Walker (XS)",
productSku: "5-1337",
quantity: 2,
@@ -893,6 +896,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
{
__typename: "OrderLine",
id: "T3JkZXJMaW5lOjIy",
+ isShippingRequired: true,
productName: "Watkins-Gonzalez (Soft)",
productSku: "59-1337",
quantity: 3,
@@ -915,6 +919,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
{
__typename: "OrderLine",
id: "T3JkZXJMaW5lOjIz",
+ isShippingRequired: true,
productName: "Williams, Garcia and Walker (XS)",
productSku: "5-1337",
quantity: 2,
@@ -1001,11 +1006,12 @@ export const order = (placeholder: string): OrderDetails_order => ({
user: null,
userEmail: "[email protected]"
});
-export const draftOrder = (placeholder: string) => ({
+export const draftOrder = (placeholder: string): OrderDetails_order => ({
__typename: "Order" as "Order",
actions: [OrderAction.CAPTURE],
availableShippingMethods: null,
billingAddress: null,
+ canFinalize: true,
created: "2018-09-20T23:23:39.811428+00:00",
customerNote: "Lorem ipsum dolor sit",
events: [],
@@ -1015,6 +1021,7 @@ export const draftOrder = (placeholder: string) => ({
{
__typename: "OrderLine" as "OrderLine",
id: "T3JkZXJMaW5lOjQ1",
+ isShippingRequired: false,
productName: "Davis Group (Hard)",
productSku: "58-1338",
quantity: 2,
@@ -1037,6 +1044,7 @@ export const draftOrder = (placeholder: string) => ({
{
__typename: "OrderLine" as "OrderLine",
id: "T3JkZXJMaW5lOjQ2",
+ isShippingRequired: false,
productName: "Anderson PLC (15-1337)",
productSku: "15-1337",
quantity: 2,
diff --git a/saleor/static/dashboard-next/products/fixtures.ts b/saleor/static/dashboard-next/products/fixtures.ts
index 0faf85d395..7597190718 100644
--- a/saleor/static/dashboard-next/products/fixtures.ts
+++ b/saleor/static/dashboard-next/products/fixtures.ts
@@ -258,6 +258,8 @@ export const product: (
amount: 678.78,
currency: "USD"
},
+ quantity: 12,
+ quantityAllocated: 1,
sku: "87192-94370",
stockQuantity: 48
},
@@ -279,6 +281,8 @@ export const product: (
margin: 7,
name: "silver",
priceOverride: null,
+ quantity: 12,
+ quantityAllocated: 1,
sku: "69055-15190",
stockQuantity: 14
}
diff --git a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
index 0008d53e28..062b46ffdf 100644
--- a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
+++ b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
@@ -7803,16 +7803,102 @@ exports[`Storyshots Views / Categories / Update category default 1`] = `
<div
class="MuiCardContent-root-id"
>
- <div>
+ <div
+ class="ImageTile-imageContainer-id"
+ >
<div
- class="CategoryBackgroundComponent-imageContainer-id"
+ class="ImageTile-imageOverlay-id"
>
- <span
- class="Skeleton-skeleton-id"
+ <div
+ class="ImageTile-imageOverlayToolbar-id"
>
- ‌
- </span>
+ <button
+ class="MuiButtonBase-root-id MuiIconButton-root-id MuiIconButton-colorSecondary-id"
+ tabindex="0"
+ type="button"
+ >
+ <span
+ class="MuiIconButton-label-id"
+ >
+ <svg
+ aria-hidden="true"
+ class="MuiSvgIcon-root-id"
+ focusable="false"
+ role="presentation"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
+ />
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ />
+ </svg>
+ </span>
+ </button>
+ </div>
+ </div>
+ <img
+ alt="Alt text"
+ class="ImageTile-image-id"
+ src="placeholder255x255.png"
+ />
+ </div>
+ </div>
+ <hr
+ class="Hr-root-id"
+ />
+ <div
+ class="MuiCardContent-root-id"
+ >
+ <div
+ class="MuiFormControl-root-id MuiFormControl-fullWidth-id"
+ >
+ <label
+ class="MuiFormLabel-root-id MuiFormLabel-filled-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"
+ data-shrink="true"
+ >
+ Description
+ </label>
+ <div
+ class="MuiInputBase-root-id MuiInput-root-id MuiInput-underline-id MuiInputBase-fullWidth-id MuiInput-fullWidth-id MuiInputBase-formControl-id MuiInput-formControl-id MuiInputBase-multiline-id MuiInput-multiline-id"
+ >
+ <div
+ class="MuiPrivateTextarea-root-id"
+ >
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ />
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ >
+ Alt text
+ </textarea>
+ <textarea
+ aria-invalid="false"
+ class="MuiPrivateTextarea-textarea-id MuiInputBase-input-id MuiInput-input-id MuiInputBase-inputMultiline-id MuiInput-inputMultiline-id"
+ name="backgroundImageAlt"
+ rows="1"
+ style="height:19px"
+ >
+ Alt text
+ </textarea>
+ </div>
</div>
+ <p
+ class="MuiFormHelperText-root-id MuiFormHelperText-filled-id"
+ >
+ Optional
+ </p>
</div>
</div>
</div>
@@ -8819,16 +8905,102 @@ exports[`Storyshots Views / Categories / Update category no background 1`] = `
<div
class="MuiCardContent-root-id"
>
- <div>
+ <div
+ class="ImageTile-imageContainer-id"
+ >
<div
- class="CategoryBackgroundComponent-imageContainer-id"
+ class="ImageTile-imageOverlay-id"
>
- <span
- class="Skeleton-skeleton-id"
+ <div
+ class="ImageTile-imageOverlayToolbar-id"
>
- ‌
- </span>
+ <button
+ class="MuiButtonBase-root-id MuiIconButton-root-id MuiIconButton-colorSecondary-id"
+ tabindex="0"
+ type="button"
+ >
+ <span
+ class="MuiIconButton-label-id"
+ >
+ <svg
+ aria-hidden="true"
+ class="MuiSvgIcon-root-id"
+ focusable="false"
+ role="presentation"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
+ />
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ />
+ </svg>
+ </span>
+ </button>
+ </div>
+ </div>
+ <img
+ alt="Alt text"
+ class="ImageTile-image-id"
+ src="placeholder255x255.png"
+ />
+ </div>
+ </div>
+ <hr
+ class="Hr-root-id"
+ />
+ <div
+ class="MuiCardContent-root-id"
+ >
+ <div
+ class="MuiFormControl-root-id MuiFormControl-fullWidth-id"
+ >
+ <label
+ class="MuiFormLabel-root-id MuiFormLabel-filled-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"
+ data-shrink="true"
+ >
+ Description
+ </label>
+ <div
+ class="MuiInputBase-root-id MuiInput-root-id MuiInput-underline-id MuiInputBase-fullWidth-id MuiInput-fullWidth-id MuiInputBase-formControl-id MuiInput-formControl-id MuiInputBase-multiline-id MuiInput-multiline-id"
+ >
+ <div
+ class="MuiPrivateTextarea-root-id"
+ >
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ />
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ >
+ Alt text
+ </textarea>
+ <textarea
+ aria-invalid="false"
+ class="MuiPrivateTextarea-textarea-id MuiInputBase-input-id MuiInput-input-id MuiInputBase-inputMultiline-id MuiInput-inputMultiline-id"
+ name="backgroundImageAlt"
+ rows="1"
+ style="height:19px"
+ >
+ Alt text
+ </textarea>
+ </div>
</div>
+ <p
+ class="MuiFormHelperText-root-id MuiFormHelperText-filled-id"
+ >
+ Optional
+ </p>
</div>
</div>
</div>
@@ -9314,16 +9486,102 @@ exports[`Storyshots Views / Categories / Update category no products 1`] = `
<div
class="MuiCardContent-root-id"
>
- <div>
+ <div
+ class="ImageTile-imageContainer-id"
+ >
<div
- class="CategoryBackgroundComponent-imageContainer-id"
+ class="ImageTile-imageOverlay-id"
>
- <span
- class="Skeleton-skeleton-id"
+ <div
+ class="ImageTile-imageOverlayToolbar-id"
>
- ‌
- </span>
+ <button
+ class="MuiButtonBase-root-id MuiIconButton-root-id MuiIconButton-colorSecondary-id"
+ tabindex="0"
+ type="button"
+ >
+ <span
+ class="MuiIconButton-label-id"
+ >
+ <svg
+ aria-hidden="true"
+ class="MuiSvgIcon-root-id"
+ focusable="false"
+ role="presentation"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
+ />
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ />
+ </svg>
+ </span>
+ </button>
+ </div>
+ </div>
+ <img
+ alt="Alt text"
+ class="ImageTile-image-id"
+ src="placeholder255x255.png"
+ />
+ </div>
+ </div>
+ <hr
+ class="Hr-root-id"
+ />
+ <div
+ class="MuiCardContent-root-id"
+ >
+ <div
+ class="MuiFormControl-root-id MuiFormControl-fullWidth-id"
+ >
+ <label
+ class="MuiFormLabel-root-id MuiFormLabel-filled-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"
+ data-shrink="true"
+ >
+ Description
+ </label>
+ <div
+ class="MuiInputBase-root-id MuiInput-root-id MuiInput-underline-id MuiInputBase-fullWidth-id MuiInput-fullWidth-id MuiInputBase-formControl-id MuiInput-formControl-id MuiInputBase-multiline-id MuiInput-multiline-id"
+ >
+ <div
+ class="MuiPrivateTextarea-root-id"
+ >
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ />
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ >
+ Alt text
+ </textarea>
+ <textarea
+ aria-invalid="false"
+ class="MuiPrivateTextarea-textarea-id MuiInputBase-input-id MuiInput-input-id MuiInputBase-inputMultiline-id MuiInput-inputMultiline-id"
+ name="backgroundImageAlt"
+ rows="1"
+ style="height:19px"
+ >
+ Alt text
+ </textarea>
+ </div>
</div>
+ <p
+ class="MuiFormHelperText-root-id MuiFormHelperText-filled-id"
+ >
+ Optional
+ </p>
</div>
</div>
</div>
@@ -9815,16 +10073,102 @@ exports[`Storyshots Views / Categories / Update category no subcategories 1`] =
<div
class="MuiCardContent-root-id"
>
- <div>
+ <div
+ class="ImageTile-imageContainer-id"
+ >
<div
- class="CategoryBackgroundComponent-imageContainer-id"
+ class="ImageTile-imageOverlay-id"
>
- <span
- class="Skeleton-skeleton-id"
+ <div
+ class="ImageTile-imageOverlayToolbar-id"
>
- ‌
- </span>
+ <button
+ class="MuiButtonBase-root-id MuiIconButton-root-id MuiIconButton-colorSecondary-id"
+ tabindex="0"
+ type="button"
+ >
+ <span
+ class="MuiIconButton-label-id"
+ >
+ <svg
+ aria-hidden="true"
+ class="MuiSvgIcon-root-id"
+ focusable="false"
+ role="presentation"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
+ />
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ />
+ </svg>
+ </span>
+ </button>
+ </div>
+ </div>
+ <img
+ alt="Alt text"
+ class="ImageTile-image-id"
+ src="placeholder255x255.png"
+ />
+ </div>
+ </div>
+ <hr
+ class="Hr-root-id"
+ />
+ <div
+ class="MuiCardContent-root-id"
+ >
+ <div
+ class="MuiFormControl-root-id MuiFormControl-fullWidth-id"
+ >
+ <label
+ class="MuiFormLabel-root-id MuiFormLabel-filled-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"
+ data-shrink="true"
+ >
+ Description
+ </label>
+ <div
+ class="MuiInputBase-root-id MuiInput-root-id MuiInput-underline-id MuiInputBase-fullWidth-id MuiInput-fullWidth-id MuiInputBase-formControl-id MuiInput-formControl-id MuiInputBase-multiline-id MuiInput-multiline-id"
+ >
+ <div
+ class="MuiPrivateTextarea-root-id"
+ >
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ />
+ <textarea
+ aria-hidden="true"
+ class="MuiPrivateTextarea-textarea-id MuiPrivateTextarea-shadow-id"
+ readonly=""
+ rows="1"
+ tabindex="-1"
+ >
+ Alt text
+ </textarea>
+ <textarea
+ aria-invalid="false"
+ class="MuiPrivateTextarea-textarea-id MuiInputBase-input-id MuiInput-input-id MuiInputBase-inputMultiline-id MuiInput-inputMultiline-id"
+ name="backgroundImageAlt"
+ rows="1"
+ style="height:19px"
+ >
+ Alt text
+ </textarea>
+ </div>
</div>
+ <p
+ class="MuiFormHelperText-root-id MuiFormHelperText-filled-id"
+ >
+ Optional
+ </p>
</div>
</div>
</div>
@@ -10349,6 +10693,7 @@ exports[`Storyshots Views / Collections / Collection details default 1`] = `
</div>
</div>
<img
+ alt="Alt text"
class="ImageTile-image-id"
src="block1.jpg"
/>
@@ -10364,8 +10709,8 @@ exports[`Storyshots Views / Collections / Collection details default 1`] = `
class="MuiFormControl-root-id MuiFormControl-fullWidth-id"
>
<label
- class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id"
- data-shrink="false"
+ class="MuiFormLabel-root-id MuiFormLabel-filled-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"
+ data-shrink="true"
>
Description
</label>
@@ -10388,18 +10733,22 @@ exports[`Storyshots Views / Collections / Collection details default 1`] = `
readonly=""
rows="1"
tabindex="-1"
- />
+ >
+ Alt text
+ </textarea>
<textarea
aria-invalid="false"
class="MuiPrivateTextarea-textarea-id MuiInputBase-input-id MuiInput-input-id MuiInputBase-inputMultiline-id MuiInput-inputMultiline-id"
name="backgroundImageAlt"
rows="1"
style="height:19px"
- />
+ >
+ Alt text
+ </textarea>
</div>
</div>
<p
- class="MuiFormHelperText-root-id"
+ class="MuiFormHelperText-root-id MuiFormHelperText-filled-id"
>
Optional
</p>
@@ -11958,6 +12307,7 @@ exports[`Storyshots Views / Collections / Collection details no products 1`] = `
</div>
</div>
<img
+ alt="Alt text"
class="ImageTile-image-id"
src="block1.jpg"
/>
@@ -11973,8 +12323,8 @@ exports[`Storyshots Views / Collections / Collection details no products 1`] = `
class="MuiFormControl-root-id MuiFormControl-fullWidth-id"
>
<label
- class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id"
- data-shrink="false"
+ class="MuiFormLabel-root-id MuiFormLabel-filled-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"
+ data-shrink="true"
>
Description
</label>
@@ -11997,18 +12347,22 @@ exports[`Storyshots Views / Collections / Collection details no products 1`] = `
readonly=""
rows="1"
tabindex="-1"
- />
+ >
+ Alt text
+ </textarea>
<textarea
aria-invalid="false"
class="MuiPrivateTextarea-textarea-id MuiInputBase-input-id MuiInput-input-id MuiInputBase-inputMultiline-id MuiInput-inputMultiline-id"
name="backgroundImageAlt"
rows="1"
style="height:19px"
- />
+ >
+ Alt text
+ </textarea>
</div>
</div>
<p
- class="MuiFormHelperText-root-id"
+ class="MuiFormHelperText-root-id MuiFormHelperText-filled-id"
>
Optional
</p>
@@ -36142,9 +36496,8 @@ exports[`Storyshots Views / Orders / Order draft default 1`] = `
</span>
</button>
<button
- class="MuiButtonBase-root-id MuiButtonBase-disabled-id MuiButton-root-id MuiButton-contained-id MuiButton-containedSecondary-id MuiButton-raised-id MuiButton-raisedSecondary-id MuiButton-disabled-id undefined"
- disabled=""
- tabindex="-1"
+ class="MuiButtonBase-root-id MuiButton-root-id MuiButton-contained-id MuiButton-containedSecondary-id MuiButton-raised-id MuiButton-raisedSecondary-id undefined"
+ tabindex="0"
type="button"
>
<span
@@ -37114,9 +37467,8 @@ exports[`Storyshots Views / Orders / Order draft without lines 1`] = `
</span>
</button>
<button
- class="MuiButtonBase-root-id MuiButtonBase-disabled-id MuiButton-root-id MuiButton-contained-id MuiButton-containedSecondary-id MuiButton-raised-id MuiButton-raisedSecondary-id MuiButton-disabled-id undefined"
- disabled=""
- tabindex="-1"
+ class="MuiButtonBase-root-id MuiButton-root-id MuiButton-contained-id MuiButton-containedSecondary-id MuiButton-raised-id MuiButton-raisedSecondary-id undefined"
+ tabindex="0"
type="button"
>
<span
@@ -49505,8 +49857,8 @@ exports[`Storyshots Views / Products / Product edit when product has no variants
class="MuiFormControl-root-id"
>
<label
- class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id"
- data-shrink="false"
+ class="MuiFormLabel-root-id MuiFormLabel-filled-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"
+ data-shrink="true"
>
Inventory
</label>
@@ -49518,12 +49870,13 @@ exports[`Storyshots Views / Products / Product edit when product has no variants
class="MuiInputBase-input-id MuiInput-input-id MuiInputBase-inputType-id MuiInput-inputType-id"
name="stockQuantity"
type="number"
+ value="12"
/>
</div>
<p
- class="MuiFormHelperText-root-id"
+ class="MuiFormHelperText-root-id MuiFormHelperText-filled-id"
>
- Allocated:
+ Allocated: 1
</p>
</div>
</div>
@@ -57479,7 +57832,7 @@ exports[`Storyshots Views / Vouchers / Voucher details default 1`] = `
<hr
class="CardTitle-hr-id"
/>
- <fieldset
+ <div
class="MuiFormControl-root-id VoucherProperties-formControl-id"
>
<div
@@ -57624,7 +57977,7 @@ exports[`Storyshots Views / Vouchers / Voucher details default 1`] = `
</span>
</label>
</div>
- </fieldset>
+ </div>
<div
class="MuiCardContent-root-id"
>
@@ -58089,7 +58442,7 @@ exports[`Storyshots Views / Vouchers / Voucher details when loading 1`] = `
<hr
class="CardTitle-hr-id"
/>
- <fieldset
+ <div
class="MuiFormControl-root-id VoucherProperties-formControl-id"
>
<div
@@ -58242,7 +58595,7 @@ exports[`Storyshots Views / Vouchers / Voucher details when loading 1`] = `
</span>
</label>
</div>
- </fieldset>
+ </div>
<div
class="MuiCardContent-root-id"
>
diff --git a/saleor/static/dashboard-next/storybook/mock.tsx b/saleor/static/dashboard-next/storybook/mock.tsx
index 9ad3eddf3b..b557db0da0 100644
--- a/saleor/static/dashboard-next/storybook/mock.tsx
+++ b/saleor/static/dashboard-next/storybook/mock.tsx
@@ -1,18 +1,16 @@
import * as React from "react";
interface ChoiceProviderProps {
- children:
- | ((
- props: {
- choices: Array<{
- label: string;
- value: string;
- }>;
- loading: boolean;
- fetchChoices(value: string);
- }
- ) => React.ReactElement<any>)
- | React.ReactNode;
+ children: ((
+ props: {
+ choices: Array<{
+ label: string;
+ value: string;
+ }>;
+ loading: boolean;
+ fetchChoices(value: string);
+ }
+ ) => React.ReactElement<any>);
choices: Array<{
label: string;
value: string;
@@ -66,13 +64,10 @@ export class ChoiceProvider extends React.Component<
};
render() {
- if (typeof this.props.children === "function") {
- return this.props.children({
- choices: this.state.choices,
- fetchChoices: this.handleChange,
- loading: this.state.loading
- });
- }
- return this.props.children;
+ return this.props.children({
+ choices: this.state.choices,
+ fetchChoices: this.handleChange,
+ loading: this.state.loading
+ });
}
}
diff --git a/saleor/static/dashboard-next/storybook/stories/categories/CategoryUpdatePage.tsx b/saleor/static/dashboard-next/storybook/stories/categories/CategoryUpdatePage.tsx
index 7c1d91757a..9151af124a 100644
--- a/saleor/static/dashboard-next/storybook/stories/categories/CategoryUpdatePage.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/categories/CategoryUpdatePage.tsx
@@ -34,7 +34,6 @@ const updateProps: Omit<CategoryUpdatePageProps, "classes"> = {
hasNextPage: true,
hasPreviousPage: true
},
- placeholderImage,
products: category.products.edges.map(edge => edge.node),
saveButtonBarState: "default",
subcategories: category.children.edges.map(edge => edge.node)
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductUpdatePage.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductUpdatePage.tsx
index 51a5460c75..6d8dd30dac 100644
--- a/saleor/static/dashboard-next/storybook/stories/products/ProductUpdatePage.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductUpdatePage.tsx
@@ -103,5 +103,6 @@ storiesOf("Views / Products / Product edit", module)
onImageDelete={() => undefined}
onVariantShow={() => undefined}
saveButtonBarState="default"
+ variants={undefined}
/>
));
diff --git a/saleor/static/dashboard-next/vouchers/components/VoucherProperties/VoucherProperties.tsx b/saleor/static/dashboard-next/vouchers/components/VoucherProperties/VoucherProperties.tsx
index 68f57f47b9..b53da2cb22 100644
--- a/saleor/static/dashboard-next/vouchers/components/VoucherProperties/VoucherProperties.tsx
+++ b/saleor/static/dashboard-next/vouchers/components/VoucherProperties/VoucherProperties.tsx
@@ -97,11 +97,7 @@ const VoucherProperties = withStyles(styles, { name: "VoucherProperties" })(
}: VoucherPropertiesProps) => (
<Card classes={{ root: classes.card }}>
<CardTitle title={i18n.t("Voucher type")} />
- <FormControl
- component="fieldset"
- required
- className={classes.formControl}
- >
+ <FormControl required className={classes.formControl}>
<RadioGroup name="type" value={data.type} onChange={onChange}>
<FormControlLabel
disabled={disabled}