Skip to content

581 — should fill all user data and check created user

Description

Verifies that an admin can create a new user filling every available field (access, position, role, dates, phone, labels, work capacity, working schedule, cost rate, commission, contract details) and that all values are correctly displayed both in the Users grid row and on the user's detail page after reload.

Preconditions

  • Signed-in admin on a freshly seeded organization.
  • Three labels have been pre-created via the API and are available to attach.
  • A global role granting the BillingItemUltimate permission exists.
  • The Users page is open.

Steps

  1. Click "Add user" and switch the modal to the detailed view.
  2. Enter the new user's email address. Expected: the email is accepted.
  3. Set Access to the value from the test fixture, set Position, and pick the seeded global role from the Role dropdown.
  4. Open the Start Date picker and pick a date three days in the future; open the Due (End) Date picker and pick four days in the future; open the Birthday picker and pick a date 500 days in the past.
  5. Select the Czechia country flag for the phone field and enter the fixture phone number.
  6. Attach all three seeded labels.
  7. Expand "Add work capacity" and fill the capacity value, the hours-per unit, and the productivity coefficient.
  8. Expand "Add working schedule" and tick/untick each of Monday through Sunday to match the fixture.
  9. Expand "Add cost rate" and enter the cost-rate value; expand "Add commission" and enter the commission value.
  10. Expand "Add contract details", choose the contract type, open the expiry date picker and pick the same start date as step 4.
  11. Click Create. Expected: a "user created" confirmation popup appears.
  12. Reload the page. Expected: the new user's row shows the chosen Access value, status "Invited", Teams "-", and the seeded role; the grid now contains 2 users.
  13. Double-click the new user to open their detail page. Expected: the detail page shows the entered email, access, role, position, birthday, "since" / start date / due date matching the dates chosen, the Czechia phone flag, the formatted Czech phone number, and three label chips while collapsed.
  14. Expected: the work capacity section shows the saved value, productivity, and unit; cost rate, commission, contract type, and contract expiry all show the saved values; the position appears at the top of the detail header; the status badge reads "Invited"; and the avatar is the default initials avatar (no image).
  15. Expand the Working schedule accordion. Expected: each day's checkbox matches the state chosen in step 8.
  • Spec: playwright/tests/integration/user.spec.ts (line 92)