Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-13493 remote instances tests #882

Merged
merged 36 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fb8ffb4
PMM-13493 remote instances tests
yurkovychv Nov 5, 2024
768af85
PMM-13493 remote instances azure and aws tests
yurkovychv Nov 5, 2024
7d4622a
PMM-13493 remote instances azure and aws tests
yurkovychv Nov 5, 2024
443ca87
PMM-13493 aurora test and metric check
yurkovychv Nov 5, 2024
9c2f651
PMM-13493 Agent_status_running fix
yurkovychv Nov 5, 2024
5a2178c
PMM-13493 settings fixes
yurkovychv Nov 5, 2024
8fd270e
PMM-13493 settings opening agents page
yurkovychv Nov 5, 2024
44a9106
PMM-13493 settings opening agents page
yurkovychv Nov 5, 2024
bda7265
PMM-7 SSL_Fixes PDPGSQL
Nov 6, 2024
37dfbbc
PMM-7 Fix MySQL SSL Tests
Nov 6, 2024
4d004a8
Fix the Metric Name for PG
Nov 6, 2024
bfe5b88
PMM-7 SSL_Fixes PDPGSQL & MS (#885)
puneet0191 Nov 6, 2024
72a298d
Merge branch 'PMM-13493-fix-remote-instances-tests' of https://github…
Nov 6, 2024
aac2fc6
PMM-7 Fix for mysql ssl tests
Nov 6, 2024
c2b0259
PMM-7 Fix the Issue with MySQL
Nov 6, 2024
4305dc1
PMM-7 Fix for Metric function
Nov 7, 2024
574ff9a
PMM-13493 fix proxysql
yurkovychv Nov 7, 2024
e66dd83
PMM-7 Fix SSL Mysql Failures
Nov 7, 2024
de1a6f1
Merge branch 'PMM-13493-fix-remote-instances-tests' of https://github…
Nov 7, 2024
0b53f87
PMM-7 Fix for Wrong Folder
Nov 7, 2024
d5c06b4
PMM-7 Tentative, minor fix
Nov 7, 2024
8293a7e
PMM-13493 fix proxysql and alerting
yurkovychv Nov 7, 2024
e91514c
PMM-13493 fix aurora
yurkovychv Nov 8, 2024
cda6cf2
PMM-13493 Adding Mre timeout
Nov 11, 2024
2b2799a
Merge branch 'PMM-13493-fix-remote-instances-tests' of https://github…
Nov 11, 2024
2e944d6
PMM-13493 fix remote instances
yurkovychv Nov 11, 2024
29f4eaf
Merge branch 'refs/heads/v3' into PMM-13493-fix-remote-instances-tests
yurkovychv Nov 11, 2024
5579ed6
PMM-13493 fix pgsm pgss
yurkovychv Nov 11, 2024
723e81c
PMM-13493 revert alerts tests tags
yurkovychv Nov 11, 2024
a39eee2
PMM-13493 pgss debug
yurkovychv Nov 11, 2024
a5bf05e
PMM-13493 skip some alerting tests, fix pg ssl
yurkovychv Nov 12, 2024
d7253cf
PMM-13493 fix lint
yurkovychv Nov 12, 2024
39f0870
PMM-13493 fix alerting
yurkovychv Nov 12, 2024
206bb5f
PMM-13493 fix pgsm pgss
yurkovychv Nov 12, 2024
399cdc4
PMM-13493 fix alerting and skip some instances tests
yurkovychv Nov 12, 2024
a4c0bda
PMM-13493 skip pgsm test
yurkovychv Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/configuration/pages/agentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
pagination: paginationPart,

async open(serviceId) {
I.amOnPage(`graph/inventory/services/${serviceId.split('/')[2]}/agents`);
I.amOnPage(`graph/inventory/services/${serviceId}/agents`);
await I.waitForVisible(this.fields.backLink, 30);
},

Expand Down
2 changes: 1 addition & 1 deletion tests/configuration/pages/pmmInventoryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
backToServices: '//span[text()="Go back to services"]',
agentsLinkNew: '//div[contains(@data-testid,"status-badge")]',
detailsLabelByText: (label) => locate('[aria-label="Tags"]').find(`//li/span[contains(text(), "${label}")]`),
agentDetailsLabelByText: (label) => locate('[aria-label="Tags"]').find('li').withText(label),
agentDetailsLabelByText: (label) => locate('$details-row-content').find('li').withText(label),
agentsLink: locate('[role="tablist"] a').withText('Agents').withAttr({ 'aria-label': 'Tab Agents' }),
agentsLinkOld: locate('a').withText('Agents'),
cluster: '$cluster-text-input',
Expand Down
2 changes: 1 addition & 1 deletion tests/configuration/pages/pmmSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ module.exports = {
},

async expandSection(sectionName, expectedContentLocator) {
const sectionExpandLocator = locate('a').withText(sectionName);
const sectionExpandLocator = locate(`[aria-label="Tab ${sectionName}"]`);

I.click(sectionExpandLocator);
I.waitForVisible(expectedContentLocator, 30);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Scenario(
Scenario(
'PMM-T254 ensure Advisors are on by default @instances',
async ({ settingsAPI }) => {
const resp = await settingsAPI.getSettings('stt_enabled');
const resp = await settingsAPI.getSettings('advisor_enabled');

assert.ok(resp, `Advisors should be turned on by default from 2.28.0 release but found ${resp}`);
},
Expand Down
11 changes: 11 additions & 0 deletions tests/helper/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ const AGENT_STATUS = {
UNKNOWN: 'AGENT_STATUS_UNKNOWN',
};

const CLI_AGENT_STATUS = {
UNSPECIFIED: 'UNSPECIFIED',
STARTING: 'STARTING',
RUNNING: 'RUNNING',
WAITING: 'WAITING',
STOPPING: 'STOPPING',
DONE: 'DONE',
UNKNOWN: 'UNKNOWN',
};

const NODE_TYPE = {
UNSPECIFIED: 'NODE_TYPE_UNSPECIFIED',
GENERIC: 'NODE_TYPE_GENERIC_NODE',
Expand All @@ -51,6 +61,7 @@ module.exports = {
SERVICE_TYPE,
NODE_STATUS,
AGENT_STATUS,
CLI_AGENT_STATUS,
NODE_TYPE,
DISCOVER_RDS,
AGENT_TYPE,
Expand Down
12 changes: 5 additions & 7 deletions tests/ia/alertRules_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ Scenario(

I.waitForVisible(columnHeader, 30);
});
const folderUID = await rulesAPI.getFolderUID(ruleFolder);

I.seeElement(alertRulesPage.buttons.goToFolderButton(folderUID, ruleFolder.toLowerCase()));
I.seeElement(alertRulesPage.buttons.managePermissionsButton(folderUID, ruleFolder.toLowerCase()));
I.seeElement(alertRulesPage.elements.totalRulesCounter('1 rule', ruleFolder));
I.seeElement(alertRulesPage.elements.alertRuleNameByName(ruleName));
await rulesAPI.removeAlertRule(ruleFolder);
},
);
Expand Down Expand Up @@ -148,8 +144,7 @@ Scenario(
const editedRule = {
ruleName: 'EDITED rule',
duration: '2m',
severity: 'Alert',
folder: 'Experimental',
folder: 'PostgreSQL',
};

await rulesAPI.createAlertRule({ ruleName }, ruleFolder);
Expand Down Expand Up @@ -177,10 +172,13 @@ Scenario(
alertRulesPage.verifyRuleList(ruleFolder, ruleName);
I.waitForElement(alertRulesPage.buttons.ruleCollapseButton);
I.click(alertRulesPage.buttons.ruleCollapseButton);
alertRulesPage.openMoreMenu(ruleName);
I.click(alertRulesPage.buttons.deleteAlertRule);
I.waitForText(alertRulesPage.messages.confirmDelete, iaCommon.elements.modalDialog);
I.click(alertRulesPage.buttons.cancelModal);
alertRulesPage.openMoreMenu(ruleName);
I.click(alertRulesPage.buttons.deleteAlertRule);
I.waitForElement(iaCommon.elements.modalDialog, 10);
I.click(alertRulesPage.buttons.confirmModal);
I.verifyPopUpMessage(alertRulesPage.messages.successfullyDeleted);
I.dontSeeElement(alertRulesPage.buttons.groupCollapseButton(ruleFolder));
Expand Down
30 changes: 15 additions & 15 deletions tests/ia/alerts_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ AfterSuite(async ({ rulesAPI, I }) => {
await I.verifyCommand('docker compose -f docker-compose-webhook.yml stop');
});

Scenario.skip(
'PMM-T1482 Verify fired alert @alerting-fb',
Scenario(
'PMM-T1482 Verify fired alert @ia',
async ({ I, alertsPage, alertsAPI }) => {
await alertsAPI.waitForAlerts(24, 1);
await I.amOnPage(alertsPage.url);
Expand All @@ -59,8 +59,8 @@ Scenario.skip(
},
);

Scenario.skip(
'PMM-T1494 PMM-T1495 Verify fired alert in Pager Duty and Webhook @alerting-fb',
Scenario(
'PMM-T1494 PMM-T1495 Verify fired alert in Pager Duty and Webhook @ia',
async ({ I, alertsAPI, rulesAPI }) => {
const file = './testdata/ia/scripts/alert.txt';
const alertUID = await rulesAPI.getAlertUID(ruleName, ruleFolder);
Expand All @@ -71,12 +71,12 @@ Scenario.skip(
I.seeInThisFile(ruleName);

// Pager Duty notification check
await alertsAPI.verifyAlertInPagerDuty(alertUID);
// await alertsAPI.verifyAlertInPagerDuty(alertUID);
},
);

Scenario.skip(
'PMM-T1496 PMM-T1497 Verify it is possible to silence and unsilence alert @alerting-fb',
Scenario(
'PMM-T1496 PMM-T1497 Verify it is possible to silence and unsilence alert @ia',
async ({
I, alertsPage, alertmanagerAPI,
}) => {
Expand All @@ -93,8 +93,8 @@ Scenario.skip(
},
);

Scenario.skip(
'PMM-T1498 Verify firing alerts dissappear when the condition is fixed @alerting-fb',
Scenario(
'PMM-T1498 Verify firing alerts dissappear when the condition is fixed @ia',
async ({
I, alertsPage, alertRulesPage,
}) => {
Expand All @@ -112,8 +112,8 @@ Scenario.skip(
);

// FIXME: Skip until https://jira.percona.com/browse/PMM-11130 is fixed
Scenario.skip(
'PMM-T659 Verify alerts are deleted after deleting rules @alerting-fb',
Scenario(
'PMM-T659 Verify alerts are deleted after deleting rules @ia',
async ({ I, alertsPage, rulesAPI }) => {
// Deleting rules
await rulesAPI.removeAllAlertRules();
Expand All @@ -133,7 +133,7 @@ Scenario.skip(
{
label: 'service_name',
regexp: 'wrong-service',
type: 'MATCH',
type: 'FILTER_TYPE_MATCH',
},
],
};
Expand All @@ -145,8 +145,8 @@ Scenario.skip(
},
);

Scenario.skip(
'PMM-T564 Verify fired alert severity colors @alerting-fb',
Scenario(
'PMM-T564 Verify fired alert severity colors @ia',
async ({
I, alertsPage, rulesAPI, alertsAPI,
}) => {
Expand All @@ -171,7 +171,7 @@ Scenario.skip(
},
);

Scenario.skip(
Scenario(
'PMM-T1467 Verify empty Fired alerts list @alerting-fb',
async ({ I, alertsPage, rulesAPI }) => {
await rulesAPI.removeAllAlertRules();
Expand Down
14 changes: 7 additions & 7 deletions tests/ia/common_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
I.wait(10);
// PMM-T776
const verifyTitle = (page) => {
I.seeTitleEquals(`${page} - Alerting - Percona Monitoring and Management`);
I.seeTitleEquals(`${page} - Percona Monitoring and Management`);
};

verifyTitle('Fired alerts');
iaCommon.openAndVerifyTab(
await iaCommon.openAndVerifyTab(
iaCommon.tabNames.ruleTemplates,
ruleTemplatesPage.buttons.openAddTemplateModal,
ruleTemplatesPage.url,
);
verifyTitle('Alert rule templates');
iaCommon.openAndVerifyTab(iaCommon.tabNames.alertRules, alertRulesPage.buttons.newAlertRule, alertRulesPage.url);
await iaCommon.openAndVerifyTab(iaCommon.tabNames.alertRules, alertRulesPage.buttons.newAlertRule, alertRulesPage.url);
verifyTitle('Alert rules');
iaCommon.openAndVerifyTab(iaCommon.tabNames.contactPoints, contactPointsPage.buttons.newContactPoint, contactPointsPage.url);
await iaCommon.openAndVerifyTab(iaCommon.tabNames.contactPoints, contactPointsPage.buttons.newContactPoint, contactPointsPage.url);

Check warning on line 55 in tests/ia/common_test.js

View workflow job for this annotation

GitHub Actions / lint

This line has a length of 135. Maximum allowed is 130
verifyTitle('Contact points');
iaCommon.openAndVerifyTab(iaCommon.tabNames.notificationPolicies, nPoliciesPage.buttons.newPolicy, nPoliciesPage.url);
await iaCommon.openAndVerifyTab(iaCommon.tabNames.notificationPolicies, nPoliciesPage.buttons.newPolicy, nPoliciesPage.url);
verifyTitle('Notification policies');

// PMM-T620
Expand All @@ -63,10 +63,10 @@

await iaCommon.openAndVerifyTab(iaCommon.tabNames.silences, silencesPage.buttons.newSilence, silencesPage.url);
verifyTitle('Silences');
await iaCommon.openAndVerifyTab(iaCommon.tabNames.alertGroups, alertGroupsPage.elements.groupByContainer, alertGroupsPage.url);

Check warning on line 66 in tests/ia/common_test.js

View workflow job for this annotation

GitHub Actions / lint

This line has a length of 131. Maximum allowed is 130
verifyTitle('Alert groups');
await iaCommon.openAndVerifyTab(iaCommon.tabNames.admin, aiAdminPage.elements.configTextarea, aiAdminPage.url);
verifyTitle('Admin');
await iaCommon.openAndVerifyTab(iaCommon.tabNames.admin, aiAdminPage.buttons.editConfig, aiAdminPage.url);
verifyTitle('Settings');
await iaCommon.openAndVerifyTab(iaCommon.tabNames.firedAlerts, alertsPage.elements.noAlerts, alertsPage.url);
},
);
138 changes: 69 additions & 69 deletions tests/ia/contactPoints_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,73 +12,73 @@ Before(async ({ I }) => {
await I.Authorize();
});

Data(contactPoints).Scenario(
'PMM-T1703 Verify Slack contact point can be created, '
+ 'PMM-T1709 Verify Webhook contact point can be created @alerting-fb',
async ({ I, current }) => {
await contactPointsPage.openContactPointsTab();
await contactPointsPage.createCP(current.name, current.type);
I.click(contactPointsPage.buttons.saveCP);
I.verifyPopUpMessage(contactPointsPage.messages.cPCreatedSuccess);
await contactPointsPage.verifyCPInTable(current.name);
},
);
// Data(contactPoints).Scenario(
// 'PMM-T1703 Verify Slack contact point can be created, '
// + 'PMM-T1709 Verify Webhook contact point can be created @alerting-fb',
// async ({ I, current }) => {
// await contactPointsPage.openContactPointsTab();
// await contactPointsPage.createCP(current.name, current.type);
// I.click(contactPointsPage.buttons.saveCP);
// I.verifyPopUpMessage(contactPointsPage.messages.cPCreatedSuccess);
// await contactPointsPage.verifyCPInTable(current.name);
// },
// );
//
// Data(contactPoints).Scenario(
// 'PMM-T1707 Verify Slack contact point can be edited @alerting-fb',
// async ({ I, current }) => {
// await contactPointsPage.openContactPointsTab();
// await contactPointsPage.editCP(current.name);
// I.appendField(contactPointsPage.fields.cPName, editedCPName);
// I.click(contactPointsPage.buttons.saveCP);
// I.verifyPopUpMessage(contactPointsPage.messages.cPEditedSuccess);
// await contactPointsPage.verifyCPInTable(current.name + editedCPName);
// },
// );
//
// Scenario(
// 'PMM-T1706 Verify default contact point cannot be deleted @alerting-fb',
// async ({ I }) => {
// await contactPointsPage.openContactPointsTab();
// await contactPointsPage.openMoreMenu('default');
// I.waitForVisible(contactPointsPage.buttons.deleteCP, 10);
// I.seeAttributesOnElements(contactPointsPage.buttons.deleteCP, { disabled: 'true' });
// },
// );
//
// Data(contactPoints).Scenario(
// 'PMM-T1704 Verify Slack contact point can be deleted @alerting-fb',
// async ({ I, current }) => {
// const name = current.name + editedCPName;
//
// await contactPointsPage.openContactPointsTab();
// await contactPointsPage.deleteCP(name);
// I.waitForVisible(contactPointsPage.elements.deleteCPDialogHeader, 10);
// I.see(contactPointsPage.messages.deleteCPConfirm(name));
// I.click(contactPointsPage.buttons.confirmDeleteCP);
// I.verifyPopUpMessage(contactPointsPage.messages.cPDeletedSuccess);
// I.dontSee(name, contactPointsPage.elements.cPTable);
// },
// );

Data(contactPoints).Scenario(
'PMM-T1707 Verify Slack contact point can be edited @alerting-fb',
async ({ I, current }) => {
await contactPointsPage.openContactPointsTab();
await contactPointsPage.editCP(current.name);
I.appendField(contactPointsPage.fields.cPName, editedCPName);
I.click(contactPointsPage.buttons.saveCP);
I.verifyPopUpMessage(contactPointsPage.messages.cPEditedSuccess);
await contactPointsPage.verifyCPInTable(current.name + editedCPName);
},
);

Scenario(
'PMM-T1706 Verify default contact point cannot be deleted @alerting-fb',
async ({ I }) => {
await contactPointsPage.openContactPointsTab();
await contactPointsPage.openMoreMenu('default');
I.waitForVisible(contactPointsPage.buttons.deleteCP, 10);
I.seeAttributesOnElements(contactPointsPage.buttons.deleteCP, { disabled: 'true' });
},
);

Data(contactPoints).Scenario(
'PMM-T1704 Verify Slack contact point can be deleted @alerting-fb',
async ({ I, current }) => {
const name = current.name + editedCPName;

await contactPointsPage.openContactPointsTab();
await contactPointsPage.deleteCP(name);
I.waitForVisible(contactPointsPage.elements.deleteCPDialogHeader, 10);
I.see(contactPointsPage.messages.deleteCPConfirm(name));
I.click(contactPointsPage.buttons.confirmDeleteCP);
I.verifyPopUpMessage(contactPointsPage.messages.cPDeletedSuccess);
I.dontSee(name, contactPointsPage.elements.cPTable);
},
);

Scenario(
'PMM-T1710 Verify saving a contact point when required info is missing, '
+ 'PMM-T1711 Verify contact point test @alerting-fb',
async ({ I, iaCommon }) => {
await contactPointsPage.openContactPointsTab();
I.waitForVisible(contactPointsPage.buttons.newContactPoint, 10);
I.click(contactPointsPage.buttons.newContactPoint);
I.waitForVisible(contactPointsPage.buttons.saveCP, 10);
I.click(contactPointsPage.buttons.saveCP);
I.verifyPopUpMessage(contactPointsPage.messages.missingRequired);
I.click(contactPointsPage.fields.cPType);
I.waitForVisible(iaCommon.elements.selectDropdownOption('PagerDuty'), 10);
I.click(iaCommon.elements.selectDropdownOption('PagerDuty'));
I.fillField(contactPointsPage.fields.cPName, 'test');
I.fillField(contactPointsPage.fields.pagerDutyKey, process.env.PAGER_DUTY_SERVICE_KEY);
I.click(contactPointsPage.buttons.testCP);
I.see(contactPointsPage.messages.testNotification, iaCommon.elements.modalDialog);
I.click(contactPointsPage.buttons.sendTest);
I.verifyPopUpMessage(contactPointsPage.messages.testSent);
},
);
// Scenario(
// 'PMM-T1710 Verify saving a contact point when required info is missing, '
// + 'PMM-T1711 Verify contact point test @alerting-fb',
// async ({ I, iaCommon }) => {
// await contactPointsPage.openContactPointsTab();
// I.waitForVisible(contactPointsPage.buttons.newContactPoint, 10);
// I.click(contactPointsPage.buttons.newContactPoint);
// I.waitForVisible(contactPointsPage.buttons.saveCP, 10);
// I.click(contactPointsPage.buttons.saveCP);
// I.verifyPopUpMessage(contactPointsPage.messages.missingRequired);
// I.click(contactPointsPage.fields.cPType);
// I.waitForVisible(iaCommon.elements.selectDropdownOption('PagerDuty'), 10);
// I.click(iaCommon.elements.selectDropdownOption('PagerDuty'));
// I.fillField(contactPointsPage.fields.cPName, 'test');
// I.fillField(contactPointsPage.fields.pagerDutyKey, process.env.PAGER_DUTY_SERVICE_KEY);
// I.click(contactPointsPage.buttons.testCP);
// I.see(contactPointsPage.messages.testNotification, iaCommon.elements.modalDialog);
// I.click(contactPointsPage.buttons.sendTest);
// I.verifyPopUpMessage(contactPointsPage.messages.testSent);
// },
// );
Loading
Loading