keycloak-scim/cypress/support/pages/admin_console/manage/clients/InitialAccessTokenTab.ts
Erik Jan de Wit 50920b3df2
Added rename group and adding members to a group (#448)
* users can now rename groups

* add members to a group

* added cypress test

* remove rename and delete when no group is selected

* added test

* keep selected rows form other pages

* fixed empty first page and cancel button
2021-03-24 10:07:49 -04:00

45 lines
1 KiB
TypeScript

export default class InitialAccessTokenTab {
private initialAccessTokenTab = "initialAccessToken";
private emptyAction = "empty-primary-action";
private expirationInput = "expiration";
private countInput = "count";
private saveBtn = "save";
goToInitialAccessTokenTab() {
cy.getId(this.initialAccessTokenTab).click();
return this;
}
shouldBeEmpty() {
cy.getId(this.emptyAction).should("exist");
return this;
}
shouldNotBeEmpty() {
cy.getId(this.emptyAction).should("not.exist");
return this;
}
getFistId(callback: (id: string) => void) {
cy.get('tbody > tr > [data-label="ID"]')
.invoke("text")
.then((text) => {
callback(text);
});
return this;
}
createNewToken(expiration: number, count: number) {
cy.getId(this.emptyAction).click();
cy.getId(this.expirationInput).type(`${expiration}`);
cy.getId(this.countInput).type(`${count}`);
return this;
}
save() {
cy.getId(this.saveBtn).click();
return this;
}
}