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-13599 add more tests to gh actions #910

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions tests/advisors/stt/sttSettings_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ After(async ({ settingsAPI }) => {
});

Scenario.skip(
'PMM-T649 PMM-T652 Verify default checks intervals / enabling intervals section @stt @settings @grafana-pr',
'PMM-T649 PMM-T652 Verify default checks intervals / enabling intervals section @stt @fb-settings @grafana-pr',
async ({
I, pmmSettingsPage, settingsAPI,
}) => {
Expand Down Expand Up @@ -47,7 +47,7 @@ Scenario.skip(
);

Scenario.skip(
'PMM-T650 PMM-T648 Verify user is able to set 0.1h check Frequency / custom check frequency @stt @settings',
'PMM-T650 PMM-T648 Verify user is able to set 0.1h check Frequency / custom check frequency @stt @fb-settings',
async ({
I, pmmSettingsPage,
}) => {
Expand Down Expand Up @@ -78,7 +78,7 @@ Scenario.skip(
);

Scenario.skip(
'PMM-T651 Verify Check Intervals validation @stt @settings @grafana-pr',
'PMM-T651 Verify Check Intervals validation @stt @fb-settings @grafana-pr',
async ({
I, pmmSettingsPage, current,
}) => {
Expand Down
6 changes: 3 additions & 3 deletions tests/cli/generic_test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Feature('Generic PMM Server CLI Tests');

BeforeSuite(async ({ I }) => {
await I.verifyCommand(`PMM_SERVER_IMAGE=${process.env.DOCKER_VERSION} docker-compose -f docker-compose-ubuntu.yml up -d`);
await I.verifyCommand(`PMM_SERVER_IMAGE=${process.env.DOCKER_VERSION} docker compose -f docker-compose-ubuntu.yml up -d`);
});

AfterSuite(async ({ I }) => {
await I.verifyCommand('docker rm -f pmm-server-default-scrape');
await I.verifyCommand('docker rm -f pmm-server-custom-scrape');
await I.verifyCommand('docker-compose -f docker-compose-ubuntu.yml down -v');
await I.verifyCommand('docker compose -f docker-compose-ubuntu.yml down -v');
});

After(async ({ I }) => {
Expand All @@ -21,7 +21,7 @@ After(async ({ I }) => {
});

Scenario(
'PMM-T1201 Verify yum-cron updates are removed from PMM Server @settings',
'PMM-T1201 Verify yum-cron updates are removed from PMM Server @fb-settings',
async ({ I }) => {
const pmm_server = await I.verifyCommand('docker ps --format "table {{.ID}}\\t{{.Image}}\\t{{.Names}}" | grep \'pmm-server\' | awk \'{print $3}\'');

Expand Down
26 changes: 13 additions & 13 deletions tests/configuration/verifyPMMSettingsPageElements_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ After(async ({ settingsAPI }) => {
await settingsAPI.changeSettings({ publicAddress: '' });
});

Data(dataRetentionTable).Scenario('PMM-T97 - Verify server diagnostics on PMM Settings Page @settings @grafana-pr', async ({ pmmSettingsPage, current }) => {
Data(dataRetentionTable).Scenario('PMM-T97 - Verify server diagnostics on PMM Settings Page @fb-settings @grafana-pr', async ({ pmmSettingsPage, current }) => {
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.advanced;

await pmmSettingsPage.waitForPmmSettingsPageLoaded();
await pmmSettingsPage.expandSection(sectionNameToExpand, pmmSettingsPage.fields.advancedButton);
pmmSettingsPage.checkDataRetentionInput(current.value, current.message);
});

Scenario('PMM-T84 - Verify Section Tabs and Metrics Section Elements [critical] @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
Scenario('PMM-T84 - Verify Section Tabs and Metrics Section Elements [critical] @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
await pmmSettingsPage.waitForPmmSettingsPageLoaded();
Object.values(pmmSettingsPage.sectionTabsList).forEach((value) => {
I.see(value, pmmSettingsPage.fields.tabsSection);
Expand All @@ -56,7 +56,7 @@ Scenario('PMM-T84 - Verify Section Tabs and Metrics Section Elements [critical]
});
});

Scenario('PMM-T85 - Verify SSH Key Section Elements @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
Scenario('PMM-T85 - Verify SSH Key Section Elements @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.ssh;

await pmmSettingsPage.waitForPmmSettingsPageLoaded();
Expand All @@ -65,7 +65,7 @@ Scenario('PMM-T85 - Verify SSH Key Section Elements @settings @grafana-pr', asyn
I.seeElement(pmmSettingsPage.fields.sshKeyInput);
});

Scenario('Verify Advanced Section Elements @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
Scenario('Verify Advanced Section Elements @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.advanced;

await pmmSettingsPage.waitForPmmSettingsPageLoaded();
Expand All @@ -82,7 +82,7 @@ Scenario('Verify Advanced Section Elements @settings @grafana-pr', async ({ I, p
I.seeElement(pmmSettingsPage.fields.sttLabel);
});

Scenario('PMM-T86 - Verify Alertmanager integration Section Elements @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
Scenario('PMM-T86 - Verify Alertmanager integration Section Elements @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.alertmanager;

await pmmSettingsPage.waitForPmmSettingsPageLoaded();
Expand All @@ -93,7 +93,7 @@ Scenario('PMM-T86 - Verify Alertmanager integration Section Elements @settings @
I.seeElement(pmmSettingsPage.fields.alertRulesInput);
});

// Scenario('PMM-T89 - Verify validation for invalid SSH Key @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
// Scenario('PMM-T89 - Verify validation for invalid SSH Key @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
// const sshKeyForTest = 'ssh-rsa testKey [email protected]';
// const sectionNameToExpand = pmmSettingsPage.sectionTabsList.ssh;

Expand All @@ -103,7 +103,7 @@ Scenario('PMM-T86 - Verify Alertmanager integration Section Elements @settings @
// I.verifyPopUpMessage(pmmSettingsPage.messages.invalidSSHKeyMessage);
// });

Scenario('PMM-T90 - Verify validation for Alertmanager URL without scheme @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
Scenario('PMM-T90 - Verify validation for Alertmanager URL without scheme @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
const urlWithoutScheme = 'invalid_url';
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.alertmanager;

Expand All @@ -113,7 +113,7 @@ Scenario('PMM-T90 - Verify validation for Alertmanager URL without scheme @setti
I.verifyPopUpMessage(pmmSettingsPage.messages.invalidAlertmanagerMissingSchemeMessage);
});

Scenario('PMM-T91 - Verify validation for Alertmanager URL without host @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
Scenario('PMM-T91 - Verify validation for Alertmanager URL without host @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
const urlWithoutHost = 'http://';
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.alertmanager;

Expand All @@ -123,7 +123,7 @@ Scenario('PMM-T91 - Verify validation for Alertmanager URL without host @setting
I.verifyPopUpMessage(pmmSettingsPage.messages.invalidAlertmanagerMissingHostMessage);
});

Scenario('PMM-T92 - Verify validation for invalid Alertmanager Rule @settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
Scenario('PMM-T92 - Verify validation for invalid Alertmanager Rule @fb-settings @grafana-pr', async ({ I, pmmSettingsPage }) => {
const rule = 'invalid_rule';
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.alertmanager;

Expand All @@ -135,7 +135,7 @@ Scenario('PMM-T92 - Verify validation for invalid Alertmanager Rule @settings @g

// To be removed from Skip after https://jira.percona.com/browse/PMM-5791
xScenario(
'PMM-T227 Open PMM Settings page and verify DATA_RETENTION value is set to 2 days @settings',
'PMM-T227 Open PMM Settings page and verify DATA_RETENTION value is set to 2 days @fb-settings',
async ({ I, pmmSettingsPage }) => {
const dataRetention = '2';

Expand All @@ -145,7 +145,7 @@ xScenario(
);

Scenario(
'@PMM-T1519 Verify that alerting link inside settings forwarding to correct page @settings',
'@PMM-T1519 Verify that alerting link inside settings forwarding to correct page @fb-settings',
async ({ I, pmmSettingsPage, alertsPage }) => {
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.alertmanager;

Expand All @@ -158,7 +158,7 @@ Scenario(
);

Scenario(
'@PMM-T1820 - Verify DBaaS deprecation warning @settings @fb-settings',
'@PMM-T1820 - Verify DBaaS deprecation warning @fb-settings @fb-settings',
async ({
I, pmmSettingsPage, settingsAPI, dbaasPage,
}) => {
Expand All @@ -175,7 +175,7 @@ Scenario(
},
);

Scenario('@PMM-T1866 - Verify if public address has an port assigned and following UI/API requests dont error @settings', async ({ I, pmmSettingsPage, adminPage }) => {
Scenario('@PMM-T1866 - Verify if public address has an port assigned and following UI/API requests dont error @fb-settings', async ({ I, pmmSettingsPage, adminPage }) => {
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.advanced;

await pmmSettingsPage.waitForPmmSettingsPageLoaded();
Expand Down
24 changes: 12 additions & 12 deletions tests/configuration/verifyPMMSettingsPageFunctionality_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Before(async ({ I, settingsAPI }) => {
await settingsAPI.restoreSettingsDefaults();
});

Scenario('PMM-T93 - Open PMM Settings page and verify changing Metrics Resolution [critical] @settings @grafana-pr', async ({
Scenario('PMM-T93 - Open PMM Settings page and verify changing Metrics Resolution [critical] @fb-settings @grafana-pr', async ({
I,
pmmSettingsPage,
}) => {
Expand All @@ -62,7 +62,7 @@ Scenario('PMM-T93 - Open PMM Settings page and verify changing Metrics Resolutio
await pmmSettingsPage.verifySelectedResolution(resolutionToApply);
});

Scenario('PMM-T94 - Open PMM Settings page and verify changing Data Retention [critical] @settings', async ({
Scenario('PMM-T94 - Open PMM Settings page and verify changing Data Retention [critical] @fb-settings', async ({
I,
pmmSettingsPage,
}) => {
Expand All @@ -84,7 +84,7 @@ Scenario('PMM-T94 - Open PMM Settings page and verify changing Data Retention [c

// TODO: check ovf failure
Scenario(
'PMM-T108 - Open PMM Settings page and verify adding Alertmanager Rule [critical] PMM-T109 - Verify adding and clearing Alertmanager rules @not-ovf @settings',
'PMM-T108 - Open PMM Settings page and verify adding Alertmanager Rule [critical] PMM-T109 - Verify adding and clearing Alertmanager rules @not-ovf @fb-settings',
async ({ I, pmmSettingsPage }) => {
const scheme = 'http://';
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.alertmanager;
Expand All @@ -111,7 +111,7 @@ Scenario(
);

Scenario.skip(
'PMM-T253 Verify user can see correct tooltip for STT [trivial] @settings @stt @grafana-pr',
'PMM-T253 Verify user can see correct tooltip for STT [trivial] @fb-settings @stt @grafana-pr',
async ({ I, pmmSettingsPage }) => {
const sectionNameToExpand = pmmSettingsPage.sectionTabsList.advanced;

Expand All @@ -125,7 +125,7 @@ Scenario.skip(
);

Scenario.skip(
'PMM-T254 PMM-T253 Verify disable telemetry while Advisors enabled @settings @stt @grafana-pr',
'PMM-T254 PMM-T253 Verify disable telemetry while Advisors enabled @fb-settings @stt @grafana-pr',
async ({ I, pmmSettingsPage }) => {
I.amOnPage(pmmSettingsPage.advancedSettingsUrl);
await pmmSettingsPage.waitForPmmSettingsPageLoaded();
Expand Down Expand Up @@ -184,7 +184,7 @@ Scenario('PMM-T520 - Verify that alert is being fired to external Alert Manager
});

Scenario(
'PMM-T532 PMM-T533 PMM-T536 - Verify user can disable/enable IA in Settings @ia @settings',
'PMM-T532 PMM-T533 PMM-T536 - Verify user can disable/enable IA in Settings @ia @fb-settings',
async ({
I, pmmSettingsPage, settingsAPI, adminPage,
}) => {
Expand Down Expand Up @@ -228,7 +228,7 @@ Scenario(
);

Data(communicationDefaults).Scenario(
'PMM-T534 PMM-T535 PMM-T1074 - Verify user is able to set up default Email/Slack communication settings / validation @ia @settings @grafana-pr',
'PMM-T534 PMM-T535 PMM-T1074 - Verify user is able to set up default Email/Slack communication settings / validation @ia @fb-settings @grafana-pr',
async ({
I, pmmSettingsPage, settingsAPI, current,
}) => {
Expand All @@ -246,7 +246,7 @@ Data(communicationDefaults).Scenario(
);

Scenario(
'PMM-T747 - Verify enabling Azure flag @instances',
'PMM-T747 - Verify enabling Azure flag @fb-instances',
async ({
I, pmmSettingsPage, remoteInstancesPage, settingsAPI,
}) => {
Expand Down Expand Up @@ -334,7 +334,7 @@ Scenario(
).retry(2);

Scenario(
'PMM-T486 - Verify Public Address in PMM Settings @settings @nightly',
'PMM-T486 - Verify Public Address in PMM Settings @fb-settings @nightly',
async ({ I, pmmSettingsPage, settingsAPI }) => {
await settingsAPI.changeSettings({ publicAddress: '' });
await pmmSettingsPage.openAdvancedSettings();
Expand Down Expand Up @@ -362,7 +362,7 @@ Scenario(
).retry(2);

Scenario(
'PMM-T254 ensure Advisors are on by default @instances',
'PMM-T254 ensure Advisors are on by default @fb-instances',
async ({ settingsAPI }) => {
const resp = await settingsAPI.getSettings('stt_enabled');

Expand All @@ -372,7 +372,7 @@ Scenario(

Scenario(
'@PMM-T1227 @PMM-T1338 - Verify tooltip "Read more" links on PMM Settings page redirect to working pages '
+ 'Verify that all the metrics from config are displayed on Telemetry tooltip in Settings > Advanced @settings',
+ 'Verify that all the metrics from config are displayed on Telemetry tooltip in Settings > Advanced @fb-settings',
async ({ I, pmmSettingsPage, settingsAPI }) => {
await settingsAPI.changeSettings({ alerting: true });

Expand All @@ -392,7 +392,7 @@ Scenario(
},
);

Scenario('PMM-T1401 Verify Percona Alerting wording in Settings @max-length @settings', async ({
Scenario('PMM-T1401 Verify Percona Alerting wording in Settings @max-length @fb-settings', async ({
I,
pmmSettingsPage,
}) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/configuration/verifyServerAdminSettings_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Before(async ({ I }) => {
});

Scenario(
'PMM-T1110 - Verify Grafana using Postgres database @settings',
'PMM-T1110 - Verify Grafana using Postgres database @fb-settings',
async ({ pmmServerAdminSettingsPage }) => {
pmmServerAdminSettingsPage.open();
await pmmServerAdminSettingsPage.verifyDatabaseType('postgres');
Expand Down
19 changes: 1 addition & 18 deletions tests/pages/remoteInstancesPage.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const {
I, adminPage, pmmInventoryPage, codeceptjsConfig, remoteInstancesHelper,
} = inject();
const assert = require('assert');

const url = new URL(codeceptjsConfig.config.helpers.Playwright.url);

module.exports = {
accessKey: remoteInstancesHelper.remote_instance.aws.aws_access_key,
Expand Down Expand Up @@ -119,6 +116,7 @@ module.exports = {
doNotTrack: locate('label').withText('Don\'t track'),
environment: '$environment-text-input',
hostName: '$address-text-input',
protocol: locate('$schema-radio-state'),
iframe: '//div[@class="panel-content"]//iframe',
metricsPath: '$metrics_path-text-input',
noCredentialsError: '//div[text()="No credentials provided and IAM role is not defined"]',
Expand Down Expand Up @@ -611,21 +609,6 @@ module.exports = {
I.click(this.fields.setManualy);
},

async checkParsing(metricsPath, credentials) {
const grabbedHostname = await I.grabValueFrom(this.fields.hostName);
const grabbedMetricPath = await I.grabValueFrom(this.fields.metricsPath);
const grabbedPort = await I.grabValueFrom(this.fields.portNumber);
const grabbedCredentials = await I.grabValueFrom(this.fields.userName);
const protocol = locate('$schema-radio-state');

assert.ok(grabbedHostname === process.env.MONITORING_HOST, `Hostname is not parsed correctly: ${grabbedHostname}`);
assert.ok(grabbedMetricPath === metricsPath, `Metrics path is not parsed correctly: ${grabbedMetricPath}`);
assert.ok(grabbedPort === process.env.EXTERNAL_EXPORTER_PORT, `Port is not parsed correctly: ${grabbedPort}`);
assert.ok(grabbedCredentials === credentials, `Username is not parsed correctly: ${grabbedCredentials}`);
assert.ok(grabbedCredentials === credentials, `Password is not parsed correctly: ${grabbedCredentials}`);
I.seeAttributesOnElements(protocol, { value: 'https' });
},

checkRequiredField() {
I.waitForVisible(this.fields.requiredFieldHostname, 30);
I.waitForVisible(this.fields.requiredFieldPort, 30);
Expand Down
2 changes: 1 addition & 1 deletion tests/verifyAddInstance_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Before(async ({ I }) => {
});

Scenario(
'PMM-T1106 - Verify the name RDS button on Add instance page @instances',
'PMM-T1106 - Verify the name RDS button on Add instance page @fb-instances',
async ({ I, addInstancePage }) => {
addInstancePage.open();
I.waitForVisible(addInstancePage.fields.addAmazonRDSbtn, 30);
Expand Down
Loading
Loading