mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: add missing aria-label for rendered panel image (e2e tests) (#22543)
This commit is contained in:
parent
3a5375ddd8
commit
3aa3fa3ee1
@ -1,4 +1,5 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
|
import { e2e } from '@grafana/e2e';
|
||||||
import { Switch, Select, ClipboardButton } from '@grafana/ui';
|
import { Switch, Select, ClipboardButton } from '@grafana/ui';
|
||||||
import { SelectableValue, PanelModel, AppEvents } from '@grafana/data';
|
import { SelectableValue, PanelModel, AppEvents } from '@grafana/data';
|
||||||
import { DashboardModel } from 'app/features/dashboard/state';
|
import { DashboardModel } from 'app/features/dashboard/state';
|
||||||
@ -83,6 +84,7 @@ export class ShareLink extends PureComponent<Props, State> {
|
|||||||
render() {
|
render() {
|
||||||
const { panel } = this.props;
|
const { panel } = this.props;
|
||||||
const { useCurrentTimeRange, includeTemplateVars, selectedTheme, shareUrl, imageUrl } = this.state;
|
const { useCurrentTimeRange, includeTemplateVars, selectedTheme, shareUrl, imageUrl } = this.state;
|
||||||
|
const selectors = e2e.pages.SharePanelModal.selectors;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="share-modal-body">
|
<div className="share-modal-body">
|
||||||
@ -122,14 +124,13 @@ export class ShareLink extends PureComponent<Props, State> {
|
|||||||
<ClipboardButton variant="inverse" getText={this.getShareUrl} onClipboardCopy={this.onShareUrlCopy}>
|
<ClipboardButton variant="inverse" getText={this.getShareUrl} onClipboardCopy={this.onShareUrlCopy}>
|
||||||
Copy
|
Copy
|
||||||
</ClipboardButton>
|
</ClipboardButton>
|
||||||
{/* <button className="btn btn-inverse" clipboard-button="getShareUrl()">Copy</button> */}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{panel && (
|
{panel && (
|
||||||
<div className="gf-form">
|
<div className="gf-form">
|
||||||
<a href={imageUrl} target="_blank">
|
<a href={imageUrl} target="_blank" aria-label={selectors.linkToRenderedImage}>
|
||||||
<i className="fa fa-camera"></i> Direct link rendered image
|
<i className="fa fa-camera"></i> Direct link rendered image
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user