-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Reporting] Unit test for screenshot observable #57638
[Reporting] Unit test for screenshot observable #57638
Conversation
5511db0
to
133bcf6
Compare
commit 1c6a6b0 Author: Timothy Sullivan <[email protected]> Date: Thu Feb 13 14:10:40 2020 -0700 fix tests commit a3afefd Merge: facd94b 6e4efdf Author: Timothy Sullivan <[email protected]> Date: Thu Feb 13 13:56:24 2020 -0700 Merge branch 'master' into reporting/np-server-uisettings commit facd94b Author: Timothy Sullivan <[email protected]> Date: Thu Feb 13 12:16:51 2020 -0700 extract internals access to separate core class commit 2f12495 Merge: dd0fd40 3f3969d Author: Timothy Sullivan <[email protected]> Date: Thu Feb 13 09:57:07 2020 -0700 Merge branch 'master' into reporting/np-server-uisettings commit dd0fd40 Author: Timothy Sullivan <[email protected]> Date: Wed Feb 12 14:44:03 2020 -0700 add more tests commit 25dc761 Author: Timothy Sullivan <[email protected]> Date: Wed Feb 12 13:54:47 2020 -0700 simplify reporting usage collector setup commit e8aa02d Author: Timothy Sullivan <[email protected]> Date: Wed Feb 12 13:44:13 2020 -0700 consistent name for reportingPlugin commit d235b16 Author: Timothy Sullivan <[email protected]> Date: Wed Feb 12 13:52:07 2020 -0700 Prettier changes commit e8ddc7b Author: Timothy Sullivan <[email protected]> Date: Wed Feb 12 13:28:35 2020 -0700 [Reporting/New Platform] Provide async access to server-side
133bcf6
to
24ea6b3
Compare
@@ -4,48 +4,55 @@ | |||
* you may not use this file except in compliance with the Elastic License. | |||
*/ | |||
|
|||
import { HeadlessChromiumDriver as HeadlessBrowser } from '../../../../server/browsers/chromium/driver'; | |||
import { HeadlessChromiumDriver as HeadlessBrowser } from '../../../../server/browsers'; |
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.
This one, and the next 3 files have a lot of whitespace changes enforced by prettier. It would help to ignore whitespace changes in this PR review :)
}).toPromise(); | ||
}; | ||
|
||
await expect(getScreenshot()).rejects.toMatchInlineSnapshot( |
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.
NOTE: This part of assertions will change when #57008 is implemented
@@ -0,0 +1,129 @@ | |||
/* |
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.
Whew this is a fun one
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.
Yeah.. I think this test and the way things are mocked, especially in createPage
highlight some overly-complicated areas of Reporting and maybe things that have real performance impact.
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.
need to restore skip_telemetry
x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/skip_telemetry.ts
Outdated
Show resolved
Hide resolved
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.
Looks good to me
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
[Reporting] test the screenshot observable
This adds a suite of unit tests to the
screenshotsObservableFactory
method of Kibana Reporting.Related to the fix from #56928