Skip to content

test(api-flows-crud): validate and tag @stable - #255

Merged
Victor-w-Madeira merged 3 commits into
mainfrom
chore/issue-247-api-flows-crud-stable
May 18, 2026
Merged

test(api-flows-crud): validate and tag @stable#255
Victor-w-Madeira merged 3 commits into
mainfrom
chore/issue-247-api-flows-crud-stable

Conversation

@Victor-w-Madeira

Copy link
Copy Markdown
Collaborator

Summary

  • Tag all 9 test() blocks in api-flows-crud.spec.ts with @stable
  • Extend the PATCH test to cover both name and description (closes the name/description bullet)
  • Add docs/api/flows/api-flows-crud.md spec doc with all mandatory sections
  • Mark the 6 bullets in QA-CHECKLIST.md section 1.2 Flow CRUD via API as [x] with link to the spec

Bullet → test mapping

Checklist bullet (1.2) Test
POST /api/v1/flows/ creates flow POST creates flow and returns ID
GET /api/v1/flows/ lists user flows GET lists flows and includes the created one
GET /api/v1/flows/{id} returns flow GET by ID returns correct flow
PATCH /api/v1/flows/{id} updates name/description PATCH updates flow name and description
DELETE /api/v1/flows/{id} returns 200 DELETE removes flow and returns 200
GET after DELETE returns 404 GET after DELETE returns 404

Bonus coverage retained: GET non-existent flow returns 404, POST with missing name returns 422, deleted flow does not appear in flows listing.

Test plan

  • Spec passes 5× in a row locally against langflowai/langflow-nightly:latest (9/9 each run, ~2s)
  • npm run lint — 0 errors
  • npm run typecheck — clean
  • Spec doc covers all mandatory sections (What this test validates / Tags / Validation criterion / External dependencies)

Closes #247

- Tag all 9 test() blocks with @stable
- Extend PATCH test to cover both name and description
- Add docs/api/flows/api-flows-crud.md spec doc
- Mark 6 bullets in QA-CHECKLIST.md section 1.2 as [x]

Closes #247
- 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)

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

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 @stable tag (plus try/finally cleanup and test.step structure) to every test; broaden PATCH coverage to name + description.
  • Replace Portuguese strings ("Criado pelo teste automatizado Playwright", "Flow sem nome") with English equivalents and introduce a local Flow type.
  • Add docs/api/flows/api-flows-crud.md and mark the 6 Flow-CRUD bullets in QA-CHECKLIST.md as [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[];
@Victor-w-Madeira
Victor-w-Madeira merged commit 106b5aa into main May 18, 2026
3 checks passed
@Victor-w-Madeira
Victor-w-Madeira deleted the chore/issue-247-api-flows-crud-stable branch May 18, 2026 19:19
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.

test(api): validate and tag @stable api-flows-crud.spec.ts

2 participants