From 7880f5fb750066c45b33887036b3413c2c156c82 Mon Sep 17 00:00:00 2001 From: Saikumar Date: Mon, 16 Oct 2023 20:35:09 +0530 Subject: [PATCH 1/4] Test for PMM-12442 - Let users see full summary message on Fired alerts tab --- tests/ia/alerts_test.js | 17 +++++++++++++++++ tests/ia/pages/alertRulesPage.js | 1 + 2 files changed, 18 insertions(+) diff --git a/tests/ia/alerts_test.js b/tests/ia/alerts_test.js index ff34286b8..a1ce8abdc 100644 --- a/tests/ia/alerts_test.js +++ b/tests/ia/alerts_test.js @@ -181,3 +181,20 @@ Scenario( I.seeElement(alertsPage.elements.noAlerts); }, ); + +Scenario( + 'PMM-12442 Let users see full summary message on Fired alerts tab @ia', + async ({ + I, alertsPage, alertRulesPage, + }) => { + I.amOnPage(alertsPage.url); + I.waitForElement(alertsPage.elements.firedAlertLink(ruleName), 180); + I.click(alertsPage.elements.firedAlertLink(ruleName)); + I.click(alertRulesPage.buttons.editRuleOnView); + let summaryText = String("PostgreSQL too many connections, PMM-12442 Let users see full summary message on Fired alerts tab"); + I.fillField(alertRulesPage.fields.editSummary, summaryText); + I.click(alertRulesPage.buttons.saveAndExit); + I.amOnPage(alertsPage.url); + I.waitForText(summaryText,180); + }, +); \ No newline at end of file diff --git a/tests/ia/pages/alertRulesPage.js b/tests/ia/pages/alertRulesPage.js index e04a339c3..80f4ce730 100644 --- a/tests/ia/pages/alertRulesPage.js +++ b/tests/ia/pages/alertRulesPage.js @@ -51,6 +51,7 @@ module.exports = { editRuleThreshold: 'input[name=\'evaluateFor\']', editRuleEvaluate: 'input[name=\'evaluateEvery\']', editRuleSeverity: I.useDataQA('label-value-1'), + editSummary: I.useDataQA('annotation-value-1'), templatesLoader: locate('//div[@id=\'template\']').find('div').withText('Choose'), }, messages: { From 3cc78f8da85063a054abc007c0a1016883fe4748 Mon Sep 17 00:00:00 2001 From: Saikumar Date: Mon, 16 Oct 2023 21:50:15 +0530 Subject: [PATCH 2/4] - Improvements --- tests/ia/alerts_test.js | 3 ++- tests/ia/pages/alertRulesPage.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ia/alerts_test.js b/tests/ia/alerts_test.js index a1ce8abdc..9bee7353a 100644 --- a/tests/ia/alerts_test.js +++ b/tests/ia/alerts_test.js @@ -191,10 +191,11 @@ Scenario( I.waitForElement(alertsPage.elements.firedAlertLink(ruleName), 180); I.click(alertsPage.elements.firedAlertLink(ruleName)); I.click(alertRulesPage.buttons.editRuleOnView); - let summaryText = String("PostgreSQL too many connections, PMM-12442 Let users see full summary message on Fired alerts tab"); + let summaryText = String("PostgreSQL very long text for Summary, PMM-12442 Let users see full summary message on Fired alerts tab"); I.fillField(alertRulesPage.fields.editSummary, summaryText); I.click(alertRulesPage.buttons.saveAndExit); I.amOnPage(alertsPage.url); I.waitForText(summaryText,180); + I.see(summaryText, alertRulesPage.fields.tableBody); }, ); \ No newline at end of file diff --git a/tests/ia/pages/alertRulesPage.js b/tests/ia/pages/alertRulesPage.js index 80f4ce730..9fcab401f 100644 --- a/tests/ia/pages/alertRulesPage.js +++ b/tests/ia/pages/alertRulesPage.js @@ -53,6 +53,7 @@ module.exports = { editRuleSeverity: I.useDataQA('label-value-1'), editSummary: I.useDataQA('annotation-value-1'), templatesLoader: locate('//div[@id=\'template\']').find('div').withText('Choose'), + tableBody : I.useDataQA('table-tbody'), }, messages: { noRulesFound: 'You haven`t created any alert rules yet', From 8e3f38fea4c638a3410326c7f6f280a632debb99 Mon Sep 17 00:00:00 2001 From: saikumar-vs <112166980+saikumar-vs@users.noreply.github.com> Date: Mon, 16 Oct 2023 22:21:48 +0530 Subject: [PATCH 3/4] Update alerts_test.js --- tests/ia/alerts_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ia/alerts_test.js b/tests/ia/alerts_test.js index 9bee7353a..ddb8831bb 100644 --- a/tests/ia/alerts_test.js +++ b/tests/ia/alerts_test.js @@ -198,4 +198,4 @@ Scenario( I.waitForText(summaryText,180); I.see(summaryText, alertRulesPage.fields.tableBody); }, -); \ No newline at end of file +); From 7f8c04607cd5c2765e5ea860802333ed3e8f59b7 Mon Sep 17 00:00:00 2001 From: saikumar-vs <112166980+saikumar-vs@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:39:48 +0530 Subject: [PATCH 4/4] Update alerts_test.js Add alerting tag for fb runs --- tests/ia/alerts_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ia/alerts_test.js b/tests/ia/alerts_test.js index ddb8831bb..eb6213419 100644 --- a/tests/ia/alerts_test.js +++ b/tests/ia/alerts_test.js @@ -183,7 +183,7 @@ Scenario( ); Scenario( - 'PMM-12442 Let users see full summary message on Fired alerts tab @ia', + 'PMM-12442 Let users see full summary message on Fired alerts tab @ia @alerting-fb', async ({ I, alertsPage, alertRulesPage, }) => {