多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
1.5 KiB

import { Page } from '@playwright/test';
import BasePage from '../Base';
import { AccountSettingsPage } from './Settings';
import { AccountTokenPage } from './Token';
import { AccountUsersPage } from './Users';
import { AccountAppStorePage } from './AppStore';
import { AccountLicensePage } from './License';
import { AccountAuthenticationPage } from './Authentication';
import { AccountSetupPage } from './Setup';
export class AccountPage extends BasePage {
readonly settings: AccountSettingsPage;
readonly setup: AccountSetupPage;
readonly token: AccountTokenPage;
readonly users: AccountUsersPage;
readonly appStore: AccountAppStorePage;
readonly license: AccountLicensePage;
readonly authentication: AccountAuthenticationPage;
constructor(page: Page) {
super(page);
this.settings = new AccountSettingsPage(this);
this.token = new AccountTokenPage(this);
this.users = new AccountUsersPage(this);
this.appStore = new AccountAppStorePage(this);
this.license = new AccountLicensePage(this);
this.authentication = new AccountAuthenticationPage(this);
this.setup = new AccountSetupPage(this);
}
get() {
return this.rootPage.locator('body');
}
async openAppMenu() {
await this.rootPage.locator('.nc-menu-accounts').click();
}
async signOut() {
await this.openAppMenu();
await this.rootPage.locator('div.nc-account-dropdown-item:has-text("Sign Out"):visible').click();
await this.rootPage.locator('[data-testid="nc-form-signin"]:visible').waitFor();
}
}