Executing the visualize shared-item title/description tests in a try (#10505)

Backports PR #10441

**Commit 1:**
Executing the visualize shared-item title/description tests in a try

This function test can be flaky if we try to grab the attributes before
the visualization has finished rendering, so we're wrapping it in a try

* Original sha: d38a255e47
* Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-17T19:54:45Z
This commit is contained in:
jasper 2017-02-22 16:53:01 -05:00 committed by Brandon Kobel
parent e491504bf2
commit c496c1f529

View file

@ -21,11 +21,13 @@ bdd.describe('visualize app', function describeIndexTests() {
description: 'AreaChart'
};
return PageObjects.visualize.clickVisualizationByName('Visualization AreaChart')
.then(() => PageObjects.common.getSharedItemTitleAndDescription())
.then(({ title, description }) => {
expect(title).to.eql(expected.title);
expect(description).to.eql(expected.description);
});
.then (() => PageObjects.common.try(function () {
return PageObjects.common.getSharedItemTitleAndDescription()
.then(({ title, description }) => {
expect(title).to.eql(expected.title);
expect(description).to.eql(expected.description);
});
}));
});
});
});