-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #1166 Cost Explorer (Usage and Cost) update
- Loading branch information
An Duong
committed
May 11, 2020
1 parent
d7da78f
commit 4494d6e
Showing
23 changed files
with
577 additions
and
341 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
179 changes: 32 additions & 147 deletions
179
...-analytics/billing/cost-explorer/__test__/__snapshots__/cost-explorer-table.test.tsx.snap
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,152 +1,37 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`CostExplorerTable should match a snapshot 1`] = ` | ||
<Fragment> | ||
<Component | ||
bordered={true} | ||
columns={ | ||
Array [ | ||
Object { | ||
"Footer": "Total", | ||
"Header": "Resource", | ||
"accessor": "resource", | ||
"columnProps": Object { | ||
"className": "capitalize", | ||
"width": 200, | ||
}, | ||
}, | ||
Object { | ||
"Footer": [Function], | ||
"Header": "Endpoints", | ||
"accessor": [Function], | ||
}, | ||
Object { | ||
"Footer": [Function], | ||
"Header": "API Calls", | ||
"accessor": [Function], | ||
}, | ||
Object { | ||
"Footer": [Function], | ||
"Header": "Cost", | ||
"accessor": [Function], | ||
}, | ||
] | ||
} | ||
data={ | ||
Array [ | ||
Object { | ||
"apiCalls": 1440, | ||
"cost": 784, | ||
"endpoints": 3, | ||
"resource": "contacts", | ||
"subRows": Array [ | ||
Object { | ||
"apiCalls": 440, | ||
"cost": 84, | ||
"endpoints": 1, | ||
"resource": "/contacts", | ||
}, | ||
Object { | ||
"apiCalls": 1200, | ||
"cost": 500, | ||
"endpoints": 1, | ||
"resource": "/contacts/{ID}", | ||
}, | ||
Object { | ||
"apiCalls": 800, | ||
"cost": 200, | ||
"endpoints": 1, | ||
"resource": "/contacts/{ID}", | ||
}, | ||
], | ||
}, | ||
Object { | ||
"apiCalls": 4000, | ||
"cost": 567, | ||
"endpoints": 9, | ||
"resource": "properties", | ||
"subRows": Array [ | ||
Object { | ||
"apiCalls": 1000, | ||
"cost": 400, | ||
"endpoints": 3, | ||
"resource": "/properties", | ||
}, | ||
Object { | ||
"apiCalls": 1000, | ||
"cost": 100, | ||
"endpoints": 3, | ||
"resource": "/properties/{ID}", | ||
}, | ||
Object { | ||
"apiCalls": 2000, | ||
"cost": 67, | ||
"endpoints": 3, | ||
"resource": "/properties/{ID}", | ||
}, | ||
], | ||
}, | ||
Object { | ||
"apiCalls": 6000, | ||
"cost": 594, | ||
"endpoints": 5, | ||
"resource": "developers", | ||
"subRows": Array [ | ||
Object { | ||
"apiCalls": 2000, | ||
"cost": 200, | ||
"endpoints": 1, | ||
"resource": "/developers", | ||
}, | ||
Object { | ||
"apiCalls": 3000, | ||
"cost": 200, | ||
"endpoints": 3, | ||
"resource": "/developers/{ID}", | ||
}, | ||
Object { | ||
"apiCalls": 1000, | ||
"cost": 194, | ||
"endpoints": 2, | ||
"resource": "/developers/{ID}", | ||
}, | ||
], | ||
}, | ||
Object { | ||
"apiCalls": 1500, | ||
"cost": 200, | ||
"endpoints": 10, | ||
"resource": "customers", | ||
"subRows": Array [ | ||
Object { | ||
"apiCalls": 500, | ||
"cost": 50, | ||
"endpoints": 5, | ||
"resource": "/customers", | ||
}, | ||
Object { | ||
"apiCalls": 1000, | ||
"cost": 50, | ||
"endpoints": 1, | ||
"resource": "/customers/{ID}", | ||
}, | ||
Object { | ||
"apiCalls": 500, | ||
"cost": 100, | ||
"endpoints": 4, | ||
"resource": "/customers/{ID}", | ||
}, | ||
], | ||
}, | ||
] | ||
<ContextProvider | ||
value={ | ||
Object { | ||
"store": Object { | ||
"clearActions": [Function], | ||
"dispatch": [Function], | ||
"getActions": [Function], | ||
"getState": [Function], | ||
"replaceReducer": [Function], | ||
"subscribe": [Function], | ||
}, | ||
"subscription": Subscription { | ||
"handleChangeWrapper": [Function], | ||
"listeners": Object { | ||
"notify": [Function], | ||
}, | ||
"onStateChange": [Function], | ||
"parentSub": undefined, | ||
"store": Object { | ||
"clearActions": [Function], | ||
"dispatch": [Function], | ||
"getActions": [Function], | ||
"getState": [Function], | ||
"replaceReducer": [Function], | ||
"subscribe": [Function], | ||
}, | ||
"unsubscribe": null, | ||
}, | ||
} | ||
expandable={true} | ||
scrollable={true} | ||
/> | ||
<p | ||
className="mt-5" | ||
> | ||
*All charges are subject to VAT. Your totals for each month will be sent to our Accounts Department and you will be automatically invoiced at the end of each billing period. | ||
</p> | ||
</Fragment> | ||
} | ||
> | ||
<CostExplorerTable /> | ||
</ContextProvider> | ||
`; |
68 changes: 33 additions & 35 deletions
68
...eloper-analytics/billing/cost-explorer/__test__/__snapshots__/cost-explorer.test.tsx.snap
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,39 +1,37 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`CostCalculator should match a snapshot 1`] = ` | ||
<Fragment> | ||
<Component> | ||
Cost Explorer: Cost & Usage | ||
</Component> | ||
<Component> | ||
<Component | ||
className="is-half-desktop" | ||
> | ||
<Component> | ||
<Component | ||
className="is-one-quarter" | ||
> | ||
<Component> | ||
Month | ||
</Component> | ||
</Component> | ||
<Component> | ||
<CostFilterForm | ||
initialValues={ | ||
Object { | ||
"createdMonth": "2019-10", | ||
} | ||
} | ||
onSave={[Function]} | ||
/> | ||
</Component> | ||
</Component> | ||
</Component> | ||
</Component> | ||
<Component> | ||
<Component> | ||
<CostExplorerTable /> | ||
</Component> | ||
</Component> | ||
</Fragment> | ||
<ContextProvider | ||
value={ | ||
Object { | ||
"store": Object { | ||
"clearActions": [Function], | ||
"dispatch": [Function], | ||
"getActions": [Function], | ||
"getState": [Function], | ||
"replaceReducer": [Function], | ||
"subscribe": [Function], | ||
}, | ||
"subscription": Subscription { | ||
"handleChangeWrapper": [Function], | ||
"listeners": Object { | ||
"notify": [Function], | ||
}, | ||
"onStateChange": [Function], | ||
"parentSub": undefined, | ||
"store": Object { | ||
"clearActions": [Function], | ||
"dispatch": [Function], | ||
"getActions": [Function], | ||
"getState": [Function], | ||
"replaceReducer": [Function], | ||
"subscribe": [Function], | ||
}, | ||
"unsubscribe": null, | ||
}, | ||
} | ||
} | ||
> | ||
<CostExplorer /> | ||
</ContextProvider> | ||
`; |
Oops, something went wrong.