多维表格
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.
 
 
 
 
 
 

39 lines
1.1 KiB

import { DashboardPage } from "..";
import BasePage from "../../Base";
import { AuditSettingsPage } from "./Audit";
import { AppStoreSettingsPage } from "./AppStore";
import { MetaDataPage } from "./Metadata";
const tabInfo = {
"Team & Auth": "teamAndAuth",
"App Store": "appStore",
"Project Metadata": "projMetaData",
Audit: "audit",
};
export class SettingsPage extends BasePage {
private readonly dashboard: DashboardPage;
readonly audit: AuditSettingsPage;
readonly appStore: AppStoreSettingsPage;
readonly metaData: MetaDataPage;
constructor(dashboard: DashboardPage) {
super(dashboard.rootPage);
this.dashboard = dashboard;
this.audit = new AuditSettingsPage(this);
this.appStore = new AppStoreSettingsPage(this);
this.metaData = new MetaDataPage(this);
}
get() {
return this.rootPage.locator(".nc-modal-settings");
}
async selectTab({ title }: { title: string }) {
await this.get().locator(`li[data-menu-id="${tabInfo[title]}"]`).click();
}
async close() {
await this.get().locator('[pw-data="settings-modal-close-button"]').click();
}
}