-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] Add initial docs screenshot generation #121495
Conversation
Pinging @elastic/ml-ui (:ml) |
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.
Code LGTM. Tested screenshot generation locally. Great update!
x-pack/test/screenshot_creation/apps/ml_docs/anomaly_detection/mapping_anomalies.ts
Outdated
Show resolved
Hide resolved
await transform.wizard.assertDefineStepActive(); | ||
|
||
await ml.testExecution.logTestStep('take screenshot'); | ||
await mlScreenshots.takeScreenshot('logs-transform-preview', screenshotDirectories); |
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.
Nit - might be worth including clone
in the file name here, in case we add in a screenshot of the preview from the usual create workflow e.g logs-clone-transform-preview
?
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 screenshot file names are currently defined by the docs team and we're using the exact same names here, so it's easy for them to compare contents. I wouldn't change that as part of this PR, but we can discuss this with docs folks for a follow-up.
x-pack/test/screenshot_creation/apps/ml_docs/anomaly_detection/population_analysis.ts
Outdated
Show resolved
Hide resolved
await ml.testExecution.logTestStep('fold scatterplot section and take screenshot'); | ||
await ml.dataFrameAnalyticsResults.expandScatterplotMatrixSection(false); | ||
await mlScreenshots.removeFocusFromElement(); | ||
await mlScreenshots.takeScreenshot('outliers', screenshotDirectories); |
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.
Nit - cold add data set and view type new into this file name for consistency with the others e.g. weblog-outliers-results
?
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.
See my comment above: we can discuss screenshot file names with docs folks in a follow-up.
await mlScreenshots.removeFocusFromElement(); | ||
await ml.dataFrameAnalyticsResults.assertScatterplotMatrixLoaded(); | ||
await ml.dataFrameAnalyticsResults.scrollScatterplotMatrixIntoView(); | ||
await mlScreenshots.takeScreenshot('outliers-scatterplot', screenshotDirectories); |
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.
Nit - could ad the data set name in here for consistency with the others e.g. weblog-outliers-scatterplot
(although that would clash for a screenshot used from the outlier wizard).
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.
See my comment above: we can discuss screenshot file names with docs folks in a follow-up.
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.
Tested locally, and latest changes LGTM
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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.
LGTM
This PR utilizes the functional test runner to walk through the UI and take a couple screenshots for use in the documentation.
💔 Backport failed
Successful backport PRs will be merged automatically after passing CI. To backport manually run: |
This PR utilizes the functional test runner to walk through the UI and take a couple screenshots for use in the documentation. # Conflicts: # x-pack/test/functional/services/ml/test_resources.ts
This PR utilizes the functional test runner to walk through the UI and take a couple screenshots for use in the documentation.
Summary
This PR utilizes the functional test runner to walk through the UI and take a couple screenshots for use in the documentation.
Details
Scope
Not all of the initially generated screenshots are showing the desired content yet. Also, there's still a list of required screenshots that's not yet taken. This is just the basis so we have something to iterate on.
How to use it
After pulling latest changes, make sure to run
yarn kbn bootstrap
.From the
x-pack
directory run:and when that's up, run the following in a separate terminal (again from the
x-pack
directory, you can also set the environment variableTEST_BROWSER_HEADLESS=1
to run in headless mode):After that has finished, you'll find the screenshots in
x-pack/test/functional/screenshots/session/ml_docs
.The screenshot files all have a
_new
suffix, which allows to easily compare them side by side with the already existing docs screenshots.Implementation
screenshot_creation
has been created inx-pack/test
, which behaves like a regular functional test directory but is not connected to any ciGroup, so it won't be picked up automatically and needs manual execution.data-test-subj
properties in the ML UIscreenshot
service and thegis_page