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
45 lines
1 KiB
TypeScript
45 lines
1 KiB
TypeScript
export default class InitialAccessTokenTab {
|
|
private initialAccessTokenTab = "initialAccessToken";
|
|
|
|
private emptyAction = "no-initial-access-tokens-empty-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;
|
|
}
|
|
}
|