Skip to content
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

[TSVB] Add more functional tests for Gauge and TopN #105361

Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,15 @@ export class Gauge extends Component {
ref={(el) => (this.inner = el)}
style={styles.inner}
>
<div className="tvbVisGauge__label" ref="title">
<div className="tvbVisGauge__label" ref="title" data-test-subj="gaugeLabel">
{title}
</div>
<div className="tvbVisGauge__value" style={styles.valueColor} ref="label">
<div
className="tvbVisGauge__value"
style={styles.valueColor}
ref="label"
data-test-subj="gaugeValue"
>
{formatter(value)}
</div>
{additionalLabel}
Expand All @@ -124,10 +129,15 @@ export class Gauge extends Component {
ref={(el) => (this.inner = el)}
style={styles.inner}
>
<div className="tvbVisGauge__value" style={styles.valueColor} ref="label">
<div
className="tvbVisGauge__value"
style={styles.valueColor}
ref="label"
data-test-subj="gaugeValue"
>
{formatter(value)}
</div>
<div className="tvbVisGauge__label" ref="title">
<div className="tvbVisGauge__label" ref="title" data-test-subj="gaugeLabel">
{title}
</div>
{additionalLabel}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,19 @@ export class GaugeVis extends Component {
if (type === 'half') {
svg = (
<svg width={120.72} height={78.72}>
<circle {...props.circleBackground} style={styles.innerLine} />
<circle {...props.circle} style={styles.gaugeLine} />
<circle
{...props.circleBackground}
style={styles.innerLine}
data-test-subj="gaugeCircleInner"
/>
<circle {...props.circle} style={styles.gaugeLine} data-test-subj="gaugeCircle" />
</svg>
);
} else {
svg = (
<svg width={120.72} height={120.72}>
<circle {...props.circleBackground} />
<circle {...props.circle} />
<circle {...props.circleBackground} data-test-subj="gaugeCircleInner" />
<circle {...props.circle} data-test-subj="gaugeCircle" />
</svg>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class TopN extends Component {
</td>
<td width="100%" className="tvbVisTopN__bar">
<div className="tvbVisTopN__innerBar" style={styles.innerBar}>
<div style={styles.innerBarValue} />
<div style={styles.innerBarValue} data-test-subj="topNInnerBar" />
</div>
</td>
<td className="tvbVisTopN__value" data-test-subj="tsvbTopNValue">
Expand Down
Loading