Add xpack file

This commit is contained in:
LeeDr 2016-10-28 19:02:18 -05:00
parent 0c2815bc5a
commit d095dac24d

View file

@ -0,0 +1,36 @@
import {
bdd,
remote,
defaultTimeout
} from '../../../support';
import PageObjects from '../../../support/page_objects';
bdd.describe('dismiss x-pack', function () {
this.timeout = defaultTimeout;
// Putting everything here in 'before' so it doesn't count as a test
// since x-pack may or may not be installed. We just want the banner closed.
bdd.before(function () {
PageObjects.common.debug('check for X-Pack welcome, opt-out, and dismiss it');
// find class toaster and see if there's any list items in it?
return PageObjects.settings.navigateTo()
.then(() => {
return PageObjects.monitoring.getToasterContents();
})
.then((contents) => {
// Welcome to X-Pack!
// Sharing your cluster statistics with us helps us improve. Your data is never shared with anyone. Not interested? Opt out here.
// Dismiss
PageObjects.common.debug('Toast banner contents = ' + contents);
if (contents.includes('X-Pack')) {
return PageObjects.monitoring.clickOptOut()
.then(() => {
return PageObjects.monitoring.dismissWelcome();
});
}
});
});
});