feat: add page objects for all pages

This commit is contained in:
张翔
2026-03-06 12:07:18 +08:00
parent b8d22aac9f
commit 50ecd7a241
8 changed files with 148 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import { Page } from '@playwright/test';
import { BasePage } from './BasePage';
import { getPageConfig } from '../config/test-pages';
export class CasesPage extends BasePage {
constructor(page: Page, config?) {
const pageConfig = getPageConfig('cases');
super(page, pageConfig.url, config);
}
async getCaseCount(): Promise<number> {
return await this.page.locator('.case-card').count();
}
}