mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
e2e tests: Add selector to close dashboard settings and use it in e2e tests (#65625)
* add selector to close dashboard settings and use it in e2e tests * check visibility of add panel button * check visibility of add new panel button before clicking
This commit is contained in:
@@ -2,7 +2,6 @@ import { e2e } from '@grafana/e2e';
|
||||
import { GrafanaBootConfig } from '@grafana/runtime';
|
||||
|
||||
const PAGE_UNDER_TEST = '-Y-tnEDWk/templating-nested-template-variables';
|
||||
const DASHBOARD_NAME = 'Templating - Nested Template Variables';
|
||||
|
||||
describe('Variables - Query - Add variable', () => {
|
||||
it('query variable should be default and default fields should be correct', () => {
|
||||
@@ -108,7 +107,7 @@ describe('Variables - Query - Add variable', () => {
|
||||
.window()
|
||||
.then((win: Cypress.AUTWindow & { grafanaBootData: GrafanaBootConfig['bootData'] }) => {
|
||||
if (win.grafanaBootData.settings.featureToggles.topnav) {
|
||||
e2e.components.Breadcrumbs.breadcrumb(DASHBOARD_NAME).click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
} else {
|
||||
e2e.components.BackButton.backArrow().click({ force: true });
|
||||
}
|
||||
@@ -180,7 +179,7 @@ describe('Variables - Query - Add variable', () => {
|
||||
.window()
|
||||
.then((win: Cypress.AUTWindow & { grafanaBootData: GrafanaBootConfig['bootData'] }) => {
|
||||
if (win.grafanaBootData.settings.featureToggles.topnav) {
|
||||
e2e.components.Breadcrumbs.breadcrumb(DASHBOARD_NAME).click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
} else {
|
||||
e2e.components.BackButton.backArrow().click({ force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user