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

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
This commit is contained in:
Brandon Kobel 2017-02-22 07:14:21 -05:00 committed by GitHub
parent 3d777270a2
commit 0bd7f4264e

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