원클릭으로
e2e-testing
Playwright E2E testing best practices for this project. Use when writing, modifying, or reviewing E2E tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Playwright E2E testing best practices for this project. Use when writing, modifying, or reviewing E2E tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Code review of current PR/commit changes against project coding standards. Use when the user asks for a code review or mentions reviewing changes.
Reference for the Tangle component YAML specification format
Guidelines for building well-structured, maintainable ML pipelines in Tangle
Analyzes merged PRs from the past week, identifies user-facing changes, and opens a draft PR to the TangleML/website docs repo with updated documentation. Use when running the weekly documentation sync, or when the user invokes /docs-update.
React and React Compiler patterns for this project. Use when writing React components, hooks, providers, or working with React Compiler compatibility.
Run validation and testing commands for the project. Use when the user asks to validate, lint, typecheck, or run tests.
| name | e2e-testing |
| description | Playwright E2E testing best practices for this project. Use when writing, modifying, or reviewing E2E tests. |
tests/e2e/helpers.tsdata-testid attributes for stable selectors// Bad
await element.click();
await page.waitForTimeout(200);
// Good
await element.click();
await expect(otherElement).toBeVisible();
// Bad
if (await element.isVisible()) {
await element.click();
}
// Good
await expect(element).toBeVisible();
await element.click();
// Bad
const box = await element.boundingBox();
const x = box!.x;
// Good
const box = await element.boundingBox();
if (!box) {
throw new Error("Unable to locate element bounding box");
}
const x = box.x;
// Bad
const button = await page.getByTestId("submit");
// Good
const button = page.getByTestId("submit");
await expect(button).toBeVisible();
// Bad
expect(await element).toHaveText("text");
expect(await element.isVisible()).toBe(true);
// Good
await expect(element).toHaveText("text");
await expect(element).toBeVisible();
Priority order:
getByRole() - Best for accessibilitygetByTestId() - Best for test stability (preferred for this app)getByText() - Good for static contentlocator() with data attributes - When above don't workafterEach or afterAlltests/e2e/helpers.ts// Okay
await expect(element).toBeVisible();
// Better
await expect(element, "Component should appear after loading").toBeVisible();
// Bad - implementation detail
await expect(button).toHaveClass("bg-blue-500");
// Good - user-visible behavior
await expect(button).toBeVisible();
await expect(button).toBeEnabled();
await expect(button).toHaveText("Submit");