mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Dashboard] Adding timelion panel without asking for the index pattern (#113896)
* [Dashboard] Adding timelion panel without asking for the index pattern * Adds a functional test
This commit is contained in:
parent
433a0e3927
commit
65df961b5c
2 changed files with 22 additions and 1 deletions
|
@ -128,7 +128,10 @@ export const EditorMenu = ({ dashboardContainer, createNewVisType }: Props) => {
|
|||
name: titleInWizard || title,
|
||||
icon: icon as string,
|
||||
onClick:
|
||||
group === VisGroups.AGGBASED ? createNewAggsBasedVis(visType) : createNewVisType(visType),
|
||||
// not all the agg-based visualizations need to be created via the wizard
|
||||
group === VisGroups.AGGBASED && visType.options.showIndexSelection
|
||||
? createNewAggsBasedVis(visType)
|
||||
: createNewVisType(visType),
|
||||
'data-test-subj': `visType-${name}`,
|
||||
toolTipContent: description,
|
||||
};
|
||||
|
|
|
@ -68,6 +68,24 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
});
|
||||
|
||||
it('adds a new timelion visualization', async () => {
|
||||
// adding this case, as the timelion agg-based viz doesn't need the `clickNewSearch()` step
|
||||
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
|
||||
await dashboardAddPanel.clickEditorMenuButton();
|
||||
await dashboardAddPanel.clickAggBasedVisualizations();
|
||||
await PageObjects.visualize.clickTimelion();
|
||||
await PageObjects.visualize.saveVisualizationExpectSuccess(
|
||||
'timelion visualization from add new link',
|
||||
{ redirectToOrigin: true }
|
||||
);
|
||||
|
||||
await retry.try(async () => {
|
||||
const panelCount = await PageObjects.dashboard.getPanelCount();
|
||||
expect(panelCount).to.eql(originalPanelCount + 1);
|
||||
});
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
});
|
||||
|
||||
it('adds a markdown visualization via the quick button', async () => {
|
||||
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
|
||||
await dashboardAddPanel.clickMarkdownQuickButton();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue