-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into 11525-change-due-calculator-ui-part-3
- Loading branch information
Showing
44 changed files
with
1,559 additions
and
1,405 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
106 changes: 66 additions & 40 deletions
106
WooCommerce/src/androidTest/assets/mocks/mappings/stats/stats_visits-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 |
---|---|---|
@@ -1,44 +1,70 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/", | ||
"queryParameters": { | ||
"unit": { | ||
"equalTo": "month" | ||
}, | ||
"quantity": { | ||
"matches": "[0-9]+" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
}, | ||
"stat_fields": { | ||
"matches": "visitors" | ||
} | ||
} | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/", | ||
"queryParameters": { | ||
"unit": { | ||
"equalTo": "day" | ||
}, | ||
"quantity": { | ||
"matches": "(28|29|30|31)" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
}, | ||
"stat_fields": { | ||
"equalTo": "visitors" | ||
}, | ||
"locale": { | ||
"matches": "(.*)" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{fnow format='yyyy-MM-dd'}}", | ||
"unit": "day", | ||
"fields": [ | ||
"period", | ||
"visitors" | ||
], | ||
"data": [ | ||
["{{fnow offset='-29 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-28 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-27 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-26 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-25 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-24 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-23 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-22 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-21 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-20 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-19 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-18 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-17 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-16 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-15 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-14 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-13 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-12 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-11 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-10 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-9 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-8 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-7 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-6 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-5 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-4 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-3 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-2 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow offset='-1 days' format='yyyy-MM-dd'}}", 0], | ||
["{{fnow format='yyyy-MM-dd'}}", 440] | ||
] | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{#assign 'currentYear'}}{{fnow format='yyyy'}}{{/assign}}{{currentYear}}-10-01", | ||
"unit": "month", | ||
"fields": [ | ||
"period", | ||
"visitors" | ||
], | ||
"data": [ | ||
["{{currentYear}}-12-01", 12000], | ||
["{{currentYear}}-01-01", 0], | ||
["{{currentYear}}-02-01", 0], | ||
["{{currentYear}}-03-01", 0], | ||
["{{currentYear}}-04-01", 0], | ||
["{{currentYear}}-05-01", 0], | ||
["{{currentYear}}-06-01", 0], | ||
["{{currentYear}}-07-01", 0], | ||
["{{currentYear}}-08-01", 0], | ||
["{{currentYear}}-09-01", 0], | ||
["{{currentYear}}-10-01", 0] | ||
] | ||
} | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Connection": "keep-alive" | ||
} | ||
} | ||
} |
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
76 changes: 41 additions & 35 deletions
76
WooCommerce/src/androidTest/assets/mocks/mappings/stats/stats_visits-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 |
---|---|---|
@@ -1,38 +1,44 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/", | ||
"queryParameters": { | ||
"unit": { | ||
"equalTo": "year" | ||
}, | ||
"quantity": { | ||
"matches": "[0-9]+" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
}, | ||
"stat_fields": { | ||
"matches": "visitors" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{fnow format='yyyy-MM-dd'}}", | ||
"unit": "year", | ||
"fields": [ | ||
"period", | ||
"visitors" | ||
], | ||
"data": [ | ||
["{{fnow offset='-4 years' format='yyyy-MM-dd'}}", 500], | ||
["{{fnow offset='-3 years' format='yyyy-MM-dd'}}", 900], | ||
["{{fnow offset='-2 years' format='yyyy-MM-dd'}}", 1200], | ||
["{{fnow offset='-1 years' format='yyyy-MM-dd'}}", 1350], | ||
["{{fnow format='yyyy-MM-dd'}}", 1299] | ||
] | ||
} | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/", | ||
"queryParameters": { | ||
"unit": { | ||
"equalTo": "month" | ||
}, | ||
"quantity": { | ||
"matches": "[0-9]+" | ||
}, | ||
"date": { | ||
"matches": "(.*)" | ||
}, | ||
"stat_fields": { | ||
"matches": "visitors" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date": "{{#assign 'currentYear'}}{{fnow format='yyyy'}}{{/assign}}{{currentYear}}-10-01", | ||
"unit": "month", | ||
"fields": [ | ||
"period", | ||
"visitors" | ||
], | ||
"data": [ | ||
["{{currentYear}}-12-01", 12000], | ||
["{{currentYear}}-01-01", 0], | ||
["{{currentYear}}-02-01", 0], | ||
["{{currentYear}}-03-01", 0], | ||
["{{currentYear}}-04-01", 0], | ||
["{{currentYear}}-05-01", 0], | ||
["{{currentYear}}-06-01", 0], | ||
["{{currentYear}}-07-01", 0], | ||
["{{currentYear}}-08-01", 0], | ||
["{{currentYear}}-09-01", 0], | ||
["{{currentYear}}-10-01", 0] | ||
] | ||
} | ||
} | ||
} |
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
Oops, something went wrong.