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
This commit is contained in:
kobelb 2017-02-17 14:54:45 -05:00
parent 2fb2b4ca6c
commit d38a255e47

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