Commit e884c65a by Christina Roberts

Merge pull request #10106 from edx/christina/tnl-2667

Fix flaky Studio Course Team bok choy tests
parents c1ba907b 4125e594
......@@ -254,6 +254,7 @@ class UserWrapper(PageObject):
self.wait_for_element_visibility('.prompt', 'Prompt is visible')
self.wait_for_element_visibility('.prompt .action-primary', 'Confirmation button is visible')
self.q(css='.prompt .action-primary').click()
self.wait_for_element_absence('.page-prompt .is-shown', 'Confirmation prompt is hidden')
wait_for_ajax_or_reload(self.browser)
@property
......
"""
Acceptance tests for course in studio
"""
from flaky import flaky
from nose.plugins.attrib import attr
from .base_studio_test import StudioCourseTest
......@@ -11,7 +10,6 @@ from ...pages.studio.users import CourseTeamPage
from ...pages.studio.index import DashboardPage
@flaky # TODO fix this, see TNL-2667
@attr('shard_2')
class CourseTeamPageTest(StudioCourseTest):
""" As a course author, I want to be able to add others to my team """
......@@ -75,9 +73,15 @@ class CourseTeamPageTest(StudioCourseTest):
def _assert_user_present(self, user, present=True):
""" Checks if specified user present on Course Team page """
if present:
self.assertIn(user.get('username'), self.page.usernames)
self.page.wait_for(
lambda: user.get('username') in self.page.usernames,
description="Wait for user to be present"
)
else:
self.assertNotIn(user.get('username'), self.page.usernames)
self.page.wait_for(
lambda: user.get('username') not in self.page.usernames,
description="Wait for user to be absent"
)
def _should_see_dialog(self, dialog_type, dialog_message):
""" Asserts dialog with specified message is shown """
......@@ -152,7 +156,6 @@ class CourseTeamPageTest(StudioCourseTest):
self._assert_can_not_manage_users()
@flaky # TNL-3515
def test_admins_can_delete_other_users(self):
"""
Scenario: Admins can delete other users
......
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