write-playwright-e2e-code
Installation
SKILL.md
Playwright E2E テスト
test.step 区切り
- 論理的な区切りは
test.step("日本語", async () => { ... })で表現 - 適切な粒度: ユーザー操作単位・UI 状態確認単位で区切る。入れ子も可
- expect は step 内に含める
- 既に step に分かれている関数は step の外で呼び出す
Good:
await navigateToMain(page);
await test.step("ダウンロードモーダルを表示する", async () => {
await page.getByRole("button", { name: "ダウンロード" }).click();
await expect(page.getByRole("dialog")).toBeVisible();
});