-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
LeeDr
committed
Oct 29, 2016
1 parent
0c2815b
commit d095dac
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
} | ||
}); | ||
|
||
}); | ||
|
||
}); |