Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .agents/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ npx playwright test
# Specific suite
npx playwright test tests/auth.spec.ts
npx playwright test tests/vehicle-models.spec.ts
npx playwright test tests/import-export.spec.ts
npx playwright test tests/prototype-context-menu.spec.ts
npx playwright test tests/home-model-list.spec.ts
npx playwright test tests/home-prototype-list.spec.ts
npx playwright test tests/image-fallback.spec.ts

# With screenshots on failure
npx playwright test --screenshot=only-on-failure
Expand All @@ -29,6 +34,31 @@ npx playwright test --screenshot=only-on-failure
npx playwright test --headed
```

### Windows (CMD / PowerShell)

Playwright treats the file argument as a **regex**. Use **forward slashes** (not `\`) or `npm run`:

```powershell
cd C:\repo\autowrx\.agents
npm run test:home-model-list
```

Or with `npx` (forward slashes work on Windows):

```powershell
npx playwright test tests/home-model-list.spec.ts
npx playwright test tests/import-export.spec.ts
npx playwright test tests/prototype-context-menu.spec.ts
npx playwright test tests/home-prototype-list.spec.ts
npx playwright test tests/image-fallback.spec.ts
```

Run several suites:

```powershell
npx playwright test tests/import-export.spec.ts tests/prototype-context-menu.spec.ts tests/home-model-list.spec.ts
```

## Test Suites

| File | Coverage |
Expand All @@ -38,6 +68,11 @@ npx playwright test --headed
| `tests/prototype.spec.ts` | Create/Read/Update/Delete prototypes |
| `tests/admin.spec.ts` | Admin panel: user management, site config |
| `tests/site-config-restore-default.spec.ts` | Public config restore default (accept + cancel) |
| `tests/import-export.spec.ts` | Model/prototype export and import round-trips |
| `tests/prototype-context-menu.spec.ts` | Admin delete prototype via context menu |
| `tests/home-model-list.spec.ts` | Home model-list: guest visibility, logged-in UI, category filters, all 6 sort options, rename, My Contributions contributor/reader |
| `tests/home-prototype-list.spec.ts` | Home prototype-list: guest visibility, category tabs, My Prototypes filter, all 6 sort options, navigation |
| `tests/image-fallback.spec.ts` | Model and prototype cards fall back to default images when primary image fails to load |
| `tests/layout.spec.ts` | Layout, responsive, visual snapshots |

## Environment
Expand Down
8 changes: 7 additions & 1 deletion .agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"test:admin": "playwright test tests/admin.spec.ts",
"test:layout": "playwright test tests/layout.spec.ts",
"test:site-config": "playwright test tests/site-config-restore-default.spec.ts",
"test:smoke": "playwright test tests/auth.spec.ts tests/layout.spec.ts"
"test:import-export": "playwright test tests/import-export.spec.ts",
"test:prototype-context-menu": "playwright test tests/prototype-context-menu.spec.ts",
"test:home-model-list": "playwright test tests/home-model-list.spec.ts",
"test:home-prototype-list": "playwright test tests/home-prototype-list.spec.ts",
"test:image-fallback": "playwright test tests/image-fallback.spec.ts",
"test:smoke": "playwright test tests/auth.spec.ts tests/layout.spec.ts",
"test:all": "playwright test --reporter=line,html"
},
"devDependencies": {
"@playwright/test": "^1.40.0",
Expand Down
1 change: 1 addition & 0 deletions .agents/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default defineConfig({
timeout: 60000,
expect: { timeout: 8000 },
fullyParallel: false,
workers: 1,
retries: 1,
reporter: [['line'], ['html', { open: 'never', outputFolder: 'playwright-report' }]],
use: {
Expand Down
Loading