E2E: driving a Web Awesome form control from Playwright needs 'await el.updateComplete' before dispatching #462
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#462
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From MEDECA-378 triage (lesson L27). A durable pattern for any project using Web Awesome (Lit-based) controls with htmx or plain form reads.
Symptom: setting the value and dispatching the event synchronously -
el.value = 'Red';
el.dispatchEvent(new Event('change', {bubbles: true}));
Fix: await el.updateComplete between the assignment and the dispatch.
Why it is worth writing down rather than rediscovering: the failure is silent. The request still succeeds, just with the wrong query string - no error in the console, in the network log, or in the test output. The scenario fails later, somewhere unrelated-looking.
The same fact was already established in this codebase for a submit button reading wa-input/wa-select values; MEDECA-378 confirmed it for a change-triggered htmx read too. It is not specific to one control or one trigger - it follows from Lit's update cycle, so treat it as the rule for every Web Awesome form control.
Possible homes: an E2E-authoring guide, or the scatatags-webawesome repo's docs if that is the narrower fit.
Type: feature
Filed from:
/home/mph/Devel/projects/medeca-modul-poptavky-MEDECA-378on branchMEDECA-378Intake: needs-input
1. Which repository should carry the Web Awesome
await el.updateCompleterule for Playwright?iw-cli has no Playwright tests and no guide for writing E2E tests. Its E2E suite is BATS, under
test/. No file in this repository mentionsupdateComplete. The issue names two homes, and both are outside iw-cli:The nearest file in iw-cli is the skill for the dashboard's own controls: https://code.iterative.works/iterative-works/iw-cli/src/branch/main/.claude/skills/dashboard-htmx-controls/SKILL.md. Only an agent that works on the iw-cli dashboard reads it.
iterative-works/dev-docs), for example the webapp-scenario-verification skill or a new E2E-authoring page. Every project that loads the plugin reads it. The issue moves to that repository, and this issue closes.dashboard-htmx-controls/SKILL.md. MEDECA and other consumer projects do not read that skill.Recommended: a), because the rule applies to every project that uses Web Awesome, and the plugin is the one surface those projects already read.
Answer in a comment on this issue, per number, for example "1: a", or in your own words; intake reads it on its next iteration.