diff --git a/src/components/Filter/reducer.test.ts b/src/components/Filter/reducer.test.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/orders/views/OrderList/__snapshots__/filters.test.ts.snap b/src/orders/views/OrderList/__snapshots__/filters.test.ts.snap index 77dd07779..732d10dce 100644 --- a/src/orders/views/OrderList/__snapshots__/filters.test.ts.snap +++ b/src/orders/views/OrderList/__snapshots__/filters.test.ts.snap @@ -1,91 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Crate filter chips 1`] = ` -Array [ - Object { - "label": "Date from 2019-09-01", - "onClick": [Function], - }, - Object { - "label": "Date to 2019-09-10", - "onClick": [Function], - }, - Object { - "label": "email@example.com", - "onClick": [Function], - }, - Object { - "label": "Fulfilled", - "onClick": [Function], - }, - Object { - "label": "Partially Fulfilled", - "onClick": [Function], - }, -] -`; - -exports[`Create filter object with date 1`] = ` -Object { - "dateFrom": "2019-09-01", - "dateTo": "2019-09-01", -} -`; - -exports[`Create filter object with date last month 1`] = ` -Object { - "dateFrom": "2019-09-01", - "dateTo": undefined, -} -`; - -exports[`Create filter object with date last week 1`] = ` -Object { - "dateFrom": "2019-09-01", - "dateTo": undefined, -} -`; - -exports[`Create filter object with date last year 1`] = ` -Object { - "dateFrom": "2019-09-01", - "dateTo": undefined, -} -`; - -exports[`Create filter object with date range 1`] = ` -Object { - "dateFrom": "2019-09-01", - "dateTo": "2019-09-10", -} -`; - -exports[`Create filter object with fulfillment status 1`] = ` -Object { - "status": Array [ - "PARTIALLY_FULFILLED", - ], -} -`; - -exports[`Create filter object with multiple deduped values 1`] = ` -Object { - "status": Array [ - "FULFILLED", - ], -} -`; - -exports[`Create filter object with multiple values 1`] = ` -Object { - "status": Array [ - "FULFILLED", - "PARTIALLY_FULFILLED", - ], -} -`; - -exports[`Get filter variables from multiple status value 1`] = ` +exports[`Get filter variables 1`] = ` Object { "created": Object { "gte": "2019-09-01", @@ -99,17 +14,3 @@ Object { ], } `; - -exports[`Get filter variables from single status value 1`] = ` -Object { - "created": Object { - "gte": "2019-09-01", - "lte": "2019-09-10", - }, - "customer": "email@example.com", - "search": "24", - "status": Array [ - "FULFILLED", - ], -} -`; diff --git a/src/products/views/ProductList/__snapshots__/filters.test.ts.snap b/src/products/views/ProductList/__snapshots__/filters.test.ts.snap index 20fe2f275..5f3c7e2c2 100644 --- a/src/products/views/ProductList/__snapshots__/filters.test.ts.snap +++ b/src/products/views/ProductList/__snapshots__/filters.test.ts.snap @@ -1,61 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Crate filter chips 1`] = ` -Array [ - Object { - "label": "Price from $10.00", - "onClick": [Function], - }, - Object { - "label": "Price to $20.00", - "onClick": [Function], - }, - Object { - "label": "Available", - "onClick": [Function], - }, - Object { - "label": "Published", - "onClick": [Function], - }, -] -`; - -exports[`Create filter object with price 1`] = ` -Object { - "priceFrom": "10", - "priceTo": "10", -} -`; - -exports[`Create filter object with price range 1`] = ` -Object { - "priceFrom": Array [ - "10", - "20", - ], - "priceTo": Array [ - "10", - "20", - ], -} -`; - -exports[`Create filter object with publication status 1`] = ` -Object { - "isPublished": "false", -} -`; - -exports[`Create filter object with stock status 1`] = ` -Object { - "status": "OUT_OF_STOCK", -} -`; - exports[`Get filter variables 1`] = ` Object { - "isPublished": true, + "isPublished": false, "price": Object { "gte": 10, "lte": 20, diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index e977ef717..b5a8203f5 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -1388,64 +1388,688 @@ exports[`Storyshots Generics / Filter default 1`] = ` style="padding:24px" >
- - | -
-
-
-
- No. of Order
-
-
- |
-
-
-
-
- Date
-
- |
-
-
-
-
- Customer
-
- |
-
-
-
-
- Payment
-
- |
-
-
-
-
- Fulfillment status
-
- |
-
-
-
-
- Total
-
- |
-
---|---|---|---|---|---|---|
- | - -||||||
- - | -- #20 - | -- - | -- Laura Stone 1 2 - | -
-
- Fully paid
-
- |
-
-
- Cancelled
-
- |
- - $305.17 - | -
- - | -- #19 - | -- - | -- Elizabeth Vaughn - | -
-
- Fully paid
-
- |
-
-
- Cancelled
-
- |
- - $1,215.89 - | -
- - | -- #18 - | -- - | -- david.lawson@example.com - | -
-
- Unpaid
-
- |
-
-
- Draft
-
- |
- - $321.71 - | -
- - | -- #17 - | -- - | -- Aaron Randall - | -
-
- Unpaid
-
- |
-
-
- Cancelled
-
- |
- - $271.95 - | -
- - | -- #16 - | -- - | -- Laura Jensen - | -
-
- Unpaid
-
- |
-
-
- Cancelled
-
- |
- - $335.84 - | -
- - | -- #15 - | -- - | -- Jenna Villa - | -
-
- Unpaid
-
- |
-
-
- Cancelled
-
- |
- - $1,042.15 - | -
- - | -- #14 - | -- - | -- Wesley Davis - | -
-
- Unpaid
-
- |
-
-
- Cancelled
-
- |
- - $213.69 - | -
- - | -- #13 - | -- - | -- Anthony Gonzalez - | -
-
- Unpaid
-
- |
-
-
- Cancelled
-
- |
- - $367.03 - | -
- - | -- #12 - | -- - | -- Denise Freeman - | -
-
- Unpaid
-
- |
-
-
- Cancelled
-
- |
- - $298.76 - | -
- - | -- #11 - | -- - | -- James Ball - | -
-
- Fully paid
-
- |
-
-
- Unfulfilled
-
- |
- - $663.69 - | -
- - | -- #10 - | -- - | -- Michael Martinez - | -
-
- Unpaid
-
- |
-
-
- Cancelled
-
- |
- - $280.41 - | -
- - | -- #9 - | -- - | -- Melissa Simon - | -
-
- Unpaid
-
- |
-
-
- Partially fulfilled
-
- |
- - $234.93 - | -
- - | -- #8 - | -- - | -- Justin Mccoy - | -
-
- Unpaid
-
- |
-
-
- Partially fulfilled
-
- |
- - $485.19 - | -
- - | -- #7 - | -- - | -- Anthony Gonzalez - | -
-
- Fully paid
-
- |
-
-
- Partially fulfilled
-
- |
- - $223.54 - | -
- - | -- #6 - | -- - | -- Bradley Ford - | -
-
- Unpaid
-
- |
-
-
- Fulfilled
-
- |
- - $237.55 - | -
- - | -- #5 - | -- - | -- David Lawson - | -
-
- Unpaid
-
- |
-
-
- Partially fulfilled
-
- |
- - $453.55 - | -
- - | -- #4 - | -- - | -- Lauren Watson - | -
-
- Unpaid
-
- |
-
-
- Partially fulfilled
-
- |
- - $812.67 - | -
- - | -- #3 - | -- - | -- Mark Lee - | -
-
- Unpaid
-
- |
-
-
- Partially fulfilled
-
- |
- - $481.41 - | -
- - | -- #2 - | -- - | -- Kara Murphy - | -
-
- Fully paid
-
- |
-
-
- Partially fulfilled
-
- |
- - $569.19 - | -
- - | -- #1 - | -- - | -- Curtis Bailey - | -
-
- Fully paid
-
- |
-
-
- Partially fulfilled
-
- |
- - $557.00 - | -
- - | -
-
-
-
-
- Name
-
-
-
- |
-
-
-
-
- Type
-
- |
-
-
-
-
- Published
-
- |
-
-
-
-
- Price
-
- |
-
---|---|---|---|---|
- | - -||||
- - | -
-
-
-
-
- ![]()
- Nebula Night Sky Paint
-
- |
- - Paint - | -
-
- Published
-
- |
- - $15.00 - | -
- - | -
-
-
-
-
- ![]()
- Light Speed Yellow Paint
-
- |
- - Paint - | -
-
- Published
-
- |
- - $15.00 - | -
- - | -
-
-
-
-
- ![]()
- Hyperspace Turquoise Paint
-
- |
- - Paint - | -
-
- Published
-
- |
- - $15.00 - | -
- - | -
-
-
-
-
- ![]()
- Pineapple Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Coconut Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Apple Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Orange Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Banana Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Bean Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Carrot Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Green Juice
-
- |
- - Juice - | -
-
- Published
-
- |
- - $3.00 - | -
- - | -
-
-
-
-
- ![]()
- Code Division T-shirt
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Polo Shirt
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Polo Shirt
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Polo Shirt
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Polo Shirt
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Black Hoodie
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Blue Hoodie
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Mustard Hoodie
-
- |
- - Top (clothing) - | -
-
- Published
-
- |
- - $30.00 - | -
- - | -
-
-
-
-
- ![]()
- Colored Parrot Cushion
-
- |
- - Cushion - | -
-
- Published
-
- |
- - $20.00 - | -