chore(flow-functionality): add @stable and harden publish-flow - #143
Merged
Conversation
- Rewrite the UI test to remove 8 waitForTimeout calls (~17s of pure sleeping)
and replace each with proper expect.toBeVisible / expect.toBeChecked /
waitForLoadState waits — runtime drops from ~30s to ~14s per run.
- Verify access_type via GET /api/v1/flows/{id} after each publish toggle —
UI switch state alone does not prove the backend stored PUBLIC/PRIVATE.
- Assert the new tab URL matches /playground/{flowId} — the public contract
of the shareable feature.
- Add an API-only test that mirrors handlePublishedSwitch (PATCH access_type)
and confirms persistence via GET round-trip.
- Tag both tests @stable; add @playground to the UI test.
- Spec doc at docs/flow-functionality/publish-flow.md captures the
empirical access_type round-trip and the previous version's gaps.
- Mark QA-CHECKLIST entry as covered.
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens the publish-flow regression coverage by replacing sleep-based waits with state-based assertions, adding backend access_type verification, and documenting the scenario so the flow-functionality checklist can point to an explicit spec.
Changes:
- Rewrites
publish-flow.spec.tsto use deterministic waits and adds an API-only publish/unpublish round-trip test. - Expands the UI test to verify persisted
access_typevalues and the/playground/{flowId}URL contract. - Adds a dedicated spec document and marks the QA checklist entry as automated.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
tests/tests-automations/regression/flow-functionality/publish-flow.spec.ts |
Reworks the publish-flow regression test and adds API coverage for access_type toggling. |
QA-CHECKLIST.md |
Marks “Publish flow” as covered and links it to the regression spec. |
docs/flow-functionality/publish-flow.md |
Documents scope, steps, validation criteria, and dependencies for the publish-flow coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 2 commits
May 6, 2026 10:51
- Click wrapper -> read href from <a>: align with playground-shareable-url.spec.ts and remove the wrapper-vs-anchor click-delegation hazard flagged in the review. Closing the deploy dropdown via Escape after reading href, since the previous version implicitly closed it by clicking through to a new tab. - Reuse fresh browser.newContext() for the public URL access check (publish phase) AND the redirect-to-home check (unpublish phase). The editor's authenticated cookies no longer piggyback on the access assertion. Spec doc notes that AUTO_LOGIN=true still auto-authenticates the new context. - Wrap the UI test body in try/finally and DELETE the flow via API on exit so repeated runs do not accumulate workspace artifacts (the API test already had this; the UI test did not). Validation: 6/6 passes under --workers=1 --repeat-each=3 in ~49s against current Langflow main. ESLint and tsc clean.
# Conflicts: # QA-CHECKLIST.md
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
waitForTimeoutcalls (~17s of pure sleeping) and replace each with properexpect.toBeVisible/expect.toBeChecked/waitForLoadStatewaits — runtime drops from ~30s/run to ~14s/run.access_typeviaGET /api/v1/flows/{id}after each publish toggle — UI switch state alone does not prove the backend storedPUBLIC/PRIVATE./playground/{flowId}— the public contract of the shareable feature.handlePublishedSwitch(PATCH access_type) and confirms persistence viaGETround-trip.@stable; add@playgroundto the UI test.Validation
"PUBLIC", expected"PRIVATE_FORCED_FAIL")Test plan
docs/flow-functionality/publish-flow.md[-]to[x]