Add clustering nodes tests (#3008)

This commit is contained in:
Aboullos 2022-07-27 17:10:26 +02:00 committed by GitHub
parent 988aefd7d3
commit e556db69fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -680,8 +680,16 @@ describe("Clients test", () => {
it("Clustering", () => {
advancedTab.expandClusterNode();
advancedTab.checkEmptyClusterNode();
advancedTab.registerNodeManually().fillHost("localhost").saveHost();
advancedTab.checkTestClusterAvailability(true);
advancedTab.deleteClusterNode();
commonPage.modalUtils().confirmModal();
commonPage
.masthead()
.checkNotificationMessage("Node successfully removed");
advancedTab.checkEmptyClusterNode();
});
it("Fine grain OpenID connect configuration", () => {

View file

@ -9,7 +9,12 @@ export default class AdvancedTab extends CommonPage {
private clusterNodesExpandBtn =
".pf-c-expandable-section .pf-c-expandable-section__toggle";
private testClusterAvailability = "#testClusterAvailability";
private emptyClusterElement = "empty-state";
private registerNodeManuallyBtn = "no-nodes-registered-empty-action";
private deleteClusterNodeDrpDwn =
'[aria-label="registeredClusterNodes"] [aria-label="Actions"]';
private deleteClusterNodeBtn =
'[aria-label="registeredClusterNodes"] [role="menu"] button';
private nodeHostInput = "#nodeHost";
private addNodeConfirmBtn = "#add-node-confirm";
@ -63,11 +68,22 @@ export default class AdvancedTab extends CommonPage {
return this;
}
checkEmptyClusterNode() {
cy.findByTestId(this.emptyClusterElement).should("exist");
return this;
}
registerNodeManually() {
cy.findByTestId(this.registerNodeManuallyBtn).click();
return this;
}
deleteClusterNode() {
cy.get(this.deleteClusterNodeDrpDwn).click();
cy.get(this.deleteClusterNodeBtn).click();
return this;
}
fillHost(host: string) {
cy.get(this.nodeHostInput).type(host);
return this;