keycloak-scim/cypress/support/pages/admin_console/manage/clients/CreateInitialAccessTokenPage.ts

19 lines
554 B
TypeScript
Raw Normal View History

2022-04-19 12:25:57 +00:00
import CommonPage from "../../../CommonPage";
export default class CreateInitialAccessTokenPage extends CommonPage {
private expirationInput = "expiration";
private countInput = "count";
private countPlusBtn = '[data-testid="count"] [aria-label="Plus"]';
fillNewTokenData(expiration: number, count: number) {
cy.findByTestId(this.expirationInput).clear().type(expiration.toString());
cy.findByTestId(this.countInput).clear();
for (let i = 0; i < count; i++) {
cy.get(this.countPlusBtn).click();
}
return this;
}
}