Imported from basharnayal/nubl (
tests/AGENTS.md). Install upstream withnpx skills add basharnayal/nubl --skill tests. Copyright stays with the author.
E2E Testing Guidelines
- We use Playwright with JavaScript (
.spec.jsundertests/e2e/). - Tests are located in the
tests/e2edirectory. - The
baseURLis configured inconfig/playwright/*.config.jstohttp://127.0.0.1:8001(must matchphp artisan servein that config). Do not hardcode the host inpage.goto(); use relative paths (e.g.,await page.goto('/login')). - Use web-first assertions (e.g.,
await expect(page.locator('.alert')).toBeVisible()). - Rely on Playwright's auto-waiting capabilities; avoid adding hard
page.waitForTimeout()sleeps. - Validate backend state changes where necessary (you can assume the app is a standard Laravel MVC or API architecture).