-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests/functional] automatically opt-out of getting started page on n…
…avigation
- Loading branch information
Showing
4 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/core_plugins/getting_started/public/components/getting_started/getting_started.html
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
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
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
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 |
---|---|---|
@@ -1,14 +1,24 @@ | ||
export function GettingStartedPageProvider({ getService }) { | ||
|
||
const log = getService('log'); | ||
const retry = getService('retry'); | ||
const testSubjects = getService('testSubjects'); | ||
|
||
class GettingStartedPage { | ||
async clickOptOutLink() { | ||
async doesContainerExist() { | ||
return await testSubjects.exists('gettingStartedContainer'); | ||
} | ||
|
||
async outOut() { | ||
log.debug('Clicking opt-out link'); | ||
await testSubjects.click('lnkGettingStartedOptOut'); | ||
await retry.try(async () => { | ||
if (await this.doesContainerExist()) { | ||
throw new Error('Still on getting started page'); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
return new GettingStartedPage(); | ||
} | ||
} |