-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(graphCardMetricTotals): ent-4366 expand data-test #838
fix(graphCardMetricTotals): ent-4366 expand data-test #838
Conversation
Codecov Report
@@ Coverage Diff @@
## ci #838 +/- ##
=======================================
Coverage 94.02% 94.02%
=======================================
Files 123 123
Lines 3514 3514
Branches 1344 1344
=======================================
Hits 3304 3304
Misses 193 193
Partials 17 17
Continue to review full report at Codecov.
|
a315dbf
to
e0eb756
Compare
e0eb756
to
027f6a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to have different data-test
for each group? So (example)
- Data transfer gets
graphMetricTotalsDataTransfer
- Data storage gets
graphMetricTotalsDataStorage
- Instance hours gets
graphMetricTotalsInstanceHours
Current patch is still helpful and worthwhile, as it will allow me to target groups. But then I will have to rely on their order, which is sub-optimal. Having unique attributes would solve all my problems.
I think unique attributes require passing a prop from parent and handling it, and I understand it would be more work. So I'm fine with merging current version, which is still an improvement, and getting back to this once timelines are not so tight.
@mirekdlugosz we can pass in the "metric identifier" and we can try to run lodash's "camel case" method on them to generate a unique |
Depending on API naming is not ideal, as we strive for having stable identifier here. On the other hand, API is unlikely to change (very often), so it's probably better than nothing. We don't have to run it through lodash, unless you want it for consistency. As far as QE is concerned, this can be randomly-generated string. As long as it uniquely identifies element on page and is stable across deployments and environments, we are good. |
027f6a8
to
5dedce2
Compare
The final format came down to looping through each products requested display metric ids. Since this can vary between products and we can't always guarantee the format for the Metric ID the API is going to use the
Where we run lodash camelCase for a minor bit of consistency in case a space is used instead of a dash, and apply a
We can always update the attribute if say the API always guarantees they'll use a dash instead of potentially a blank/space.. |
@cdcabrera I see changes already on CI. That's exactly what I meant! It's perfect, thank you. |
What's included
Notes
data-test="graphMetricTotals"
attribute to the div surrounding daily, monthly, and the graph display for individual metric displays, currently used in RHOSAK. @mirekdlugosz @ntkatholeHow to test
Proxy run check
$ yarn
$ yarn start:proxy
Example
...
Updates issue/story
ent-4366