Fixing flaky bokchoy TeamPageTests
The flaky test problems we've been seeing here are coming from not waiting long enough after performing actions. By forcing is_browser_on_page checks to wait until the page is fully loaded instead of just looking for the presence of a single element, we ensure that there will not be issues interacting with non-loaded elements. TNL-3069
This commit is contained in:
@@ -402,6 +402,7 @@ class InlineDiscussionPage(PageObject):
|
||||
return self.q(css=self._discussion_selector + " " + selector)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
self.wait_for_ajax()
|
||||
return self.q(css=self._discussion_selector).present
|
||||
|
||||
def is_discussion_expanded(self):
|
||||
|
||||
@@ -261,6 +261,7 @@ class TeamPage(CoursePage, PaginatedUIMixin):
|
||||
|
||||
def is_browser_on_page(self):
|
||||
"""Check if we're on the teams list page for a particular team."""
|
||||
self.wait_for_ajax()
|
||||
if self.team:
|
||||
if not self.url.endswith(self.url_path):
|
||||
return False
|
||||
|
||||
@@ -748,7 +748,6 @@ class CreateTeamTest(TeamsTabBase):
|
||||
self.verify_my_team_count(0)
|
||||
|
||||
|
||||
@flaky # TODO fix this, see TNL-3069
|
||||
@attr('shard_5')
|
||||
@ddt.ddt
|
||||
class TeamPageTest(TeamsTabBase):
|
||||
|
||||
Reference in New Issue
Block a user