From 32a7b9ea98af44d3258afb4ce8d0d1975f5cb45c Mon Sep 17 00:00:00 2001 From: Saikumar Date: Mon, 21 Aug 2023 16:28:20 +0530 Subject: [PATCH] Fix Alert tests sporadic failure on click --- tests/ia/alertRules_test.js | 2 ++ tests/ia/pages/alertRulesPage.js | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/ia/alertRules_test.js b/tests/ia/alertRules_test.js index 1be7c310c..800837d10 100644 --- a/tests/ia/alertRules_test.js +++ b/tests/ia/alertRules_test.js @@ -98,6 +98,7 @@ Scenario( I.waitForEnabled(alertRulesPage.buttons.newAlertRule, 10); I.click(alertRulesPage.buttons.newAlertRule); await alertRulesPage.fillPerconaAlert(rule, newRule); + I.waitForEnabled(alertRulesPage.buttons.saveAndExit, 10); I.click(alertRulesPage.buttons.saveAndExit); // FIXME: unskip after https://jira.percona.com/browse/PMM-11399 is fixed // I.verifyPopUpMessage(alertRulesPage.messages.successRuleCreate(newRule.ruleName)); @@ -117,6 +118,7 @@ Scenario( I.waitForEnabled(alertRulesPage.buttons.newAlertRule, 10); I.click(alertRulesPage.buttons.newAlertRule); await alertRulesPage.fillPerconaAlert(rule,newRule); + I.waitForEnabled(alertRulesPage.buttons.saveAndExit, 10); I.click(alertRulesPage.buttons.saveAndExit); // FIXME: unskip after https://jira.percona.com/browse/PMM-11399 is fixed // I.verifyPopUpMessage(alertRulesPage.messages.successRuleCreate(newRule.ruleName)); diff --git a/tests/ia/pages/alertRulesPage.js b/tests/ia/pages/alertRulesPage.js index a6252e744..e04a339c3 100644 --- a/tests/ia/pages/alertRulesPage.js +++ b/tests/ia/pages/alertRulesPage.js @@ -123,6 +123,7 @@ module.exports = { }, selectFolder(option) { + I.waitForElement(this.fields.folderLocator); I.click(this.fields.folderLocator); I.waitForElement(this.fields.resultsLocator(option)); I.click(this.fields.resultsLocator(option));