-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10263 from woocommerce/issue/10162-dashboard-pars…
…ing-error [Resilience] Customize dashboard error message for parsing errors
- Loading branch information
Showing
14 changed files
with
235 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...mmerce/WooCommerceUITests/Mocks/mappings/jetpack-blogs/wc-analytics/reports_products.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/jetpack-blogs/161477129/rest-api/", | ||
"queryParameters": { | ||
"json": { | ||
"equalTo": "true" | ||
}, | ||
"path": { | ||
"matches": "\/wc-analytics\/reports\/products(.*)" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"data": [{ | ||
"product_id": 2130, | ||
"items_sold": 3, | ||
"net_revenue": 450, | ||
"orders_count": 3, | ||
"extended_info": { | ||
"name": "Black Coral shades", | ||
"price": 150, | ||
"image": "https:\/\/example.com\/wp-content\/uploads\/2020\/01\/Mask-Group-1.png?w=201", | ||
"permalink": "https:\/\/example.com\/product\/black-coral-shades\/", | ||
"stock_status": "instock", | ||
"stock_quantity": 0, | ||
"manage_stock": false, | ||
"low_stock_amount": 2, | ||
"category_ids": [], | ||
"sku": "" | ||
} | ||
}, { | ||
"product_id": 2123, | ||
"items_sold": 1, | ||
"net_revenue": 140, | ||
"orders_count": 1, | ||
"extended_info": { | ||
"name": "Malaya shades", | ||
"price": 140, | ||
"image": "https:\/\/example.com\/wp-content\/uploads\/2020\/01\/Mask-Group.png?w=201", | ||
"permalink": "https:\/\/example.com\/product\/malaya-shades\/", | ||
"stock_status": "instock", | ||
"stock_quantity": 0, | ||
"manage_stock": false, | ||
"low_stock_amount": 2, | ||
"category_ids": [], | ||
"sku": "" | ||
} | ||
}, { | ||
"product_id": 2132, | ||
"items_sold": 1, | ||
"net_revenue": 120, | ||
"orders_count": 1, | ||
"extended_info": { | ||
"name": "Rose Gold shades", | ||
"price": 120, | ||
"image": "https:\/\/example.com\/wp-content\/uploads\/2020\/01\/Mask-Group-2.png?w=201", | ||
"permalink": "https:\/\/example.com\/product\/rose-gold-shades\/", | ||
"stock_status": "instock", | ||
"stock_quantity": 0, | ||
"manage_stock": false, | ||
"low_stock_amount": 2, | ||
"category_ids": [], | ||
"sku": "" | ||
} | ||
}] | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
WooCommerce/WooCommerceUITests/Mocks/mappings/stats/stats_summary_day.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/summary/", | ||
"queryParameters": { | ||
"period": { | ||
"equalTo": "day" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{now format='yyyy-MM-dd'}}", | ||
"period": "day", | ||
"views": 0, | ||
"visitors": 0, | ||
"likes": 0, | ||
"reblogs": 0, | ||
"comments": 0, | ||
"followers": 1 | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
WooCommerce/WooCommerceUITests/Mocks/mappings/stats/stats_summary_month.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/summary/", | ||
"queryParameters": { | ||
"period": { | ||
"equalTo": "month" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{now format='yyyy-MM-dd'}}", | ||
"period": "month", | ||
"views": 0, | ||
"visitors": 0, | ||
"likes": 0, | ||
"reblogs": 0, | ||
"comments": 0, | ||
"followers": 1 | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
WooCommerce/WooCommerceUITests/Mocks/mappings/stats/stats_summary_week.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/summary/", | ||
"queryParameters": { | ||
"period": { | ||
"equalTo": "week" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{now format='yyyy-MM-dd'}}", | ||
"period": "week", | ||
"views": 0, | ||
"visitors": 0, | ||
"likes": 0, | ||
"reblogs": 0, | ||
"comments": 0, | ||
"followers": 1 | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
WooCommerce/WooCommerceUITests/Mocks/mappings/stats/stats_summary_year.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/summary/", | ||
"queryParameters": { | ||
"period": { | ||
"equalTo": "year" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{now format='yyyy-MM-dd'}}", | ||
"period": "year", | ||
"views": 0, | ||
"visitors": 0, | ||
"likes": 0, | ||
"reblogs": 0, | ||
"comments": 0, | ||
"followers": 1 | ||
} | ||
} | ||
} |
Oops, something went wrong.