Commit 02800dcd by Ben Patterson

Bok-choy on chrome: fix sequence for adding user to team.

TE-849

This passes fine in firefox; however in chrome, the click is occurring before
the page is ready; and then the click itself is not specific enough. Also
refactored the add button method so it more-clearly returns the expected
end-state.
parent 7d9ac7da
......@@ -64,7 +64,8 @@ class UsersPageMixin(PageObject):
"""
Click on the "New Team Member" button
"""
self.q(css='.create-user-button').click()
self.q(css='.create-user-button').first.click()
self.wait_for(lambda: self.new_user_form_visible, "Add user form is visible")
@property
def new_user_form_visible(self):
......@@ -88,8 +89,8 @@ class UsersPageMixin(PageObject):
def add_user_to_course(self, email):
""" Adds user to a course/library """
self.wait_for_element_visibility('.create-user-button', "Add team member button is available")
self.click_add_button()
self.wait_for(lambda: self.new_user_form_visible, "Add user form is visible")
self.set_new_user_email(email)
self.click_submit_new_user_form()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment