test(api-flows-crud): validate and tag @stable - #255
Merged
Conversation
- Translate Portuguese strings to English (FLOW_BASE description, missing-name payload) - Add Flow type and remove `any` + Array.isArray conditional from list assertions - Wrap cleanup DELETE in try/finally so ephemeral flows are removed even when assertions fail
…raceability Internal test validation process (CONTRIBUTING.md) requires every logical block to be wrapped in test.step() so traces show step-level execution. Validated against the 5-step process: 1. --trace=on captured with step labels visible 2. Steps documented via test.step() in all 9 tests 3. Force-fail check: 9 inverted assertions produced 9 failures 4. Walk-through reviewed 5. No backend errors logged (fixture monitors automatically)
Contributor
There was a problem hiding this comment.
Pull request overview
Tags all 9 tests in api-flows-crud.spec.ts with @stable, extends the PATCH test to also verify the description field, wraps each test in test.step blocks for clearer reporting, adds a spec doc, and flips the 6 bullets in QA-CHECKLIST §1.2 to [x].
Changes:
- Add
@stabletag (plustry/finallycleanup andtest.stepstructure) to every test; broaden PATCH coverage toname+description. - Replace Portuguese strings (
"Criado pelo teste automatizado Playwright","Flow sem nome") with English equivalents and introduce a localFlowtype. - Add
docs/api/flows/api-flows-crud.mdand mark the 6 Flow-CRUD bullets inQA-CHECKLIST.mdas[x]with links to the spec.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/tests-automations/regression/api/flows/api-flows-crud.spec.ts | Adds @stable tag, test.step structure, try/finally cleanup, PATCH description assertion; drops list-response normalization. |
| docs/api/flows/api-flows-crud.md | New spec doc covering all mandatory sections (validates / tags / steps / criteria / dependencies). |
| QA-CHECKLIST.md | Marks the 6 Flow CRUD bullets as [x] with spec links. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }); | ||
| expect(listRes.status()).toBe(200); | ||
|
|
||
| const flows = (await listRes.json()) as Flow[]; |
| const flowList = Array.isArray(flows) ? flows : (flows.flows ?? []); | ||
| const found = flowList.find((f: any) => f.id === id); | ||
| expect(found).toBeUndefined(); | ||
| const flows = (await listRes.json()) as Flow[]; |
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
test()blocks inapi-flows-crud.spec.tswith@stablenameanddescription(closes thename/descriptionbullet)docs/api/flows/api-flows-crud.mdspec doc with all mandatory sectionsQA-CHECKLIST.mdsection 1.2 Flow CRUD via API as[x]with link to the specBullet → test mapping
/api/v1/flows/creates flowPOST creates flow and returns ID/api/v1/flows/lists user flowsGET lists flows and includes the created one/api/v1/flows/{id}returns flowGET by ID returns correct flow/api/v1/flows/{id}updates name/descriptionPATCH updates flow name and description/api/v1/flows/{id}returns 200DELETE removes flow and returns 200GET after DELETE returns 404Bonus coverage retained:
GET non-existent flow returns 404,POST with missing name returns 422,deleted flow does not appear in flows listing.Test plan
langflowai/langflow-nightly:latest(9/9 each run, ~2s)npm run lint— 0 errorsnpm run typecheck— cleanCloses #247