2c9b77c425
* Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests
105 lines
2.3 KiB
TypeScript
105 lines
2.3 KiB
TypeScript
import moment from "moment";
|
|
|
|
export default class AdvancedTab {
|
|
private setToNow = "#setToNow";
|
|
private clear = "#clear";
|
|
private push = "#push";
|
|
private notBefore = "#kc-not-before";
|
|
|
|
private clusterNodesExpand =
|
|
".pf-c-expandable-section .pf-c-expandable-section__toggle";
|
|
private testClusterAvailability = "#testClusterAvailability";
|
|
private registerNodeManually = "no-nodes-registered-empty-action";
|
|
private nodeHost = "#nodeHost";
|
|
private addNodeConfirm = "#add-node-confirm";
|
|
|
|
private accessTokenSignatureAlgorithm = "#accessTokenSignatureAlgorithm";
|
|
private fineGrainSave = "#fineGrainSave";
|
|
private fineGrainRevert = "#fineGrainRevert";
|
|
|
|
private advancedTab = "#pf-tab-advanced-advanced";
|
|
|
|
goToTab() {
|
|
cy.get(this.advancedTab).click();
|
|
return this;
|
|
}
|
|
|
|
clickSetToNow() {
|
|
cy.get(this.setToNow).click();
|
|
return this;
|
|
}
|
|
|
|
clickClear() {
|
|
cy.get(this.clear).click();
|
|
return this;
|
|
}
|
|
|
|
clickPush() {
|
|
cy.get(this.push).click();
|
|
return this;
|
|
}
|
|
|
|
checkNone() {
|
|
cy.get(this.notBefore).should("have.value", "None");
|
|
|
|
return this;
|
|
}
|
|
|
|
checkSetToNow() {
|
|
cy.get(this.notBefore).should("have.value", moment().format("LLL"));
|
|
|
|
return this;
|
|
}
|
|
|
|
expandClusterNode() {
|
|
cy.get(this.clusterNodesExpand).click();
|
|
return this;
|
|
}
|
|
|
|
checkTestClusterAvailability(active: boolean) {
|
|
cy.get(this.testClusterAvailability).should(
|
|
(active ? "not." : "") + "have.class",
|
|
"pf-m-disabled"
|
|
);
|
|
return this;
|
|
}
|
|
|
|
clickRegisterNodeManually() {
|
|
cy.getId(this.registerNodeManually).click();
|
|
return this;
|
|
}
|
|
|
|
fillHost(host: string) {
|
|
cy.get(this.nodeHost).type(host);
|
|
return this;
|
|
}
|
|
|
|
clickSaveHost() {
|
|
cy.get(this.addNodeConfirm).click();
|
|
return this;
|
|
}
|
|
|
|
selectAccessTokenSignatureAlgorithm(algorithm: string) {
|
|
cy.get(this.accessTokenSignatureAlgorithm).click();
|
|
cy.get(this.accessTokenSignatureAlgorithm + " + ul")
|
|
.contains(algorithm)
|
|
.click();
|
|
|
|
return this;
|
|
}
|
|
|
|
checkAccessTokenSignatureAlgorithm(algorithm: string) {
|
|
cy.get(this.accessTokenSignatureAlgorithm).should("have.text", algorithm);
|
|
return this;
|
|
}
|
|
|
|
clickSaveFineGrain() {
|
|
cy.get(this.fineGrainSave).click();
|
|
return this;
|
|
}
|
|
|
|
clickRevertFineGrain() {
|
|
cy.get(this.fineGrainRevert).click();
|
|
return this;
|
|
}
|
|
}
|