bfa0c6e1ea
* initial version of the advanced tab * added registered nodes * added fine grain open id connect configuration * added open id connect compatibility section * added advanced section * added backend * fixed type * renamed 'advanced' to advancedtab to prevent strange add of '/index.js' by snowpack * fixed storybook stories * change '_' to '-' because '_' is also used * fix spacing buttons * stop passing the form * cypress test for advanced tab * more tests * saml section * changed to use NumberInput * added authetnication flow override * fixed merge error * updated text and added link to settings tab * fixed test * added filter on flows and better reset * added now mandetory error handler * added sorting * Revert "changed to use NumberInput" This reverts commit 7829f2656ae8fc8ed4a4a6b1c4b1961241a09d8e. * allow users to put empty string as value * already on detail page after save * fixed merge error
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 = "#registerNodeManually";
|
|
private nodeHost = "#nodeHost";
|
|
private addNodeConfirm = "#add-node-confirm";
|
|
|
|
private accessTokenSignatureAlgorithm = "#accessTokenSignatureAlgorithm";
|
|
private fineGrainSave = "#fineGrainSave";
|
|
private fineGrainReload = "#fineGrainReload";
|
|
|
|
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.get(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;
|
|
}
|
|
|
|
clickReloadFineGrain() {
|
|
cy.get(this.fineGrainReload).click();
|
|
return this;
|
|
}
|
|
}
|