diff --git a/packages/grafana-e2e-selectors/src/selectors/components.ts b/packages/grafana-e2e-selectors/src/selectors/components.ts index 1bdc2583dc1..7815c89e92b 100644 --- a/packages/grafana-e2e-selectors/src/selectors/components.ts +++ b/packages/grafana-e2e-selectors/src/selectors/components.ts @@ -123,7 +123,7 @@ export const Components = { DataPane: { content: 'Panel editor data pane content', }, - applyButton: 'panel editor apply', + applyButton: 'Apply changes and go back to dashboard', toggleVizPicker: 'toggle-viz-picker', toggleVizOptions: 'toggle-viz-options', toggleTableView: 'toggle-table-view', diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index a57aca30f29..7663394bb07 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -338,32 +338,31 @@ export class PanelEditorUnconnected extends PureComponent { , - + Discard , this.props.panel.libraryPanel ? ( Save library panel ) : ( - + Save ), Apply , diff --git a/public/app/features/dashboard/containers/DashboardPage.test.tsx b/public/app/features/dashboard/containers/DashboardPage.test.tsx index 992a5e9d4b8..b8471051196 100644 --- a/public/app/features/dashboard/containers/DashboardPage.test.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.test.tsx @@ -238,7 +238,7 @@ describe('DashboardPage', () => { }); it('Should render panel editor', () => { - expect(screen.getByTitle('Apply changes and go back to dashboard')).toBeInTheDocument(); + expect(screen.getByLabelText('Apply changes and go back to dashboard')).toBeInTheDocument(); }); it('Should reset state when leaving', () => {