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

36 lines
944 B

import BasePage from '../Base';
import { AccountPage } from './index';
export class AccountLicensePage extends BasePage {
private accountPage: AccountPage;
constructor(accountPage: AccountPage) {
super(accountPage.rootPage);
this.accountPage = accountPage;
}
goto() {
return this.rootPage.goto('/#/account/license');
}
waitUntilContentLoads() {
return this.rootPage.waitForResponse(resp => resp.url().includes('api/v1/license') && resp.status() === 200);
}
// License TextBox
get() {
return this.accountPage.get().locator(`textarea[placeholder="License key"]`);
}
// Save button
getSaveButton() {
return this.accountPage.get().locator(`button.ant-btn-primary:has-text("Save license key")`);
}
async saveLicenseKey(licenseKey: string) {
await this.get().fill(licenseKey);
await this.getSaveButton().click();
await this.verifyToast({ message: 'License key updated' });
}
}