Skip to content

Commit

Permalink
[DOCS] Automate more anomaly detection rule screenshots (elastic#168900)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored and dej611 committed Oct 17, 2023
1 parent 2df9256 commit 5ed497a
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 5ed497a

Please sign in to comment.