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

* use table for explore flow screenshot

* reverse logic

* update matchExploreTable type
This commit is contained in:
Vicky Lee 2021-02-18 09:11:30 +00:00 committed by GitHub
parent e932d5bb09
commit 7f8fb2b55f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');
}