-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests/functional] opt out of getting started on navigation (#11881)
* [tests/functional] automatically opt-out of getting started page on navigation * [test/functional/commonPage] avoid circular reference * [test/functional/commonPage] move check for getting started after url has settled * [gettingStarted] prevent route resolution by returning halt promises * [test/functional/commonPage] wait for kibana to load before checking for getting started * [uiRoutes/setupWork] provide a token that can be thrown to halt setup work * [ui/routes] rename reference to WAIT_FOR_URL_CHANGE_TOKEN * address review feedback
- Loading branch information
Showing
8 changed files
with
59 additions
and
32 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
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 optOut() { | ||
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(); | ||
} | ||
} |