diff --git a/docs/user/alerting/images/rule-types-index-threshold-select.png b/docs/user/alerting/images/rule-types-index-threshold-select.png deleted file mode 100644 index 98866694e6e36..0000000000000 Binary files a/docs/user/alerting/images/rule-types-index-threshold-select.png and /dev/null differ diff --git a/docs/user/alerting/rule-types/es-query.asciidoc b/docs/user/alerting/rule-types/es-query.asciidoc index 99c0e6f965306..17e50ceb40b66 100644 --- a/docs/user/alerting/rule-types/es-query.asciidoc +++ b/docs/user/alerting/rule-types/es-query.asciidoc @@ -12,7 +12,8 @@ The {es} query rule type runs a user-configured query, compares the number of matches to a configured threshold, and schedules actions to run when the threshold condition is met. -In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*, fill in the name and optional tags, then select *{es} query*. +In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*. +Select the *{es} query* rule type then fill in the name and optional tags. An {es} query rule can be defined using {es} Query Domain Specific Language (DSL), {es} Query Language (ES|QL), {kib} Query Language (KQL), or Lucene. [float] diff --git a/docs/user/alerting/rule-types/geo-rule-types.asciidoc b/docs/user/alerting/rule-types/geo-rule-types.asciidoc index af26780a3a6aa..96851919e4b58 100644 --- a/docs/user/alerting/rule-types/geo-rule-types.asciidoc +++ b/docs/user/alerting/rule-types/geo-rule-types.asciidoc @@ -10,7 +10,8 @@ The tracking containment rule alerts when an entity is contained or no longer contained within a boundary. -In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*, fill in the name and optional tags, then select *Tracking containment*. +In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*. +Select the *Tracking containment* rule type then fill in the name and optional tags. [float] === Define the conditions diff --git a/docs/user/alerting/rule-types/index-threshold.asciidoc b/docs/user/alerting/rule-types/index-threshold.asciidoc index a5f7c79e1be74..2e40c6c3bbcda 100644 --- a/docs/user/alerting/rule-types/index-threshold.asciidoc +++ b/docs/user/alerting/rule-types/index-threshold.asciidoc @@ -10,7 +10,8 @@ The index threshold rule type runs an {es} query. It aggregates field values from documents, compares them to threshold values, and schedules actions to run when the thresholds are met. -In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*, fill in the name and optional tags, then select *Index threshold*. +In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*. +Select the *Index threshold* rule type then fill in the name and optional tags. [float] === Define the conditions @@ -107,15 +108,11 @@ You can also specify <>. In this example, you will use the {kib} <> to set up and tune the conditions on an index threshold rule. For this example, you want to detect when any of the top four sites serve more than 420,000 bytes over a 24 hour period. -. Open the main menu, then click *{stack-manage-app} > {rules-ui}*. +. Go to *{stack-manage-app} > {rules-ui}* and click *Create rule*. -. Create a new rule. +. Select the **Index threshold** rule type. -.. Provide a rule name and select the **Index threshold** rule type. -+ -[role="screenshot"] -image::user/alerting/images/rule-types-index-threshold-select.png[Choosing an index threshold rule type] -// NOTE: This is an autogenerated screenshot. Do not edit it directly. +.. Provide a rule name. .. Select an index. Click *Index*, and set *Indices to query* to `kibana_sample_data_logs`. Set the *Time field* to `@timestamp`. + diff --git a/x-pack/test/screenshot_creation/apps/ml_docs/anomaly_detection/generate_anomaly_alerts.ts b/x-pack/test/screenshot_creation/apps/ml_docs/anomaly_detection/generate_anomaly_alerts.ts index 8d93f1349cae6..75c441bc21cd9 100644 --- a/x-pack/test/screenshot_creation/apps/ml_docs/anomaly_detection/generate_anomaly_alerts.ts +++ b/x-pack/test/screenshot_creation/apps/ml_docs/anomaly_detection/generate_anomaly_alerts.ts @@ -65,9 +65,8 @@ function createTestJobAndDatafeed() { export default ({ getPageObjects, getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const ml = getService('ml'); - const pageObjects = getPageObjects(['triggersActionsUI']); + const pageObjects = getPageObjects(['triggersActionsUI', 'header']); const commonScreenshots = getService('commonScreenshots'); - const browser = getService('browser'); const actions = getService('actions'); const testSubjects = getService('testSubjects'); @@ -105,16 +104,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('alert flyout screenshots', async () => { await ml.navigation.navigateToAlertsAndAction(); await pageObjects.triggersActionsUI.clickCreateAlertButton(); - await ml.alerting.setRuleName('test-ecommerce'); - const searchBox = await testSubjects.find('ruleSearchField'); - await searchBox.click(); - await searchBox.clearValue(); - await searchBox.type('ml'); - await searchBox.pressKeys(browser.keys.ENTER); - await ml.testExecution.logTestStep('take screenshot'); - await commonScreenshots.takeScreenshot('ml-rule', screenshotDirectories, 1920, 1400); - + await ml.testExecution.logTestStep('Create anomaly detection jobs health rule'); await ml.alerting.selectAnomalyDetectionJobHealthAlertType(); + await pageObjects.header.waitUntilLoadingHasFinished(); + await ml.alerting.setRuleName('test-ecommerce'); await ml.alerting.selectJobs([testJobId]); await ml.testExecution.logTestStep('take screenshot'); await commonScreenshots.takeScreenshot( @@ -137,9 +130,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { ); await ml.alerting.clickCancelSaveRuleButton(); + await ml.testExecution.logTestStep('Create anomaly detection rule'); await pageObjects.triggersActionsUI.clickCreateAlertButton(); - await ml.alerting.setRuleName('test-ecommerce'); await ml.alerting.selectAnomalyDetectionAlertType(); + await pageObjects.header.waitUntilLoadingHasFinished(); + await ml.alerting.setRuleName('test-ecommerce'); await ml.testExecution.logTestStep('should have correct default values'); await ml.alerting.assertSeverity(75); await ml.alerting.assertPreviewButtonState(false); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts index 10392e3c45f88..2fa64a1d1bfff 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts @@ -37,8 +37,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await pageObjects.common.navigateToApp('triggersActions'); await pageObjects.header.waitUntilLoadingHasFinished(); await rules.common.clickCreateAlertButton(); - await testSubjects.setValue('ruleNameInput', ruleName); await testSubjects.click(`.es-query-SelectOption`); + await pageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.setValue('ruleNameInput', ruleName); await testSubjects.click('queryFormType_esQuery'); const indexSelector = await testSubjects.find('selectIndexExpression'); await indexSelector.click(); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index_threshold_rule.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index_threshold_rule.ts index 582bc02bd5609..e06558e281a7b 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index_threshold_rule.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index_threshold_rule.ts @@ -23,27 +23,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await pageObjects.common.navigateToApp('triggersActions'); await pageObjects.header.waitUntilLoadingHasFinished(); await rules.common.clickCreateAlertButton(); - await testSubjects.setValue('ruleNameInput', ruleName); - await testSubjects.click('tagsComboBox'); - await testSubjects.setValue('tagsComboBox', 'sample-data'); - await testSubjects.click('solutionsFilterButton'); - await testSubjects.click('solutionstackAlertsFilterOption'); - await testSubjects.setValue('solutionsFilterButton', 'solutionstackAlertsFilterOption'); - await commonScreenshots.takeScreenshot( - 'rule-types-index-threshold-select', - screenshotDirectories, - 1400, - 1024 - ); - await testSubjects.click('.index-threshold-SelectOption'); + await pageObjects.header.waitUntilLoadingHasFinished(); await commonScreenshots.takeScreenshot( 'rule-types-index-threshold-conditions', screenshotDirectories, 1400, 1300 ); - + await testSubjects.setValue('ruleNameInput', ruleName); + await testSubjects.click('tagsComboBox'); + await testSubjects.setValue('tagsComboBox', 'sample-data'); await testSubjects.scrollIntoView('selectIndexExpression'); await testSubjects.click('selectIndexExpression'); await comboBox.set('thresholdIndexesComboBox', 'kibana_sample_data_logs '); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/tracking_containment_rule.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/tracking_containment_rule.ts index 13de6e45a88d4..826c95cad10f7 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/tracking_containment_rule.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/tracking_containment_rule.ts @@ -20,10 +20,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await pageObjects.common.navigateToApp('triggersActions'); await pageObjects.header.waitUntilLoadingHasFinished(); await rules.common.clickCreateAlertButton(); - await testSubjects.click('solutionsFilterButton'); - await testSubjects.click('solutionstackAlertsFilterOption'); - await testSubjects.setValue('solutionsFilterButton', 'solutionstackAlertsFilterOption'); await testSubjects.click('.geo-containment-SelectOption'); + await pageObjects.header.waitUntilLoadingHasFinished(); await comboBox.setCustom('entitiesDataView', 'Kibana Sample Data Logs'); await commonScreenshots.takeScreenshot( 'alert-types-tracking-containment-conditions', diff --git a/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts b/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts index 0b6b70a6e174b..26ef92a2fc739 100644 --- a/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts +++ b/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts @@ -14,7 +14,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const transform = getService('transform'); const screenshotDirectories = ['transform_docs']; - const pageObjects = getPageObjects(['triggersActionsUI']); + const pageObjects = getPageObjects(['triggersActionsUI', 'header']); let testTransformId = ''; @@ -37,20 +37,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await transform.testExecution.logTestStep('navigate to stack management rules'); await transform.navigation.navigateToRules(); await pageObjects.triggersActionsUI.clickCreateAlertButton(); - await transform.alerting.setRuleName('transform-health-rule'); - - await transform.testExecution.logTestStep( - 'search for transform rule type and take screenshot' - ); - const searchBox = await testSubjects.find('ruleSearchField'); - await searchBox.click(); - await searchBox.clearValue(); - await searchBox.type('transform'); - await searchBox.pressKeys(browser.keys.ENTER); - await commonScreenshots.takeScreenshot('transform-rule', screenshotDirectories); - + await pageObjects.header.waitUntilLoadingHasFinished(); await transform.testExecution.logTestStep('select transform details and take screenshot'); await transform.alerting.selectTransformAlertType(); + await transform.alerting.setRuleName('transform-health-rule'); testTransformId = '*'; await transform.alerting.selectTransforms([testTransformId]); await commonScreenshots.takeScreenshot('transform-check-config', screenshotDirectories);