Conversation
Update all examples to use the new lvt testing API: - StartDockerChrome now returns error instead of *exec.Cmd - StopDockerChrome now takes (t, debugPort) instead of (t, cmd, debugPort) This aligns with the latest lvt/testing package changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates all example test files to use the new lvt testing API, which changes how Docker Chrome is started and stopped in E2E tests. The API now returns an error directly from StartDockerChrome instead of returning a command object, and StopDockerChrome no longer requires the command object as a parameter.
- Updated API usage to handle error returns from
StartDockerChrome - Modified cleanup calls to
StopDockerChrometo use the new signature - Applied consistent error handling pattern across all affected test files
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| todos/todos_test.go | Updated Chrome container lifecycle management to use new API with error handling |
| counter/counter_test.go | Updated Chrome container lifecycle management to use new API with error handling |
| avatar-upload/avatar-upload_test.go | Updated Chrome container lifecycle management to use new API with error handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Closing - this fix is not needed as the examples repo CI needs to use the pinned lvt version. The cross-repo test in livetemplate is a separate issue. |
6 tasks
adnaan
added a commit
that referenced
this pull request
Apr 12, 2026
Patterns app improvements after Session 1: - Cross-handler SPA navigation: add dedicated E2E test suite (cross_handler_nav_test.go) covering index↔pattern nav, back/forward buttons, title updates, and WebSocket reconnection. Removed the lvt-nav:no-intercept workaround from index.tmpl/layout.tmpl since client v0.8.22 now handles cross-handler navigation correctly. - File Upload (#6): - Button name="upload" routes to Upload() handler method - WithUpload("document", ...) for Tier 1 multipart uploads - Tier 2 ChunkSize=1024 so upload progress is visible for demo files - Flash messages via FlashTag for success/error - Tier 2 form renders in-progress uploads via {{range .lvt.Uploads}} - Form-lvt:preserve to prevent reset after submit - E2E tests: Submit_Without_File, Tier1_Upload_With_File, Form_Structure - attachFileViaDataTransfer test helper (Docker-Chrome compatible) - Preserving Form Inputs (#7): - ctx.SetFlash("success", "Saved: "+Name) for visual feedback - WithUpload("attachment", ...) so multipart submissions are parsed - Use .lvt.ErrorTag helper instead of manual HasError/Error markup - New E2E tests: Submit_Shows_Flash, Form_Values_Preserved_After_Submit, Values_Survive_Rerender, Submit_With_File_Attached (regression for the fieldset-disabled FormData bug fixed in livetemplate/client#58) - Bulk Update (#4): - Add success flash "Updated N user(s)" via FlashTag - Test verifies flash text via output[data-flash] selector - Inline Validation (#3): - Use .lvt.AriaInvalid and .lvt.ErrorTag helpers instead of manual HasError/Error patterns - LVT_LOCAL_CLIENT env var in main.go lets developers serve a local client build (useful during client development/testing). All 9 E2E test functions pass against livetemplate/client v0.8.22 from CDN (no local override required). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
adnaan
added a commit
that referenced
this pull request
Apr 12, 2026
* feat: add patterns example app — Session 1 (scaffold + forms #1-7) Implements the patterns example app scaffold and all 7 Forms & Editing patterns from the patterns proposal (#330). Each pattern is a focused, isolated demo with its own handler, controller, template, and E2E tests. Patterns implemented: 1. Click To Edit — toggle view/edit with conditional rendering 2. Edit Row — inline table row editing with data-key identity 3. Inline Validation — Change() with ValidateForm and error display 4. Bulk Update — batch checkbox operations 5. Reset User Input — auto-clear forms after submission 6. File Upload — Tier 1 multipart + Tier 2 chunked upload 7. Preserving File Inputs — lvt-form:preserve across re-renders Also includes: shared layout template, categorized index page with all 31 patterns listed (7 implemented, 24 coming soon), and comprehensive chromedp E2E tests with UI_Standards and Visual_Check subtests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: improve Click To Edit visual layout Replace <dl> with a Pico-styled table for cleaner key-value display. Add outline class to Edit button to avoid full-width block styling. Update tests to match new HTML structure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add lvt-nav:no-intercept to cross-handler links Each pattern is a separate LiveTemplate handler. SPA navigation between handlers shows stale content from the previous handler. Adding lvt-nav:no-intercept forces full page loads when navigating between the index page and individual pattern pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: patterns polish, cross-handler navigation tests, and bug fixes Patterns app improvements after Session 1: - Cross-handler SPA navigation: add dedicated E2E test suite (cross_handler_nav_test.go) covering index↔pattern nav, back/forward buttons, title updates, and WebSocket reconnection. Removed the lvt-nav:no-intercept workaround from index.tmpl/layout.tmpl since client v0.8.22 now handles cross-handler navigation correctly. - File Upload (#6): - Button name="upload" routes to Upload() handler method - WithUpload("document", ...) for Tier 1 multipart uploads - Tier 2 ChunkSize=1024 so upload progress is visible for demo files - Flash messages via FlashTag for success/error - Tier 2 form renders in-progress uploads via {{range .lvt.Uploads}} - Form-lvt:preserve to prevent reset after submit - E2E tests: Submit_Without_File, Tier1_Upload_With_File, Form_Structure - attachFileViaDataTransfer test helper (Docker-Chrome compatible) - Preserving Form Inputs (#7): - ctx.SetFlash("success", "Saved: "+Name) for visual feedback - WithUpload("attachment", ...) so multipart submissions are parsed - Use .lvt.ErrorTag helper instead of manual HasError/Error markup - New E2E tests: Submit_Shows_Flash, Form_Values_Preserved_After_Submit, Values_Survive_Rerender, Submit_With_File_Attached (regression for the fieldset-disabled FormData bug fixed in livetemplate/client#58) - Bulk Update (#4): - Add success flash "Updated N user(s)" via FlashTag - Test verifies flash text via output[data-flash] selector - Inline Validation (#3): - Use .lvt.AriaInvalid and .lvt.ErrorTag helpers instead of manual HasError/Error patterns - LVT_LOCAL_CLIENT env var in main.go lets developers serve a local client build (useful during client development/testing). All 9 E2E test functions pass against livetemplate/client v0.8.22 from CDN (no local override required). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update all examples to use the new lvt testing API:
StartDockerChromenow returnserrorinstead of*exec.CmdStopDockerChromenow takes(t, debugPort)instead of(t, cmd, debugPort)This aligns with the latest lvt/testing package changes and fixes the cross-repo test failures.
Files Changed
avatar-upload/avatar-upload_test.gocounter/counter_test.gotodos/todos_test.go🤖 Generated with Claude Code