Merge pull request #13753 from edx/christina/tnl-5758
Flaky course outline bok choy test.
This commit is contained in:
@@ -11,6 +11,7 @@ from selenium.webdriver.support.ui import Select
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
from common.test.acceptance.pages.common.utils import click_css, confirm_prompt
|
||||
from common.test.acceptance.tests.helpers import disable_animations, enable_animations
|
||||
|
||||
from common.test.acceptance.pages.studio.course_page import CoursePage
|
||||
from common.test.acceptance.pages.studio.container import ContainerPage
|
||||
@@ -251,8 +252,7 @@ class CourseOutlineContainer(CourseOutlineItem):
|
||||
"""
|
||||
Toggle the expansion of this subsection.
|
||||
"""
|
||||
# pylint: disable=no-member
|
||||
self.browser.execute_script("jQuery.fx.off = true;")
|
||||
disable_animations(self)
|
||||
|
||||
def subsection_expanded():
|
||||
"""
|
||||
@@ -268,7 +268,7 @@ class CourseOutlineContainer(CourseOutlineItem):
|
||||
|
||||
# Need to click slightly off-center in order for the click to be recognized.
|
||||
ele = self.browser.find_element_by_css_selector(self._bounded_selector('.ui-toggle-expansion .fa'))
|
||||
ActionChains(self.browser).move_to_element_with_offset(ele, 4, 4).click().perform()
|
||||
ActionChains(self.browser).move_to_element_with_offset(ele, 8, 8).click().perform() # pylint: disable=no-member
|
||||
self.wait_for_element_presence(self._bounded_selector(self.ADD_BUTTON_SELECTOR), 'Subsection is expanded')
|
||||
|
||||
EmptyPromise(
|
||||
@@ -276,7 +276,7 @@ class CourseOutlineContainer(CourseOutlineItem):
|
||||
"Check that the container {} has been toggled".format(self.locator)
|
||||
).fulfill()
|
||||
|
||||
self.browser.execute_script("jQuery.fx.off = false;")
|
||||
enable_animations(self)
|
||||
|
||||
return self
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ from common.test.acceptance.fixtures.config import ConfigModelFixture
|
||||
from common.test.acceptance.fixtures.course import XBlockFixtureDesc
|
||||
|
||||
from base_studio_test import StudioCourseTest
|
||||
from common.test.acceptance.tests.helpers import load_data_str
|
||||
from common.test.acceptance.tests.helpers import load_data_str, disable_animations
|
||||
from common.test.acceptance.pages.lms.progress import ProgressPage
|
||||
|
||||
|
||||
@@ -1315,8 +1315,12 @@ class ExpandCollapseMultipleSectionsTest(CourseOutlineTest):
|
||||
And all sections are expanded
|
||||
"""
|
||||
self.course_outline_page.visit()
|
||||
# We have seen unexplainable sporadic failures in this test. Try disabling animations to see
|
||||
# if that helps.
|
||||
disable_animations(self.course_outline_page)
|
||||
self.course_outline_page.toggle_expand_collapse()
|
||||
self.assertEquals(self.course_outline_page.expand_collapse_link_state, ExpandCollapseLinkState.EXPAND)
|
||||
self.verify_all_sections(collapsed=True)
|
||||
self.course_outline_page.section_at(0).expand_subsection()
|
||||
self.course_outline_page.toggle_expand_collapse()
|
||||
self.assertEquals(self.course_outline_page.expand_collapse_link_state, ExpandCollapseLinkState.COLLAPSE)
|
||||
|
||||
Reference in New Issue
Block a user