diff --git a/src/ui/public/partials/saved_object_finder.html b/src/ui/public/partials/saved_object_finder.html index ddc4906e99e4..9734090be006 100644 --- a/src/ui/public/partials/saved_object_finder.html +++ b/src/ui/public/partials/saved_object_finder.html @@ -20,7 +20,7 @@ {{finder.hitCount}} of {{finder.hitCount}}
- + Add new {{finder.properties.noun}}
diff --git a/test/functional/apps/dashboard/_dashboard.js b/test/functional/apps/dashboard/_dashboard.js index fb5a07638453..c584a8f66f0b 100644 --- a/test/functional/apps/dashboard/_dashboard.js +++ b/test/functional/apps/dashboard/_dashboard.js @@ -86,7 +86,6 @@ bdd.describe('dashboard tab', function describeIndexTests() { }); }); - bdd.it('filters when a pie chart slice is clicked', async function () { let descriptions = await PageObjects.dashboard.getFilterDescriptions(1000); expect(descriptions.length).to.equal(0); @@ -123,4 +122,20 @@ bdd.describe('dashboard tab', function describeIndexTests() { }); }); }); + + bdd.it('add new visualization link', async function checkTitles() { + await PageObjects.dashboard.clickAddVisualization(); + await PageObjects.dashboard.clickAddNewVisualizationLink(); + await PageObjects.visualize.clickAreaChart(); + await PageObjects.visualize.clickNewSearch(); + await PageObjects.visualize.saveVisualization('visualization from add new link'); + + const visualizations = PageObjects.dashboard.getTestVisualizations(); + return PageObjects.common.tryForTime(10000, async function () { + const panelTitles = await PageObjects.dashboard.getPanelSizeData(); + PageObjects.common.log('visualization titles = ' + panelTitles.map(item => item.title)); + PageObjects.common.saveScreenshot('Dashboard-visualization-sizes'); + expect(panelTitles.length).to.eql(visualizations.length + 1); + }); + }); }); diff --git a/test/support/page_objects/dashboard_page.js b/test/support/page_objects/dashboard_page.js index 3079b6b9b2e5..cfba7d3b1efd 100644 --- a/test/support/page_objects/dashboard_page.js +++ b/test/support/page_objects/dashboard_page.js @@ -310,6 +310,10 @@ export default class DashboardPage { }, Promise.resolve()); } + clickAddNewVisualizationLink() { + return PageObjects.common.clickTestSubject('addNewSavedObjectLink'); + } + async setTimepickerInDataRange() { const fromTime = '2015-09-19 06:31:44.000'; const toTime = '2015-09-23 18:31:44.000';