Skip to content

Commit

Permalink
Add xpack file
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeDr committed Oct 29, 2016
1 parent 0c2815b commit d095dac
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/functional/apps/xpack/index.js
Original file line number Diff line number Diff line change
@@ -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();
});
}
});

});

});

0 comments on commit d095dac

Please sign in to comment.