Skip to content

Commit

Permalink
[DOCS] Automate more anomaly detection rule screenshots (#168900)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Oct 16, 2023
1 parent 0b8a2d5 commit b69c619
Showing 1 changed file with 29 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
1920,
1400
);
await ml.alerting.selectSlackConnectorType();
await ml.testExecution.logTestStep('should open connectors');
await ml.alerting.clickCreateConnectorButton();
await ml.alerting.setConnectorName('test-connector');
await ml.alerting.setWebhookUrl('https://www.elastic.co');
await ml.alerting.clickSaveActionButton();
await commonScreenshots.takeScreenshot(
'ml-health-check-action',
screenshotDirectories,
1920,
1400
);
await ml.alerting.clickCancelSaveRuleButton();

await pageObjects.triggersActionsUI.clickCreateAlertButton();
Expand Down Expand Up @@ -150,12 +162,13 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
1920,
1400
);
await ml.alerting.selectSlackConnectorType();
await ml.testExecution.logTestStep('should open connectors');
await ml.alerting.clickCreateConnectorButton();
await ml.alerting.setConnectorName('test-connector');
await ml.alerting.setWebhookUrl('https://www.elastic.co');
await ml.alerting.clickSaveActionButton();
await testSubjects.click('.slack-alerting-ActionTypeSelectOption');
await commonScreenshots.takeScreenshot(
'ml-anomaly-alert-action-score-matched',
screenshotDirectories,
1920,
1400
);
await ml.alerting.openAddRuleVariable();
await ml.testExecution.logTestStep('take screenshot');
await commonScreenshots.takeScreenshot(
Expand All @@ -164,6 +177,16 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
1920,
1400
);
const actionFrequency = await testSubjects.find('summaryOrPerRuleSelect');
await actionFrequency.click();
const actionSummary = await testSubjects.find('actionNotifyWhen-option-summary');
await actionSummary.click();
await commonScreenshots.takeScreenshot(
'ml-anomaly-alert-action-summary',
screenshotDirectories,
1920,
1400
);
});
});
});
Expand Down

0 comments on commit b69c619

Please sign in to comment.