-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests/functional] opt out of getting started on navigation #11881
Merged
spalger
merged 10 commits into
elastic:master
from
spalger:fix/opt-out-of-getting-started-on-navigation
May 19, 2017
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
263b2b6
[tests/functional] automatically opt-out of getting started page on n…
spalger 1b77840
Merge branch 'master' of github.com:elastic/kibana into fix/opt-out-o…
spalger 207a00c
[test/functional/commonPage] avoid circular reference
spalger 9561233
[test/functional/commonPage] move check for getting started after url…
spalger a890065
[gettingStarted] prevent route resolution by returning halt promises
spalger 01fef54
[test/functional/commonPage] wait for kibana to load before checking …
spalger f88c940
[uiRoutes/setupWork] provide a token that can be thrown to halt setup…
spalger b82612a
[ui/routes] rename reference to WAIT_FOR_URL_CHANGE_TOKEN
spalger abf58a7
Merge branch 'master' of github.com:elastic/kibana into fix/opt-out-o…
spalger 274ba24
address review feedback
spalger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ycombinator I tried a different approach, throwing this token from within a route setup work function will halt the setup work, allowing it to wait for
kbnUrl
to change. What do you think?/cc @cjcenizal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spalger Do you think this throw should just become part of the
kbnUrl.change
function? It seems to me the two would always want to travel together, no?