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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ wwwroot/vite/trip-editor/
playwright-report/
test-results/
.local/manual-verification.md
.local/publish-smoke/
.local/asset-smoke/
.local/asset-smoke-cache/
.local/playwright/
.local/test-results/
.local/browser-profiles/
4 changes: 3 additions & 1 deletion Areas/User/Views/Trip/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
}

@{
var manifest = ReadTripEditorManifest(manifestPath, entryScript);
var manifest = Environment.IsDevelopment()
? (Script: (string?)null, Css: (IReadOnlyList<string>)Array.Empty<string>())
: ReadTripEditorManifest(manifestPath, entryScript);
}

@section Styles {
Expand Down
18 changes: 18 additions & 0 deletions docs/22-Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ Running Tests
- `dotnet test`
- Trip Editor E2E: `npm run test:e2e:trip-editor`

Trip Editor Asset-Mode Smoke
- These smokes are explicit opt-in checks. They do not run as part of `npm run test:e2e:trip-editor`.
- Development smoke proves ASP.NET Development + Vite dev-server integration only.
- Published smoke proves `dotnet publish` output and production bundle serving only.
- Neither smoke proves CRUD or editor workflow behavior. Those contracts are covered by the earlier #297 CRUD, error-state, search-add, and rich-notes batches.
- Configure the same `WAYFARER_E2E_USERNAME`, `WAYFARER_E2E_PASSWORD`, and `WAYFARER_E2E_TRIP_ID` values used by Trip Editor Playwright verification. The runner also reads ignored `.local/manual-verification.md`.
- Optional URLs:
- `WAYFARER_ASSET_SMOKE_DEV_URL` defaults to `WAYFARER_E2E_BASE_URL` or `http://localhost:5012`.
- `WAYFARER_ASSET_SMOKE_PUBLISHED_URL` is optional. When unset, the runner allocates a free `127.0.0.1` port for the published app. When set, that URL/port must be free before launch so the smoke cannot pass against an older server.
- Published smoke runs `dotnet frontend build`, `npm run build`, and `dotnet publish Wayfarer.csproj -c Release -o .local/publish-smoke`, then starts the published app in non-Development mode. It requires usable Trip Editor credentials/config, a reachable configured database, and either `ConnectionStrings__DefaultConnection` or a local `appsettings.Development.json` connection string while still running the app with `ASPNETCORE_ENVIRONMENT=Production`.
- Generated output, cache folders, and server logs stay under `.local/publish-smoke`, `.local/asset-smoke`, and `.local/asset-smoke-cache`, which are ignored by committed `.gitignore` rules.

```powershell
npm run smoke:trip-editor:assets:dev
npm run smoke:trip-editor:assets:published
npm run smoke:trip-editor:assets
```

Trip Editor Playwright Verification
- This is dev-only tooling for the Vue Trip Editor. It is not part of production deployment, and `npm run build` does not run Playwright.
- Start the ASP.NET Core app first:
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"scripts": {
"dev": "vite --host localhost --port 5173",
"build": "vite build",
"test:e2e:trip-editor": "playwright test --config=playwright.config.ts"
"test:e2e:trip-editor": "playwright test --config=playwright.config.ts",
"smoke:trip-editor:assets": "node tools/trip-editor-asset-smoke.mjs --mode=all",
"smoke:trip-editor:assets:dev": "node tools/trip-editor-asset-smoke.mjs --mode=development",
"smoke:trip-editor:assets:published": "node tools/trip-editor-asset-smoke.mjs --mode=published"
},
"dependencies": {
"@types/leaflet": "1.9.21",
Expand Down
Loading
Loading