Validate Last Name and User ID (Username)
Description
Environment
Potential Workaround
Attachments
- 24 Mar 2017, 02:44 PM
- 24 Mar 2017, 02:44 PM
- 23 Mar 2017, 12:04 PM
is blocked by
relates to
Checklist
hideTestRail: Results
Activity
John Coburn March 30, 2017 at 8:42 PM
Added a 'columnMapping' prop to MultiColumnList to map rendered labels to keys used by the data so that they're adequately passed to the header click handler. I've also updated the component and the call in the Users results pane.
Cate Boerema March 28, 2017 at 8:29 AM
Excellent! Thank you, you guys! I'm looking forward to seeing it when the FOLIO test site is operational again...
Niels Erik Nielsen March 27, 2017 at 6:13 PM
Yes, I think so.
The 'X' for clearing fields with valid input now appears (had to yarn link stripes-components to ui-users, yarn linking it to stripes-sample-platform didn't do it, thanks John C.).
And the username column is labeled "User ID".
Jakub Skoczen March 27, 2017 at 1:30 PM
It seems like all we need for https://folio-org.atlassian.net/browse/LIBAPP-114#icft=LIBAPP-114 is in.
Niels Erik Nielsen March 27, 2017 at 12:38 PMEdited
That's easy for the add and edit forms. And for the User view.
There's an issue with changing it in the Users list, however. When clicking the column heading "User ID", the UI will send a query to the back-end to "sortby User ID" which doesn't fly (won't fail but records come back in a different order).
I could hack it for now - change "User ID" to "username" on the fly in UsersList's sort function. But for a proper solution, it looks like the Stripes component MultiColumnList might have to relax the binding of column label to actual back-end column name (not that I know if it already has a way to disconnect the two).
Purpose: Validate user record to ensure required fields are populated and data is of appropriate format. Real time feedback will be provided to the user per UX designs (supported by Stripes components).
CB Note: This story was written assuming the validation component would be working according to UX's specifications. If that's not the case, we can proceed with the standard React component that already exists in Stripes. Please indicate in the comments if any scenarios couldn't be met and I'll create a separate story for those.
Scenarios
Scenario
Given "Last name" field on User Details (this is currently labeled "Username" but we want to change it to "User ID")
When field has been touched and left empty
Then:
Error input is shown by outlining field with red and a red attention icon at the end of the input field
The following error message is displayed: “Please fill this in to continue”
Scenarios
Scenario
Given "User ID" field on User Details
When field has been touched and left empty
Then:
Error input is shown by outlining field with red and a red attention icon at the end of the input field
The following error message is displayed: “Please fill this in to continue”
Scenario
Given "User ID" field on User Details
When field has been populated with a non-unique User ID and focus has left the field
Then:
Error input is shown by outlining field with red and a red attention icon at the end of the input field
The following error message is displayed: “This User ID has already been taken”
Scenario
Given any editable field on User Details
When field has been populated with a valid entry and focus has left the field
Then valid input is shown by outlining field in green and a green checkmark icon at the end of the input field.
Scenario
Given any editable field on User Details
When field has been populated (regardless of whether entry is valid or invalid) and is in focus
Then an "x" is shown within the field (just to the left of the checkmark or attention icon
Scenario
Given a field on User Details is in focus
When the "x" is clicked
Then:
The field value is cleared
The field is returned to the neutral state