22 lines
2.8 KiB
Markdown
22 lines
2.8 KiB
Markdown
# Project working instructions
|
|
|
|
## Browser and visual testing
|
|
|
|
Use Playwright MCP for frontend, UI, UX, responsive layout, JavaScript, HTMX, accessibility, and other browser-visible changes. Open the running Django application and inspect the rendered result; source inspection alone does not verify appearance or behavior. After a significant change, reload the affected page, inspect it, exercise relevant controls and HTMX interactions, and check the browser console after JavaScript or HTMX changes. Use screenshots for appearance, spacing, typography, sizing, alignment, colour, hierarchy, overflow, and responsive behavior. Use the accessibility/DOM representation for structure, names, labels, state, and interactions. Test desktop and mobile viewports for responsive interfaces, plus intermediate widths where useful. A visual task is incomplete until the rendered result has been inspected.
|
|
|
|
In findings, distinguish observed visual problems, accessibility or functional problems found in the browser, and optional design suggestions. Do not present subjective redesign suggestions as bugs or redesign unrelated areas.
|
|
|
|
## Authentication and demo account
|
|
|
|
Playwright may use the dedicated demo account to navigate authenticated pages and create, edit, or delete its own test data. Never modify another user's data. Reuse an authenticated Playwright session when available. Credentials may be supplied interactively; never commit passwords, cookies, session or CSRF tokens, or other credentials. Never put demo credentials in this file or source/configuration files. If browser authentication state is exported, store it in `playwright/.auth/` and keep that directory in `.gitignore`.
|
|
|
|
## Browser testing behavior
|
|
|
|
Browser access is for verification and debugging, not permission for arbitrary changes. For an inspection-only request, reproduce and inspect the relevant state, take screenshots when useful, report findings, and leave project files untouched. For an implementation request, inspect the current rendered state when useful, make the requested change, reload and inspect the page, test relevant interactions, check browser errors, inspect relevant viewport sizes, and fix introduced problems. Prefer rendered observations over assumptions from templates or styles.
|
|
|
|
If the Django server is stopped, find and use the repository's normal development command. Do not change production configuration to ease testing.
|
|
|
|
## Accessibility
|
|
|
|
For UI changes, check relevant semantic headings and controls, accessible names and labels, keyboard operation and visible focus, form errors, ARIA state for custom controls, obvious contrast/readability problems, and narrow viewport behavior. Use both visual inspection and the accessibility/DOM representation where each is appropriate; neither alone proves the other.
|