Skip to content

Commit

Permalink
Updates, renames
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumar-vs committed Sep 23, 2023
1 parent 9eeddde commit 1cb62fd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 75 deletions.
84 changes: 9 additions & 75 deletions tests/configuration/pages/pmmInventoryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,6 @@ const servicesTab = require('./servicesTab');
const service = (serviceName) => `//span[contains(text(),'${serviceName}')]`;

module.exports = {
postgresGCSettings: {
environment: 'Remote PostgreSQL_GC env new',
cluster: 'Remote PostgreSQL_GC cluster new',
replicationSet: 'Remote PostgreSQL_GC replica-new',
},
mysqlSettings: {
environment: 'remote-mysql-new',
cluster: 'remote-mysql-cluster-new',
replicationSet: 'remote-mysql-replica-new',
},
potgresqlSettings: {
environment: 'remote-postgres-new',
cluster: 'remote-postgres-cluster-new',
replicationSet: 'remote-postgres-replica-new',
},
mongodbSettings: {
environment: 'remote-mongodb-new',
cluster: 'remote-mongodb-cluster-new',
replicationSet: 'remote-mongodb-replica-new',
},
proxysqlSettings: {
environment: 'remote-proxysql-new',
cluster: 'remote-proxysql-cluster-new',
replicationSet: 'remote-proxysql-replica-new',
},
externalSettings: {
environment: 'remote-external-service-new',
cluster: 'remote-external-cluster-new',
replicationSet: 'remote-external-replica-new',
},
postgresqlAzureInputs: {
userName: remoteInstancesHelper.remote_instance.azure.azure_postgresql.userName,
password: remoteInstancesHelper.remote_instance.azure.azure_postgresql.password,
environment: 'Azure PostgreSQL environment new',
cluster: 'Azure PostgreSQL cluster new',
replicationSet: 'Azure PostgreSQL replica new',
},
mysqlAzureInputs: {
userName: remoteInstancesHelper.remote_instance.azure.azure_mysql.userName,
password: remoteInstancesHelper.remote_instance.azure.azure_mysql.password,
environment: 'Azure MySQL environment new',
cluster: 'Azure MySQL cluster new',
replicationSet: 'Azure MySQL replica new',
},
mysqlInputs: {
userName: remoteInstancesHelper.remote_instance.aws.aws_rds_5_6.username,
password: remoteInstancesHelper.remote_instance.aws.aws_rds_5_6.password,
environment: 'RDS MySQL 5.6 new',
cluster: 'rds56-cluster new',
replicationSet: 'rds56-replication new',
},
mysql57rdsInput: {
userName: remoteInstancesHelper.remote_instance.aws.aws_rds_5_7.username,
password: remoteInstancesHelper.remote_instance.aws.aws_rds_5_7.password,
environment: 'RDS MySQL 5.7 new',
cluster: 'rds57-cluster new',
replicationSet: 'rds57-replication new',
},
mysql80rdsInput: {
userName: remoteInstancesHelper.remote_instance.aws.aws_rds_8_0.username,
password: remoteInstancesHelper.remote_instance.aws.aws_rds_8_0.password,
environment: 'RDS MySQL 8.0 new',
cluster: 'rds80-cluster new',
replicationSet: 'rds80-replication new',
},
postgresqlInputs: {
userName: remoteInstancesHelper.remote_instance.aws.aws_postgresql_12.userName,
password: remoteInstancesHelper.remote_instance.aws.aws_postgresql_12.password,
environment: 'RDS Postgres new',
cluster: 'rdsPostgres-cluster new',
replicationSet: 'rdsPostgres-replication new',
},
url: 'graph/inventory?orgId=1',
fields: {
servicesLink: locate('[role="tablist"] a').withText('Services').withAttr({ 'aria-label': 'Tab Services' }),
Expand All @@ -97,7 +25,7 @@ module.exports = {
deleteButton: locate('span').withText('Delete'),
environment: '$environment-text-input',
externalExporter: locate('td').withText('External exporter'),
editAction: locate('span').withText('Edit'),
editButton: locate('span').withText('Edit'),
editText: locate('h3').withText('Editing'),
forceModeCheckbox: locate('$force-field-label'),
inventoryTable: locate('table'),
Expand Down Expand Up @@ -492,8 +420,8 @@ module.exports = {
async editRemoteService(serviceName) {
I.waitForElement(this.fields.kebabMenu(serviceName), 30);
I.click(this.fields.kebabMenu(serviceName));
I.waitForElement(this.fields.editAction, 30);
I.click(this.fields.editAction);
I.waitForElement(this.fields.editButton, 30);
I.click(this.fields.editButton);
I.waitForElement(this.fields.editText, 30);
I.seeElement(this.fields.editText);
this.clearFields();
Expand Down Expand Up @@ -535,6 +463,12 @@ module.exports = {
'azure-PostgreSQL': function () {
return (this.data.postgresqlAzureInputs);

Check warning on line 464 in tests/configuration/pages/pmmInventoryPage.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected unnamed method 'azure-MySQL'
},
'pmm-qa-aurora2-mysql-instance-1': function () {
return (this.data.postgresqlAzureInputs);

Check warning on line 467 in tests/configuration/pages/pmmInventoryPage.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected unnamed method 'azure-PostgreSQL'
},
'pmm-qa-aurora3-mysql-instance-1': function () {
return (this.data.postgresqlAzureInputs);

Check warning on line 470 in tests/configuration/pages/pmmInventoryPage.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected unnamed method 'pmm-qa-aurora2-mysql-instance-1'
},
};
editActions.set(testData);

Check warning on line 473 in tests/configuration/pages/pmmInventoryPage.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected unnamed method 'pmm-qa-aurora3-mysql-instance-1'
this.fillFields(editActions[serviceName](testData));
Expand Down
15 changes: 15 additions & 0 deletions tests/configuration/testData.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,19 @@ module.exports = {
cluster: 'rdsPostgres-cluster new',
replicationSet: 'rdsPostgres-replication new',
},
aurora2Inputs: {
userName: remoteInstancesHelper.remote_instance.aws.aurora.aurora2.address,
password: remoteInstancesHelper.remote_instance.aws.aurora.aurora2.password,
environment: 'Aurora2 Postgres new',
cluster: 'Aurora2-cluster new',
replicationSet: 'Aurora2-replication new',
},

aurora3Inputs: {
userName: remoteInstancesHelper.remote_instance.aws.aurora.aurora3.address,
password: remoteInstancesHelper.remote_instance.aws.aurora.aurora3.password,
environment: 'Aurora2 Postgres new',
cluster: 'Aurora2-cluster new',
replicationSet: 'Aurora2-replication new',
},
};

0 comments on commit 1cb62fd

Please sign in to comment.