Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a5fa635b
Commit
a5fa635b
authored
Oct 14, 2016
by
Christina Roberts
Committed by
GitHub
Oct 14, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13753 from edx/christina/tnl-5758
Flaky course outline bok choy test.
parents
65723e2b
c9284835
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
common/test/acceptance/pages/studio/overview.py
+4
-4
common/test/acceptance/tests/studio/test_studio_outline.py
+5
-1
No files found.
common/test/acceptance/pages/studio/overview.py
View file @
a5fa635b
...
@@ -11,6 +11,7 @@ from selenium.webdriver.support.ui import Select
...
@@ -11,6 +11,7 @@ from selenium.webdriver.support.ui import Select
from
selenium.webdriver.common.keys
import
Keys
from
selenium.webdriver.common.keys
import
Keys
from
common.test.acceptance.pages.common.utils
import
click_css
,
confirm_prompt
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.course_page
import
CoursePage
from
common.test.acceptance.pages.studio.container
import
ContainerPage
from
common.test.acceptance.pages.studio.container
import
ContainerPage
...
@@ -251,8 +252,7 @@ class CourseOutlineContainer(CourseOutlineItem):
...
@@ -251,8 +252,7 @@ class CourseOutlineContainer(CourseOutlineItem):
"""
"""
Toggle the expansion of this subsection.
Toggle the expansion of this subsection.
"""
"""
# pylint: disable=no-member
disable_animations
(
self
)
self
.
browser
.
execute_script
(
"jQuery.fx.off = true;"
)
def
subsection_expanded
():
def
subsection_expanded
():
"""
"""
...
@@ -268,7 +268,7 @@ class CourseOutlineContainer(CourseOutlineItem):
...
@@ -268,7 +268,7 @@ class CourseOutlineContainer(CourseOutlineItem):
# Need to click slightly off-center in order for the click to be recognized.
# 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'
))
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'
)
self
.
wait_for_element_presence
(
self
.
_bounded_selector
(
self
.
ADD_BUTTON_SELECTOR
),
'Subsection is expanded'
)
EmptyPromise
(
EmptyPromise
(
...
@@ -276,7 +276,7 @@ class CourseOutlineContainer(CourseOutlineItem):
...
@@ -276,7 +276,7 @@ class CourseOutlineContainer(CourseOutlineItem):
"Check that the container {} has been toggled"
.
format
(
self
.
locator
)
"Check that the container {} has been toggled"
.
format
(
self
.
locator
)
)
.
fulfill
()
)
.
fulfill
()
self
.
browser
.
execute_script
(
"jQuery.fx.off = false;"
)
enable_animations
(
self
)
return
self
return
self
...
...
common/test/acceptance/tests/studio/test_studio_outline.py
View file @
a5fa635b
...
@@ -19,7 +19,7 @@ from common.test.acceptance.fixtures.config import ConfigModelFixture
...
@@ -19,7 +19,7 @@ from common.test.acceptance.fixtures.config import ConfigModelFixture
from
common.test.acceptance.fixtures.course
import
XBlockFixtureDesc
from
common.test.acceptance.fixtures.course
import
XBlockFixtureDesc
from
base_studio_test
import
StudioCourseTest
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
from
common.test.acceptance.pages.lms.progress
import
ProgressPage
...
@@ -1315,8 +1315,12 @@ class ExpandCollapseMultipleSectionsTest(CourseOutlineTest):
...
@@ -1315,8 +1315,12 @@ class ExpandCollapseMultipleSectionsTest(CourseOutlineTest):
And all sections are expanded
And all sections are expanded
"""
"""
self
.
course_outline_page
.
visit
()
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
.
course_outline_page
.
toggle_expand_collapse
()
self
.
assertEquals
(
self
.
course_outline_page
.
expand_collapse_link_state
,
ExpandCollapseLinkState
.
EXPAND
)
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
.
section_at
(
0
)
.
expand_subsection
()
self
.
course_outline_page
.
toggle_expand_collapse
()
self
.
course_outline_page
.
toggle_expand_collapse
()
self
.
assertEquals
(
self
.
course_outline_page
.
expand_collapse_link_state
,
ExpandCollapseLinkState
.
COLLAPSE
)
self
.
assertEquals
(
self
.
course_outline_page
.
expand_collapse_link_state
,
ExpandCollapseLinkState
.
COLLAPSE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment