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

32 lines
814 B

// playwright-dev-page.ts
import { Locator, Page, expect } from "@playwright/test";
import BasePage from "../Base";
import { CellPageObject } from "../Dashboard/common/Cell";
export class SharedFormPage extends BasePage {
readonly cell: CellPageObject;
constructor(rootPage: Page) {
super(rootPage);
this.cell = new CellPageObject(this);
}
get() {
return this.rootPage.locator("html");
}
async submit() {
await this.waitForResponse({
uiAction:this.get().locator('[pw-data="shared-form-submit-button"]').click(),
httpMethodsToMatch: ["POST"],
requestUrlPathToMatch: '/rows'
});
}
async verifySuccessMessage() {
await expect(await this.get().locator('.ant-alert-success', {
hasText: 'Successfully submitted form data'
})).toBeVisible();
}
}