|
@@ -18,7 +18,7 @@ export class DisabilityPersonManagementPage {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async goto() {
|
|
async goto() {
|
|
|
- await this.page.goto('/admin/disability-persons');
|
|
|
|
|
|
|
+ await this.page.goto('/admin/disabilities');
|
|
|
await this.page.waitForLoadState('domcontentloaded');
|
|
await this.page.waitForLoadState('domcontentloaded');
|
|
|
await this.page.waitForSelector('h1:has-text("残疾人个人管理")', { state: 'visible', timeout: 15000 });
|
|
await this.page.waitForSelector('h1:has-text("残疾人个人管理")', { state: 'visible', timeout: 15000 });
|
|
|
await this.page.waitForSelector('table tbody tr', { state: 'visible', timeout: 20000 });
|
|
await this.page.waitForSelector('table tbody tr', { state: 'visible', timeout: 20000 });
|
|
@@ -70,8 +70,8 @@ export class DisabilityPersonManagementPage {
|
|
|
province: string;
|
|
province: string;
|
|
|
city: string;
|
|
city: string;
|
|
|
}) {
|
|
}) {
|
|
|
- // 等待表单出现
|
|
|
|
|
- await this.page.waitForSelector('form#-create-form', { state: 'visible', timeout: 5000 });
|
|
|
|
|
|
|
+ // 等待表单出现 - 使用正确的 form ID
|
|
|
|
|
+ await this.page.waitForSelector('form#create-form', { state: 'visible', timeout: 5000 });
|
|
|
|
|
|
|
|
// 填写基本信息
|
|
// 填写基本信息
|
|
|
await this.page.getByLabel('姓名 *').fill(data.name);
|
|
await this.page.getByLabel('姓名 *').fill(data.name);
|
|
@@ -84,9 +84,9 @@ export class DisabilityPersonManagementPage {
|
|
|
await this.page.getByLabel('身份证地址 *').fill(data.idAddress);
|
|
await this.page.getByLabel('身份证地址 *').fill(data.idAddress);
|
|
|
|
|
|
|
|
// 居住地址 - 使用省份选择
|
|
// 居住地址 - 使用省份选择
|
|
|
- await this.page.locator('[data-testid="province-select"]').selectOption(data.province);
|
|
|
|
|
|
|
+ await this.page.locator('select[name="province"]').selectOption(data.province);
|
|
|
await this.page.waitForTimeout(500); // 等待城市加载
|
|
await this.page.waitForTimeout(500); // 等待城市加载
|
|
|
- await this.page.locator('[data-testid="city-select"]').selectOption(data.city);
|
|
|
|
|
|
|
+ await this.page.locator('select[name="city"]').selectOption(data.city);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async submitForm() {
|
|
async submitForm() {
|