Skip to content

Commit

Permalink
fix(graphCardMetricTotals): ent-4366 expand data-test (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Dec 6, 2021
1 parent d8d69aa commit 2dc7fc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`GraphCardMetricTotals Component should handle multiple display states: error 1`] = `
<Flex
className="curiosity-usage-graph__totals"
data-test="graphMetricTotals-"
>
<Flex
alignSelf={
Expand Down Expand Up @@ -113,6 +114,7 @@ exports[`GraphCardMetricTotals Component should handle multiple display states:
exports[`GraphCardMetricTotals Component should handle multiple display states: fulfilled 1`] = `
<Flex
className="curiosity-usage-graph__totals"
data-test="graphMetricTotals-"
>
<Flex
alignSelf={
Expand Down Expand Up @@ -227,6 +229,7 @@ exports[`GraphCardMetricTotals Component should handle multiple display states:
exports[`GraphCardMetricTotals Component should handle multiple display states: pending 1`] = `
<Flex
className="curiosity-usage-graph__totals"
data-test="graphMetricTotals-"
>
<Flex
alignSelf={
Expand Down Expand Up @@ -357,6 +360,7 @@ exports[`GraphCardMetricTotals Component should handle multiple display states:
exports[`GraphCardMetricTotals Component should render a basic component: basic 1`] = `
<Flex
className="curiosity-usage-graph__totals"
data-test="graphMetricTotals-"
>
<Flex
alignSelf={
Expand Down
3 changes: 2 additions & 1 deletion src/components/graphCard/graphCardMetricTotals.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Card, CardBody, CardFooter, CardTitle, Flex, FlexItem } from '@patternfly/react-core';
import moment from 'moment';
import _camelCase from 'lodash/camelCase';
import { useProductGraphTallyQuery } from '../productView/productViewContext';
import { useMetricsSelector } from './graphCardContext';
import { MinHeight } from '../minHeight/minHeight';
Expand Down Expand Up @@ -46,7 +47,7 @@ const GraphCardMetricTotals = ({
const dailyValue = isCurrent ? currentValue : lastValue;

return (
<Flex className="curiosity-usage-graph__totals">
<Flex data-test={`graphMetricTotals-${_camelCase(metricId)}`} className="curiosity-usage-graph__totals">
<Flex flex={{ default: 'flex_1' }} direction={{ default: 'column' }} alignSelf={{ default: 'alignSelfStretch' }}>
<FlexItem className="curiosity-usage-graph__totals-column">
<Card
Expand Down

0 comments on commit 2dc7fc3

Please sign in to comment.