-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Started switching user data entry to use autocomplete #1035
base: main
Are you sure you want to change the base?
Conversation
User.all.map(&:uid) | ||
end | ||
|
||
# Users that can be project sponsors | ||
def self.sponsor_users |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.sponsor_users
and self.manager_users
below now returns a list of User objects (rather than just their uid
s) so that we can display both the user name and their netid
…till need to fix a few more broken test
93b6757
to
cb71b0c
Compare
@@ -88,3 +88,11 @@ | |||
end | |||
end | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This helper removes the need of calling page.find("body").click
as a separate step when validating textboxes since it forces the textbox to lose focus (via tabbing out)
</div> | ||
</div> <!-- id=edit --> | ||
|
||
<script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the biggest change in this PR: the JavaScript logic to get the autocomplete and the validation to work together.
# Without removing the focus from the form field, the "change" event is not propagated for the DOM | ||
page.find("body").click | ||
click_on "btn-add-rw-user" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that clicking on the button to add the user once selected is not longer necessary in the UI (and therefore on the test). The value selected is automatically added as a user.
Updates the user entry elements on the form to use an autocomplete textbox and mimics the validation requested on #980.
This animated GIF shows both the autocomplete and the validation in action:
Closes #980