Skip to content

Commit

Permalink
[ML] Modifies script for population analysis screenshot (#146393)
Browse files Browse the repository at this point in the history
This PR adjusts the screenshot automation script to take the
`ml-population-results` screenshots with swim lanes visible.

(cherry picked from commit 115c250)
  • Loading branch information
szabosteve committed Nov 29, 2022
1 parent f7d8bee commit 71feb0e
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function ({ getService }: FtrProviderContext) {
const elasticChart = getService('elasticChart');
const ml = getService('ml');
const commonScreenshots = getService('commonScreenshots');
const testSubjects = getService('testSubjects');

const screenshotDirectories = ['ml_docs', 'anomaly_detection'];

Expand Down Expand Up @@ -85,22 +84,12 @@ export default function ({ getService }: FtrProviderContext) {
await ml.jobTable.filterWithSearchString(populationJobConfig.job_id, 1);
await ml.jobTable.clickOpenJobInAnomalyExplorerButton(populationJobConfig.job_id);
await ml.commonUI.waitForMlLoadingIndicatorToDisappear();

await ml.testExecution.logTestStep('open tooltip and take screenshot');
const viewBySwimLanes = await testSubjects.find(viewBySwimLaneTestSubj);
const cells = await ml.swimLane.getCells(viewBySwimLaneTestSubj);
const sampleCell = cells[0];

await viewBySwimLanes.moveMouseTo({
xOffset: Math.floor(cellSize / 2.0),
yOffset: Math.floor(cellSize / 2.0),
});

await commonScreenshots.takeScreenshot('ml-population-results', screenshotDirectories);

await ml.testExecution.logTestStep(
'select swim lane tile, expand anomaly row and take screenshot'
);
const cells = await ml.swimLane.getCells(viewBySwimLaneTestSubj);
const sampleCell = cells[0];
await ml.swimLane.selectSingleCell(viewBySwimLaneTestSubj, {
x: sampleCell.x + cellSize,
y: sampleCell.y + cellSize,
Expand Down

0 comments on commit 71feb0e

Please sign in to comment.