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,
|
ListActions,
|
||||||
PageListProps,
|
PageListProps,
|
||||||
SearchPageProps,
|
SearchPageProps,
|
||||||
|
SortPage,
|
||||||
TabPageProps
|
TabPageProps
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|
||||||
|
@ -141,3 +142,10 @@ export const fetchMoreProps: FetchMoreProps = {
|
||||||
loading: false,
|
loading: false,
|
||||||
onFetchMore: () => undefined
|
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 placeholderImage from "@assets/images/placeholder255x255.png";
|
||||||
import { defaultListSettings } from "@saleor/config";
|
import { defaultListSettings } from "@saleor/config";
|
||||||
import { products as productListFixture } from "@saleor/products/fixtures";
|
import { products as productListFixture } from "@saleor/products/fixtures";
|
||||||
|
import { ProductListUrlSortField } from "@saleor/products/urls";
|
||||||
import { attributes } from "@saleor/productTypes/fixtures";
|
import { attributes } from "@saleor/productTypes/fixtures";
|
||||||
import { ListViews } from "@saleor/types";
|
import { ListViews } from "@saleor/types";
|
||||||
import {
|
import {
|
||||||
|
@ -11,7 +12,8 @@ import {
|
||||||
filterPageProps,
|
filterPageProps,
|
||||||
filters,
|
filters,
|
||||||
listActionsProps,
|
listActionsProps,
|
||||||
pageListProps
|
pageListProps,
|
||||||
|
sortPageProps
|
||||||
} from "../../../fixtures";
|
} from "../../../fixtures";
|
||||||
import ProductListPage, {
|
import ProductListPage, {
|
||||||
ProductListPageProps
|
ProductListPageProps
|
||||||
|
@ -25,6 +27,13 @@ const props: ProductListPageProps = {
|
||||||
...pageListProps.default,
|
...pageListProps.default,
|
||||||
...filterPageProps,
|
...filterPageProps,
|
||||||
...fetchMoreProps,
|
...fetchMoreProps,
|
||||||
|
...{
|
||||||
|
...sortPageProps,
|
||||||
|
sort: {
|
||||||
|
...sortPageProps.sort,
|
||||||
|
sort: ProductListUrlSortField.name
|
||||||
|
}
|
||||||
|
},
|
||||||
availableInGridAttributes: attributes,
|
availableInGridAttributes: attributes,
|
||||||
defaultSettings: defaultListSettings[ListViews.PRODUCT_LIST],
|
defaultSettings: defaultListSettings[ListViews.PRODUCT_LIST],
|
||||||
gridAttributes: attributes,
|
gridAttributes: attributes,
|
||||||
|
|
Loading…
Reference in a new issue