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
70819203
Commit
70819203
authored
Mar 27, 2015
by
Martyn James
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7443 from edx/mjevtic/SOL-336
Fixed flaky test(s) - SOL-336 - merging updates
parents
68ba1786
29bceffc
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
29 additions
and
29 deletions
+29
-29
common/test/acceptance/pages/studio/overview.py
+6
-3
common/test/acceptance/performance/test_studio_performance.py
+1
-1
common/test/acceptance/tests/lms/test_library.py
+1
-1
common/test/acceptance/tests/lms/test_lms_courseware_search.py
+2
-5
common/test/acceptance/tests/studio/base_studio_test.py
+1
-1
common/test/acceptance/tests/studio/test_studio_acid_xblock.py
+3
-3
common/test/acceptance/tests/studio/test_studio_general.py
+1
-1
common/test/acceptance/tests/studio/test_studio_library_container.py
+1
-1
common/test/acceptance/tests/studio/test_studio_outline.py
+10
-10
common/test/acceptance/tests/studio/test_studio_rerun.py
+1
-1
common/test/acceptance/tests/studio/test_studio_with_ora_component.py
+1
-1
common/test/acceptance/tests/video/test_studio_video_module.py
+1
-1
No files found.
common/test/acceptance/pages/studio/overview.py
View file @
70819203
...
...
@@ -222,7 +222,7 @@ class CourseOutlineContainer(CourseOutlineItem):
require_notification
=
require_notification
,
)
def
toggle_expand
(
self
):
def
expand_subsection
(
self
):
"""
Toggle the expansion of this subsection.
"""
...
...
@@ -236,12 +236,15 @@ class CourseOutlineContainer(CourseOutlineItem):
currently_expanded
=
subsection_expanded
()
self
.
q
(
css
=
self
.
_bounded_selector
(
'.ui-toggle-expansion i'
))
.
first
.
click
()
self
.
wait_for_element_presence
(
self
.
_bounded_selector
(
self
.
ADD_BUTTON_SELECTOR
),
'Subsection is expanded'
)
EmptyPromise
(
lambda
:
subsection_expanded
()
!=
currently_expanded
,
"Check that the container {} has been toggled"
.
format
(
self
.
locator
)
)
.
fulfill
()
self
.
browser
.
execute_script
(
"jQuery.fx.off = false;"
)
return
self
@property
...
...
@@ -564,10 +567,10 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
"""
for
section
in
self
.
sections
():
if
section
.
is_collapsed
:
section
.
toggle_expand
()
section
.
expand_subsection
()
for
subsection
in
section
.
subsections
():
if
subsection
.
is_collapsed
:
subsection
.
toggle_expand
()
subsection
.
expand_subsection
()
@property
def
xblocks
(
self
):
...
...
common/test/acceptance/performance/test_studio_performance.py
View file @
70819203
...
...
@@ -44,7 +44,7 @@ class StudioPagePerformanceTest(WebAppTest):
Produce a HAR for loading a unit page.
"""
course_outline_page
=
CourseOutlinePage
(
self
.
browser
,
self
.
course_org
,
self
.
course_num
,
self
.
course_run
)
.
visit
()
course_outline_unit
=
course_outline_page
.
section
(
section_title
)
.
subsection
(
subsection_title
)
.
toggle_expand
()
.
unit
(
unit_title
)
course_outline_unit
=
course_outline_page
.
section
(
section_title
)
.
subsection
(
subsection_title
)
.
expand_subsection
()
.
unit
(
unit_title
)
har_name
=
'UnitPage_{org}_{course}'
.
format
(
org
=
self
.
course_org
,
course
=
self
.
course_num
...
...
common/test/acceptance/tests/lms/test_library.py
View file @
70819203
...
...
@@ -119,7 +119,7 @@ class LibraryContentTestBase(UniqueCourseTest):
self
.
_auto_auth
(
self
.
STAFF_USERNAME
,
self
.
STAFF_EMAIL
,
True
)
self
.
course_outline
.
visit
()
subsection
=
self
.
course_outline
.
section
(
SECTION_NAME
)
.
subsection
(
SUBSECTION_NAME
)
return
subsection
.
toggle_expand
()
.
unit
(
UNIT_NAME
)
.
go_to
()
return
subsection
.
expand_subsection
()
.
unit
(
UNIT_NAME
)
.
go_to
()
def
_goto_library_block_page
(
self
,
block_id
=
None
):
"""
...
...
common/test/acceptance/tests/lms/test_lms_courseware_search.py
View file @
70819203
...
...
@@ -4,8 +4,6 @@ Test courseware search
import
os
import
json
from
flaky
import
flaky
from
..helpers
import
UniqueCourseTest
from
...pages.common.logout
import
LogoutPage
from
...pages.studio.utils
import
add_html_component
,
click_css
,
type_in_codemirror
...
...
@@ -99,7 +97,7 @@ class CoursewareSearchTest(UniqueCourseTest):
"""
self
.
course_outline
.
visit
()
subsection
=
self
.
course_outline
.
section_at
(
section_index
)
.
subsection_at
(
0
)
subsection
.
toggle_expand
()
subsection
.
expand_subsection
()
unit
=
subsection
.
unit_at
(
0
)
unit
.
publish
()
...
...
@@ -119,7 +117,7 @@ class CoursewareSearchTest(UniqueCourseTest):
# create a unit in course outline
self
.
course_outline
.
visit
()
subsection
=
self
.
course_outline
.
section_at
(
section_index
)
.
subsection_at
(
0
)
subsection
.
toggle_expand
()
subsection
.
expand_subsection
()
subsection
.
add_unit
()
# got to unit and create an HTML component and save (not publish)
...
...
@@ -167,7 +165,6 @@ class CoursewareSearchTest(UniqueCourseTest):
self
.
courseware_search_page
.
search_for_term
(
self
.
SEARCH_STRING
)
assert
self
.
SEARCH_STRING
in
self
.
courseware_search_page
.
search_results
.
html
[
0
]
@flaky
# TODO fix this, see SOL-336
def
test_reindex
(
self
):
"""
Make sure new content gets reindexed on button press.
...
...
common/test/acceptance/tests/studio/base_studio_test.py
View file @
70819203
...
...
@@ -93,7 +93,7 @@ class ContainerBase(StudioCourseTest):
"""
self
.
outline
.
visit
()
subsection
=
self
.
outline
.
section
(
section_name
)
.
subsection
(
subsection_name
)
return
subsection
.
toggle_expand
()
.
unit
(
unit_name
)
.
go_to
()
return
subsection
.
expand_subsection
()
.
unit
(
unit_name
)
.
go_to
()
def
do_action_and_verify
(
self
,
action
,
expected_ordering
):
"""
...
...
common/test/acceptance/tests/studio/test_studio_acid_xblock.py
View file @
70819203
...
...
@@ -69,7 +69,7 @@ class XBlockAcidBase(WebAppTest):
self
.
outline
.
visit
()
subsection
=
self
.
outline
.
section
(
'Test Section'
)
.
subsection
(
'Test Subsection'
)
unit
=
subsection
.
toggle_expand
()
.
unit
(
'Test Unit'
)
.
go_to
()
unit
=
subsection
.
expand_subsection
()
.
unit
(
'Test Unit'
)
.
go_to
()
acid_block
=
AcidView
(
self
.
browser
,
unit
.
xblocks
[
0
]
.
preview_selector
)
self
.
validate_acid_block_preview
(
acid_block
)
...
...
@@ -81,7 +81,7 @@ class XBlockAcidBase(WebAppTest):
self
.
outline
.
visit
()
subsection
=
self
.
outline
.
section
(
'Test Section'
)
.
subsection
(
'Test Subsection'
)
unit
=
subsection
.
toggle_expand
()
.
unit
(
'Test Unit'
)
.
go_to
()
unit
=
subsection
.
expand_subsection
()
.
unit
(
'Test Unit'
)
.
go_to
()
acid_block
=
AcidView
(
self
.
browser
,
unit
.
xblocks
[
0
]
.
edit
()
.
editor_selector
)
self
.
assertTrue
(
acid_block
.
init_fn_passed
)
...
...
@@ -133,7 +133,7 @@ class XBlockAcidParentBase(XBlockAcidBase):
self
.
outline
.
visit
()
subsection
=
self
.
outline
.
section
(
'Test Section'
)
.
subsection
(
'Test Subsection'
)
unit
=
subsection
.
toggle_expand
()
.
unit
(
'Test Unit'
)
.
go_to
()
unit
=
subsection
.
expand_subsection
()
.
unit
(
'Test Unit'
)
.
go_to
()
container
=
unit
.
xblocks
[
0
]
.
go_to_container
()
acid_block
=
AcidView
(
self
.
browser
,
container
.
xblocks
[
0
]
.
preview_selector
)
...
...
common/test/acceptance/tests/studio/test_studio_general.py
View file @
70819203
...
...
@@ -131,7 +131,7 @@ class DiscussionPreviewTest(StudioCourseTest):
self
.
course_info
[
'run'
]
)
cop
.
visit
()
self
.
unit
=
cop
.
section
(
'Test Section'
)
.
subsection
(
'Test Subsection'
)
.
toggle_expand
()
.
unit
(
'Test Unit'
)
self
.
unit
=
cop
.
section
(
'Test Section'
)
.
subsection
(
'Test Subsection'
)
.
expand_subsection
()
.
unit
(
'Test Unit'
)
self
.
unit
.
go_to
()
def
populate_course_fixture
(
self
,
course_fixture
):
...
...
common/test/acceptance/tests/studio/test_studio_library_container.py
View file @
70819203
...
...
@@ -40,7 +40,7 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest):
self
.
outline
.
visit
()
subsection
=
self
.
outline
.
section
(
SECTION_NAME
)
.
subsection
(
SUBSECTION_NAME
)
self
.
unit_page
=
subsection
.
toggle_expand
()
.
unit
(
UNIT_NAME
)
.
go_to
()
self
.
unit_page
=
subsection
.
expand_subsection
()
.
unit
(
UNIT_NAME
)
.
go_to
()
def
populate_library_fixture
(
self
,
library_fixture
):
"""
...
...
common/test/acceptance/tests/studio/test_studio_outline.py
View file @
70819203
...
...
@@ -292,7 +292,7 @@ class WarningMessagesTest(CourseOutlineTest):
self
.
course_outline_page
.
visit
()
section
=
self
.
course_outline_page
.
section
(
unit_state
.
name
)
subsection
=
section
.
subsection_at
(
0
)
subsection
.
toggle_expand
()
subsection
.
expand_subsection
()
unit
=
subsection
.
unit_at
(
0
)
if
expected_status_message
==
self
.
STAFF_ONLY_WARNING
:
self
.
assertEqual
(
section
.
status_message
,
self
.
STAFF_ONLY_WARNING
)
...
...
@@ -314,7 +314,7 @@ class WarningMessagesTest(CourseOutlineTest):
name
=
unit_state
.
name
self
.
course_outline_page
.
visit
()
subsection
=
self
.
course_outline_page
.
section
(
name
)
.
subsection
(
name
)
subsection
.
toggle_expand
()
subsection
.
expand_subsection
()
if
unit_state
.
publish_state
==
self
.
PublishState
.
UNPUBLISHED_CHANGES
:
unit
=
subsection
.
unit
(
name
)
.
go_to
()
...
...
@@ -962,7 +962,7 @@ class EditNamesTest(CourseOutlineTest):
Then the section is collapsed
"""
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
section_at
(
0
)
.
toggle_expand
()
self
.
course_outline_page
.
section_at
(
0
)
.
expand_subsection
()
self
.
assertFalse
(
self
.
course_outline_page
.
section_at
(
0
)
.
in_editable_form
())
self
.
assertTrue
(
self
.
course_outline_page
.
section_at
(
0
)
.
is_collapsed
)
self
.
course_outline_page
.
section_at
(
0
)
.
edit_name
()
...
...
@@ -1138,7 +1138,7 @@ class DeleteContentTest(CourseOutlineTest):
And the unit should immediately be deleted from the course outline
"""
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
toggle_expand
()
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
expand_subsection
()
self
.
assertEqual
(
len
(
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
units
()),
1
)
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
unit_at
(
0
)
.
delete
()
self
.
assertEqual
(
len
(
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
units
()),
0
)
...
...
@@ -1153,7 +1153,7 @@ class DeleteContentTest(CourseOutlineTest):
And the unit should remain in the course outline
"""
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
toggle_expand
()
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
expand_subsection
()
self
.
assertEqual
(
len
(
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
units
()),
1
)
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
unit_at
(
0
)
.
delete
(
cancel
=
True
)
self
.
assertEqual
(
len
(
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
units
()),
1
)
...
...
@@ -1208,7 +1208,7 @@ class ExpandCollapseMultipleSectionsTest(CourseOutlineTest):
Toggles the expand collapse state of all sections.
"""
for
section
in
self
.
course_outline_page
.
sections
():
section
.
toggle_expand
()
section
.
expand_subsection
()
def
test_expanded_by_default
(
self
):
"""
...
...
@@ -1265,7 +1265,7 @@ class ExpandCollapseMultipleSectionsTest(CourseOutlineTest):
"""
self
.
course_outline_page
.
visit
()
self
.
verify_all_sections
(
collapsed
=
False
)
self
.
course_outline_page
.
section_at
(
0
)
.
toggle_expand
()
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
.
EXPAND
)
self
.
verify_all_sections
(
collapsed
=
True
)
...
...
@@ -1299,7 +1299,7 @@ class ExpandCollapseMultipleSectionsTest(CourseOutlineTest):
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
toggle_expand_collapse
()
self
.
assertEquals
(
self
.
course_outline_page
.
expand_collapse_link_state
,
ExpandCollapseLinkState
.
EXPAND
)
self
.
course_outline_page
.
section_at
(
0
)
.
toggle_expand
()
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
)
self
.
verify_all_sections
(
collapsed
=
False
)
...
...
@@ -1449,7 +1449,7 @@ class UnitNavigationTest(CourseOutlineTest):
Then I will be taken to the appropriate unit page
"""
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
toggle_expand
()
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
expand_subsection
()
unit
=
self
.
course_outline_page
.
section_at
(
0
)
.
subsection_at
(
0
)
.
unit_at
(
0
)
.
go_to
()
self
.
assertTrue
(
unit
.
is_browser_on_page
)
...
...
@@ -1575,6 +1575,6 @@ class PublishSectionTest(CourseOutlineTest):
"""
section
=
self
.
course_outline_page
.
section
(
SECTION_NAME
)
subsection
=
section
.
subsection
(
SUBSECTION_NAME
)
unit
=
subsection
.
toggle_expand
()
.
unit
(
UNIT_NAME
)
unit
=
subsection
.
expand_subsection
()
.
unit
(
UNIT_NAME
)
return
(
section
,
subsection
,
unit
)
common/test/acceptance/tests/studio/test_studio_rerun.py
View file @
70819203
...
...
@@ -94,7 +94,7 @@ class CourseRerunTest(StudioCourseTest):
EmptyPromise
(
lambda
:
not
outline_page
.
has_rerun_notification
,
"Rerun notification dismissed"
)
.
fulfill
()
subsection
=
outline_page
.
section
(
self
.
SECTION_NAME
)
.
subsection
(
self
.
SUBSECITON_NAME
)
subsection
.
toggle_expand
()
subsection
.
expand_subsection
()
unit_page
=
subsection
.
unit
(
self
.
UNIT_NAME
)
.
go_to
()
unit_page
.
view_published_version
()
...
...
common/test/acceptance/tests/studio/test_studio_with_ora_component.py
View file @
70819203
...
...
@@ -53,7 +53,7 @@ class ORAComponentTest(StudioCourseTest):
def
_go_to_unit_page
(
self
,
section_name
=
'Test Section'
,
subsection_name
=
'Test Subsection'
,
unit_name
=
'Test Unit'
):
self
.
course_outline_page
.
visit
()
subsection
=
self
.
course_outline_page
.
section
(
section_name
)
.
subsection
(
subsection_name
)
return
subsection
.
toggle_expand
()
.
unit
(
unit_name
)
.
go_to
()
return
subsection
.
expand_subsection
()
.
unit
(
unit_name
)
.
go_to
()
def
test_edit_save_and_export
(
self
):
"""
...
...
common/test/acceptance/tests/video/test_studio_video_module.py
View file @
70819203
...
...
@@ -83,7 +83,7 @@ class CMSVideoBaseTest(UniqueCourseTest):
self
.
outline
.
visit
()
# Visit Unit page
self
.
unit_page
=
self
.
outline
.
section
(
'Test Section'
)
.
subsection
(
'Test Subsection'
)
.
toggle_expand
()
.
unit
(
self
.
unit_page
=
self
.
outline
.
section
(
'Test Section'
)
.
subsection
(
'Test Subsection'
)
.
expand_subsection
()
.
unit
(
'Test Unit'
)
.
go_to
()
self
.
video
.
wait_for_video_component_render
()
...
...
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