Merge pull request #10106 from edx/christina/tnl-2667
Fix flaky Studio Course Team bok choy tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user