Skip to content

test(regression): promote edit-flow-name.spec.ts to @stable - #264

Merged
daniellicnerski1 merged 1 commit into
mainfrom
test/edit-flow-name-stable
May 20, 2026
Merged

test(regression): promote edit-flow-name.spec.ts to @stable#264
daniellicnerski1 merged 1 commit into
mainfrom
test/edit-flow-name-stable

Conversation

@daniellicnerski1

Copy link
Copy Markdown
Collaborator

Summary

Promotes `tests/tests-automations/regression/core-functionality/project-management/edit-flow-name.spec.ts` to `@stable`. Trims 4 rename cycles → 2 (loop), fixes the tag list, and adds a QA-CHECKLIST bullet for the unique coverage angle.

Why this spec is non-redundant

`flow-rename-header.spec.ts` (`@stable`) already covers:

  • Header rename DOM commit
  • API PATCH + GET persistence

`edit-flow-name.spec.ts` uniquely covers:

  • Main page listing reflects the rename (and old names disappear)
  • Re-opening a flow by clicking its new name
  • Idempotence over multiple sequential renames

Changes

Change Rationale
4 cycles → 2 in a `for` loop Idempotence is proven at 2 cycles. The 3rd and 4th cycles were copy/paste with no extra signal — they cost ~15-30s in weekly runs
Tags: `["@Release", "@workspace", "@components"]` → `["@stable", "@Release", "@workspace", "@regression"]` `@components` was incorrect (this is project-management, not component config). Add `@stable` (weekly run) and `@regression` (functional area)
Test title updated Old title implied a main-page context-menu rename that the test never performs; new title accurately reflects "edit name + see it in listing"
QA-CHECKLIST L566 left as-is That bullet (`Edit flow name and description`) is about `flowSettings.spec.ts`, which tests description + character limit — out of scope for this round
New QA-CHECKLIST bullet (after L565) Specific to the listing-verification angle that this spec uniquely tests
ESLint auto-fix Promoted `expect(await getByText(...).count()).toBe(1)` to the auto-waiting `await expect(...).toHaveCount(1)`

Test plan

  • `npm run typecheck` clean
  • `npm run lint` filtered on spec: 0 errors (warnings about `waitForSelector` are pre-existing project-wide pattern, present in `flow-rename-header.spec.ts` `@stable` too)
  • Static anti-pattern grep — zero `.catch + toBeFalsy` / `waitForTimeout` / `toBeFalsy`
  • `npx playwright test --workers=1 --retries=0` — 1 test PASS in 12.2s without retry
  • Force-fail confirmed (broke `expect(flowName).toBe(targetName)`, saw failure point to L22 with useful message, reverted, repassed in 13.2s)
  • `--trace=on` once — trace shows both cycles coherently
  • Zero `🚨 Backend Error` occurrences

Refactor the existing test to be CI-friendly and add @stable:

- Replace 4 inline rename cycles with a `for` loop over a 2-name array.
  Idempotence of repeated renames is already proven at 2 cycles; the
  3rd and 4th add ~15-30s to weekly runs with no diagnostic value.
- Fix the tag list: drop `@components` (this is project-management,
  not component config) and add `@stable` + `@regression`.
- Update the test title to reflect what it actually validates: the
  main page listing reflects the rename (the original title mentioned
  editing "on the main page", but no main-page context-menu rename is
  exercised — only header rename + listing verification).
- ESLint --fix promoted `expect(await ...count()).toBe(1)` to the
  auto-waiting `await expect(...).toHaveCount(1)`.

This is non-redundant with `flow-rename-header.spec.ts` (@stable) —
that spec covers header-DOM commit + API PATCH/GET persistence, while
this spec uniquely covers the main page listing reflecting the rename
and re-opening a flow by its new name.

QA-CHECKLIST: add a new bullet specifically for the listing-verification
angle (leaving the existing "Edit flow name and description" bullet for
flowSettings.spec.ts, which tests description + character limit).

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

Promotes edit-flow-name.spec.ts to @stable, consolidates 4 repetitive rename cycles into a 2-iteration loop, corrects the tag list, retitles the test to match its actual behavior, and adds a corresponding QA-CHECKLIST entry.

Changes:

  • Refactors test body to a for loop over 2 random names, replacing 4 inlined cycles.
  • Updates tags from ["@release", "@workspace", "@components"] to ["@stable", "@release", "@workspace", "@regression"] and refines the test title; promotes expect(...).count() to await expect(...).toHaveCount(1).
  • Adds a QA-CHECKLIST bullet under §12.2 mapping the listing-verification angle to this spec.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/tests-automations/regression/core-functionality/project-management/edit-flow-name.spec.ts Loop-based refactor, tag/title update, auto-waiting assertion
QA-CHECKLIST.md New [x] bullet linking listing-verification coverage to this spec

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@daniellicnerski1
daniellicnerski1 merged commit 095521d into main May 20, 2026
6 checks passed
@Victor-w-Madeira
Victor-w-Madeira deleted the test/edit-flow-name-stable branch June 1, 2026 12:02
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