test: allow check for Table as well as Graph for Explore e2e flow (#31290) (#31349)

* use table for explore flow screenshot

* reverse logic

* update matchExploreTable type

(cherry picked from commit 7f8fb2b55f)

Co-authored-by: Vicky Lee <36230812+vickyyyyyyy@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-02-22 17:23:45 +00:00
committed by GitHub
co-authored by Vicky Lee
parent d0f940c268
commit beff0fbda8
@@ -34,6 +34,7 @@ interface ConfigurePanelOptional {
panelTitle?: string;
timeRange?: TimeRangeConfig;
visualizationName?: string;
matchExploreTable?: boolean;
}
interface ConfigurePanelRequired {
@@ -75,6 +76,7 @@ export const configurePanel = (config: PartialAddPanelConfig | PartialEditPanelC
dataSourceName,
isEdit,
isExplore,
matchExploreTable,
matchScreenshot,
panelTitle,
queriesForm,
@@ -200,7 +202,7 @@ export const configurePanel = (config: PartialAddPanelConfig | PartialEditPanelC
let visualization;
if (isExplore) {
visualization = e2e.pages.Explore.General.graph();
visualization = matchExploreTable ? e2e.pages.Explore.General.table() : e2e.pages.Explore.General.graph();
} else {
visualization = e2e.components.Panels.Panel.containerByTitle(panelTitle).find('.panel-content');
}