588 — should invite user and check his avatar with picture¶
Description¶
Verifies that when a newly invited and activated employee uploads a profile picture and sets their name, the admin's Users grid and detail page both display the uploaded image as the avatar (instead of the default initials).
Preconditions¶
- Signed-in admin on a freshly seeded organization.
- The Users page is open.
- A MailSlurp inbox is available for the invitee.
- The fixture image
playwright/tests/files/profilePicture.jpegis available for upload.
Steps¶
- Invite a new employee by email (quick add) and complete registration and verification using the invite code from their inbox. Expected: the invitee finishes activation.
- Log in as the invitee via the API to obtain an access token. Expected: the access token is returned.
- Upload the test profile picture (
profilePicture.jpeg) as a Profile Avatar through the Storage API to get its file id. Expected: the upload returns a valid file id. - Patch the invitee's own account to set a generated first name, last name, and the uploaded avatar file id. Expected: the account update succeeds.
- Reload the admin's Users page. Expected: the invitee's row shows the new full name and the avatar in the grid matches the uploaded
profilePicture.jpeg. - Double-click the invitee's row using the new full name. Expected: the detail page shows the invited email, displays the uploaded image as the profile avatar, and the status reads "Activated".
Related¶
- Spec:
playwright/tests/integration/user.spec.ts(line 426)