Fix tests
This commit is contained in:
parent
d9d59624a7
commit
e798109ed3
2 changed files with 18 additions and 1 deletions
|
@ -5,6 +5,7 @@ import {
|
|||
ListActions,
|
||||
PageListProps,
|
||||
SearchPageProps,
|
||||
SortPage,
|
||||
TabPageProps
|
||||
} from "./types";
|
||||
|
||||
|
@ -141,3 +142,10 @@ export const fetchMoreProps: FetchMoreProps = {
|
|||
loading: false,
|
||||
onFetchMore: () => undefined
|
||||
};
|
||||
|
||||
export const sortPageProps: SortPage<string> = {
|
||||
onSort: () => undefined,
|
||||
sort: {
|
||||
asc: true
|
||||
}
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@ import React from "react";
|
|||
import placeholderImage from "@assets/images/placeholder255x255.png";
|
||||
import { defaultListSettings } from "@saleor/config";
|
||||
import { products as productListFixture } from "@saleor/products/fixtures";
|
||||
import { ProductListUrlSortField } from "@saleor/products/urls";
|
||||
import { attributes } from "@saleor/productTypes/fixtures";
|
||||
import { ListViews } from "@saleor/types";
|
||||
import {
|
||||
|
@ -11,7 +12,8 @@ import {
|
|||
filterPageProps,
|
||||
filters,
|
||||
listActionsProps,
|
||||
pageListProps
|
||||
pageListProps,
|
||||
sortPageProps
|
||||
} from "../../../fixtures";
|
||||
import ProductListPage, {
|
||||
ProductListPageProps
|
||||
|
@ -25,6 +27,13 @@ const props: ProductListPageProps = {
|
|||
...pageListProps.default,
|
||||
...filterPageProps,
|
||||
...fetchMoreProps,
|
||||
...{
|
||||
...sortPageProps,
|
||||
sort: {
|
||||
...sortPageProps.sort,
|
||||
sort: ProductListUrlSortField.name
|
||||
}
|
||||
},
|
||||
availableInGridAttributes: attributes,
|
||||
defaultSettings: defaultListSettings[ListViews.PRODUCT_LIST],
|
||||
gridAttributes: attributes,
|
||||
|
|
Loading…
Reference in a new issue