test(core-components): consolidate prompt template regression spec - #210
Merged
Victor-w-Madeira merged 4 commits intoMay 11, 2026
Merged
Conversation
Move 5 prompt-template tests from ui-ux/ to core-components/, add a new modal-persistence test, and surface coverage in QA-CHECKLIST §3.2.
- Drop waitForTimeout(1500) from setPromptTemplate; anchor modal close on
textarea testid disappearance and rely on auto-retried handle assertions
- Replace [role="dialog"] with modal-promptarea_prompt_template testid
- Add backend persistence assertion to test 6 — poll
GET /api/v1/flows/{id} until template.template.value matches the saved
string. Uses page.request to inherit session cookies
- Uniformize handle counting via dynamicHandlesLocator helper filtering
only left-side input handles
- Flip QA-SCENARIOS-GUIDE.md §10.1 and §10.2 markers from [-] to [x]
Contributor
There was a problem hiding this comment.
Pull request overview
Consolidates Prompt Template E2E regression coverage into a single core-components/ Playwright spec with @stable @release @regression @components tagging, and updates QA documentation/checklists to reference the new canonical test location.
Changes:
- Added
prompt-template-component-regression.spec.tscontaining 6 Prompt Template regression tests (including a new modal + backend persistence check) and removed the two olderui-ux/prompt specs. - Updated
QA-CHECKLIST.mdandQA-SCENARIOS-GUIDE.mdto point at the consolidated spec and mark Prompt Template items as validated ([x]). - Added
docs/core-components/prompt-template-component-regression.mddocumenting intent, steps, dependencies, and validation criteria.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tests-automations/regression/ui-ux/prompt-remove-variable.spec.ts | Deleted; tests migrated into consolidated core-components spec. |
| tests/tests-automations/regression/ui-ux/prompt-dynamic-variables.spec.ts | Deleted; tests migrated into consolidated core-components spec. |
| tests/tests-automations/regression/core-components/prompt-template-component-regression.spec.ts | New consolidated @stable regression spec for Prompt Template (6 scenarios). |
| QA-SCENARIOS-GUIDE.md | Updated Prompt Template section to reference the new spec path and mark scenarios as validated. |
| QA-CHECKLIST.md | Marked Prompt Template checklist bullets as validated and linked them to the new spec. |
| docs/core-components/prompt-template-component-regression.md | New regression spec documentation for Prompt Template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+51
to
+53
| - Records the initial count of `handle-prompt template` testids. | ||
| - Calls `setPromptTemplate` with `Hello {name}, your job is {profession}.`. | ||
| - Asserts the new handle count is strictly greater than the initial count. |
Comment on lines
+57
to
+60
| - Sets the template to `Hello {name}!` and asserts the `name` handle is visible. | ||
| - Records the current handle count. | ||
| - Sets the template to `Hello world!` and asserts the `name` handle has zero matches. | ||
| - Asserts the new handle count is strictly less than the recorded count. |
- Drop "records initial count / asserts increase" wording from tests 2, 3, and 5 — the spec now asserts exact dynamic-handle counts via the dynamicHandlesLocator and the specific per-variable handles, not before/after comparisons (the count comparison was removed when waitForTimeout was dropped from the helper). - Fix External dependencies: api_utils.py lives under src/lfx/, the extractor uses Python's string.Formatter (not a regex), and the PromptComponent path now points at the real prompt.py location.
CONTRIBUTING.md requires every test to have test.step() describing each block. The spec was previously flat; this commit groups setup, action, and assertion phases into named steps so traces are readable and failures point at the right phase. Validation performed (per CONTRIBUTING.md): - npx playwright test --trace=on --reporter=html: 6/6 pass, traces generated for every test - Force-fail per test: each test fails when its main assertion is inverted (no false positives) - Clean re-run: 6/6 pass in ~27s, zero backend errors
Victor-w-Madeira
deleted the
feature/issue-185-prompt-template-component-regression
branch
May 11, 2026 20:08
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
core-components/prompt-template-component-regression.spec.tswith 6@stable @release @regression @componentstests (canvas render, dynamic handles from{var}, variable removal, variable replacement, full clear, and modal persistence — the last being new for this issue).ui-ux/prompt-dynamic-variables.spec.tsandui-ux/prompt-remove-variable.spec.tsinto the new consolidated spec; delete the old files.docs/core-components/prompt-template-component-regression.mdwith all mandatory sections.[-]to[x]and updateQA-SCENARIOS-GUIDE.mdto point at the new path.Closes #185
Test plan
npm run typecheck— cleannpm run lint— clean (one non-blockingwaitForTimeoutwarning, load-bearing for canvas re-render after handle add/remove; matches pattern in webhook/api-request specs)npx playwright test tests/tests-automations/regression/core-components/prompt-template-component-regression.spec.ts— 6/6 pass in 36.7s with no backend errors