582 — should fill only ${flow.label} and assert rest of expanded fields¶
Description¶
Parameterized scenario that verifies each individually creatable section of the user form (work capacity; cost rate + commission; contract details) saves correctly, leaves only the relevant accordions expanded on reopen, collapses cleanly when removed, and resets to empty defaults when re-added. One test run per flow label.
Preconditions¶
- Signed-in admin on a freshly seeded organization.
- The Users page is open.
Steps¶
- Click "Add user" and switch the modal to the detailed view; enter the new user's email.
- Fill ONLY the fields for the flow under test:
- "work capacity" flow: expand "Add work capacity" and fill value, hours-per unit, and productivity coefficient.
- "cost rate and commission" flow: expand "Add cost rate" and fill the value; expand "Add commission" and fill the value.
- "contract details" flow: expand "Add contract details", pick a contract type, then choose a contract expiry date three days in the future.
- Click Create. Expected: a "user created" popup is shown.
- Reload the Users page and double-click the new user to open the detail page. Expected: the email shown matches what was entered.
- Expected: only the section(s) filled in step 2 are expanded; all other creatable accordions (work capacity, cost rate, commission, contract details) are collapsed. For the "cost rate and commission" flow both Cost rate AND Commission are expanded.
- Expected: the saved values inside the expanded section(s) match exactly what was entered (capacity value/unit/coefficient, or cost-rate + commission values, or contract type + expiry date).
- Click the section's "Remove" button(s) (Remove work capacity / Remove cost rate + Remove commission / Remove contract details), click Save, and reload. Expected: an "updated" confirmation popup appears and after reload all four creatable accordions are collapsed.
- Re-expand the same section(s) again via the "Add" button. Expected: all fields are empty (value/coefficient blank, unit selector reads "Select", contract type/expiry blank).
Related¶
- Spec:
playwright/tests/integration/user.spec.ts(line 272)