PanelEdit: Improves viz picker ux, auto close on click (#33633)

* PanelEdit: Improves viz picker ux, auto close on click

* Fixing strict ts error

* Updated e2e
This commit is contained in:
Torkel Ödegaard
2021-05-03 16:49:09 +02:00
committed by GitHub
parent 437b247b95
commit 578283078b
11 changed files with 46 additions and 38 deletions

View File

@@ -73,21 +73,15 @@ e2e.scenario({
// Change to Text panel
e2e.components.PluginVisualization.item('Text').scrollIntoView().should('be.visible').click();
e2e.components.PluginVisualization.current().within((div: JQuery<HTMLDivElement>) => {
expect(div.text()).equals('Text');
});
e2e.components.PanelEditor.toggleVizPicker().should((e) => expect(e).to.contain('Text'));
// Data pane should not be rendered
e2e.components.PanelEditor.DataPane.content().should('not.exist');
// Change to Table panel
e2e.components.PluginVisualization.item('Table').scrollIntoView().should('be.visible').click();
e2e.components.PluginVisualization.current().within((div: JQuery<HTMLDivElement>) => {
expect(div.text()).equals('Table');
});
// close viz picker
e2e.components.PanelEditor.toggleVizPicker().click();
e2e.components.PluginVisualization.item('Table').scrollIntoView().should('be.visible').click();
e2e.components.PanelEditor.toggleVizPicker().should((e) => expect(e).to.contain('Table'));
// Data pane should be rendered
e2e.components.PanelEditor.DataPane.content().should('be.visible');