-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Reporting] Better logging for waitForSelector failure #25762
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
Merged
tsullivan
merged 18 commits into
elastic:master
from
tsullivan:reporting/logging-waitForSelector
Nov 27, 2018
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c0b4110
[Reporting] Better logging for waitForSelector failure
tsullivan b3cffbb
experimental changes
tsullivan 9fd9864
break waitForSelector
tsullivan dcf8f93
cleanup/consistency
tsullivan 61c7f55
Merge branch 'master' into reporting/logging-waitForSelector
tsullivan 7af35a4
fix some test report title strings
tsullivan b585bdf
test disable chromium
tsullivan e7f5555
roll back test code
tsullivan a8990a3
take out non-working phantom changes
tsullivan d540d8a
roll back disable chromium test
tsullivan a655c21
allow logger to use curried tags
tsullivan 9a2e4a8
Merge branch 'master' into reporting/logging-waitForSelector
tsullivan c37c3fe
temporarily re-do report failure-causing change for test
tsullivan 1029725
replace newline with escaped for single log line
tsullivan 3e7ea5f
undo test change
tsullivan 8110b57
remove obsolete test
tsullivan 8a094a8
Merge branch 'master' into reporting/logging-waitForSelector
tsullivan 9ab78c7
Merge branch 'master' into reporting/logging-waitForSelector
tsullivan 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
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -29,10 +29,6 @@ export default function ({ getService }) { | |
| expect(usage.reporting.enabled).to.be(true); | ||
| }); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :) |
||
| it('is using phantom browser', async () => { | ||
| expect(usage.reporting.browser_type).to.be('phantom'); | ||
| }); | ||
|
|
||
| it('all counts are 0', async () => { | ||
| reportingAPI.expectRecentPdfAppStats(usage, 'visualization', 0); | ||
| reportingAPI.expectAllTimePdfAppStats(usage, 'visualization', 0); | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
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.
You probably don't want the bang here:
fn: () => document.querySelector('body').innerText,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.
The
!is the "Non-null assertion operator" for Typescript to not fail compilation for the reason that the return fromdocument.querySelector('body')is possibly null. It's not as safe as a guard, though. It's possible forquerySelectorto returnnullif an element isn't found, but forbodyI don't see it ever happening.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.
TIL! Does the TS compiler remove this when built? Reason I ask is because this function gets stringified and sent over WebSockets over to the browser... so if it doesn't it'll have issues running