Refactor E2E tests with page objects

This commit is contained in:
2026-07-26 13:41:57 +09:00
parent 766d13dfcc
commit 88730dbec9
8 changed files with 238 additions and 95 deletions
+15
View File
@@ -0,0 +1,15 @@
import { Base } from './Base'
export class UserPage extends Base {
async goTo(handle: string) {
await this.navigateTo(`/${handle}`)
}
async openPostDetails(postText: string) {
await this.page
.getByRole('article')
.filter({ hasText: postText })
.getByRole('link', { name: '詳細・スレッド' })
.click()
}
}