Playwright Automation
Workflow
- •Locate Test: Find the relevant
.spec.tsfile ine2e/. - •Run Test: Use
run_in_terminalwithbun run test:e2e. - •Debug: Use
bun run test:e2e --debugor--ui.
Best Practices
- •Locators: Use
getByRole,getByText. Avoid CSS selectors. - •Assertions:
await expect(locator).toBeVisible(). - •Isolation: Tests should be independent.
Application Context
- •Base URL:
http://localhost:5173 - •Config:
playwright.config.ts