Skip to content

chore(flow-functionality): add @stable and harden publish-flow - #143

Merged
daniellicnerski1 merged 3 commits into
mainfrom
validate/publish-flow
May 12, 2026
Merged

chore(flow-functionality): add @stable and harden publish-flow#143
daniellicnerski1 merged 3 commits into
mainfrom
validate/publish-flow

Conversation

@daniellicnerski1

Copy link
Copy Markdown
Collaborator

Summary

  • 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/run to ~14s/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.

Validation

  • Baseline 3x serial: 3/3 pass (~1.5min)
  • Hardened 3x serial: 6/6 pass (~48s)
  • Force-fail confirmed the access_type API assertion catches real backend state (received "PUBLIC", expected "PRIVATE_FORCED_FAIL")
  • ESLint: clean
  • TypeScript: clean

Test plan

  • CI passes (TypeScript Check + ESLint)
  • Spec doc reviewed at docs/flow-functionality/publish-flow.md
  • QA-CHECKLIST entry flipped from [-] to [x]

- 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts to use deterministic waits and adds an API-only publish/unpublish round-trip test.
  • Expands the UI test to verify persisted access_type values 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.

Comment thread tests/tests-automations/regression/flow-functionality/publish-flow.spec.ts Outdated
Comment thread tests/tests-automations/regression/flow-functionality/publish-flow.spec.ts Outdated
Comment thread tests/tests-automations/regression/flow-functionality/publish-flow.spec.ts Outdated
Comment thread QA-CHECKLIST.md
Daniel Licnerski Borges 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.
@daniellicnerski1
daniellicnerski1 merged commit 0be6ec1 into main May 12, 2026
2 checks passed
@Victor-w-Madeira
Victor-w-Madeira deleted the validate/publish-flow branch May 15, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants