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
fe23b766
Commit
fe23b766
authored
Mar 24, 2017
by
Robert Raposa
Committed by
GitHub
Mar 24, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14765 from edx/robrap/LEARNER-169
LEARNER-169: Refactor to navigate directly to courseware page.
parents
1b3a3a23
ac7e6bec
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
39 deletions
+38
-39
common/test/acceptance/tests/lms/test_lms.py
+2
-4
common/test/acceptance/tests/lms/test_lms_acid_xblock.py
+5
-16
common/test/acceptance/tests/lms/test_lms_courseware.py
+17
-5
common/test/acceptance/tests/video/test_video_module.py
+13
-14
lms/djangoapps/courseware/tests/test_views.py
+1
-0
No files found.
common/test/acceptance/tests/lms/test_lms.py
View file @
fe23b766
...
...
@@ -1040,8 +1040,7 @@ class TooltipTest(UniqueCourseTest):
"""
Verify that tooltips are displayed when you hover over the sequence nav bar.
"""
self
.
course_info_page
.
visit
()
self
.
tab_nav
.
go_to_tab
(
'Course'
)
self
.
courseware_page
.
visit
()
self
.
courseware_page
.
verify_tooltips_displayed
()
...
...
@@ -1189,8 +1188,7 @@ class ProblemExecutionTest(UniqueCourseTest):
def
test_python_execution_in_problem
(
self
):
# Navigate to the problem page
self
.
course_info_page
.
visit
()
self
.
tab_nav
.
go_to_tab
(
'Course'
)
self
.
courseware_page
.
visit
()
self
.
courseware_page
.
nav
.
go_to_section
(
'Test Section'
,
'Test Subsection'
)
problem_page
=
ProblemPage
(
self
.
browser
)
...
...
common/test/acceptance/tests/lms/test_lms_acid_xblock.py
View file @
fe23b766
...
...
@@ -7,8 +7,7 @@ from unittest import expectedFailure
from
common.test.acceptance.tests.helpers
import
UniqueCourseTest
from
common.test.acceptance.pages.lms.auto_auth
import
AutoAuthPage
from
common.test.acceptance.pages.lms.course_info
import
CourseInfoPage
from
common.test.acceptance.pages.lms.tab_nav
import
TabNavPage
from
common.test.acceptance.pages.lms.courseware
import
CoursewarePage
from
common.test.acceptance.pages.xblock.acid
import
AcidView
from
common.test.acceptance.fixtures.course
import
CourseFixture
,
XBlockFixtureDesc
...
...
@@ -30,8 +29,7 @@ class XBlockAcidBase(UniqueCourseTest):
AutoAuthPage
(
self
.
browser
,
course_id
=
self
.
course_id
)
.
visit
()
self
.
course_info_page
=
CourseInfoPage
(
self
.
browser
,
self
.
course_id
)
self
.
tab_nav
=
TabNavPage
(
self
.
browser
)
self
.
courseware_page
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
def
validate_acid_block_view
(
self
,
acid_block
):
"""
...
...
@@ -73,10 +71,7 @@ class XBlockAcidNoChildTest(XBlockAcidBase):
"""
Verify that all expected acid block tests pass in the lms.
"""
self
.
course_info_page
.
visit
()
self
.
tab_nav
.
go_to_tab
(
'Course'
)
self
.
courseware_page
.
visit
()
acid_block
=
AcidView
(
self
.
browser
,
'.xblock-student_view[data-block-type=acid]'
)
self
.
validate_acid_block_view
(
acid_block
)
...
...
@@ -117,10 +112,7 @@ class XBlockAcidChildTest(XBlockAcidBase):
"""
Verify that all expected acid block tests pass in the lms.
"""
self
.
course_info_page
.
visit
()
self
.
tab_nav
.
go_to_tab
(
'Course'
)
self
.
courseware_page
.
visit
()
acid_parent_block
=
AcidView
(
self
.
browser
,
'.xblock-student_view[data-block-type=acid_parent]'
)
self
.
validate_acid_parent_block_view
(
acid_parent_block
)
...
...
@@ -157,10 +149,7 @@ class XBlockAcidAsideTest(XBlockAcidBase):
"""
Verify that all expected acid block tests pass in the lms.
"""
self
.
course_info_page
.
visit
()
self
.
tab_nav
.
go_to_tab
(
'Course'
)
self
.
courseware_page
.
visit
()
acid_aside
=
AcidView
(
self
.
browser
,
'.xblock_asides-v1-student_view[data-block-type=acid_aside]'
)
self
.
validate_acid_aside_view
(
acid_aside
)
...
...
common/test/acceptance/tests/lms/test_lms_courseware.py
View file @
fe23b766
...
...
@@ -377,16 +377,15 @@ class ProctoredExamTest(UniqueCourseTest):
self
.
assertFalse
(
self
.
studio_course_outline
.
exam_review_rules_field_visible
())
@attr
(
shard
=
9
)
class
CoursewareMultipleVerticalsTest
(
UniqueCourseTest
,
EventsTestMixin
):
class
CoursewareMultipleVerticalsTestBase
(
UniqueCourseTest
,
EventsTestMixin
):
"""
Test
courseware with multiple verticals
Base class with setup for testing
courseware with multiple verticals
"""
USERNAME
=
"STUDENT_TESTER"
EMAIL
=
"student101@example.com"
def
setUp
(
self
):
super
(
CoursewareMultipleVerticalsTest
,
self
)
.
setUp
()
super
(
CoursewareMultipleVerticalsTest
Base
,
self
)
.
setUp
()
self
.
courseware_page
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
self
.
course_home_page
=
CourseHomePage
(
self
.
browser
,
self
.
course_id
)
...
...
@@ -435,6 +434,13 @@ class CoursewareMultipleVerticalsTest(UniqueCourseTest, EventsTestMixin):
AutoAuthPage
(
self
.
browser
,
username
=
self
.
USERNAME
,
email
=
self
.
EMAIL
,
course_id
=
self
.
course_id
,
staff
=
False
)
.
visit
()
@attr
(
shard
=
9
)
class
CoursewareMultipleVerticalsTest
(
CoursewareMultipleVerticalsTestBase
):
"""
Test courseware with multiple verticals
"""
@skip
(
'Disable temporarily to get course bookmarks out'
)
def
test_navigation_buttons
(
self
):
self
.
courseware_page
.
visit
()
...
...
@@ -661,7 +667,13 @@ class CoursewareMultipleVerticalsTest(UniqueCourseTest, EventsTestMixin):
)
.
visit
()
self
.
assertIn
(
'html 2 dummy body'
,
html2_page
.
get_selected_tab_content
())
@attr
(
'a11y'
)
@attr
(
'a11y'
)
class
CoursewareMultipleVerticalsA11YTest
(
CoursewareMultipleVerticalsTestBase
):
"""
Test a11y for courseware with multiple verticals
"""
def
test_courseware_a11y
(
self
):
"""
Run accessibility audit for the problem type.
...
...
common/test/acceptance/tests/video/test_video_module.py
View file @
fe23b766
...
...
@@ -52,7 +52,7 @@ class VideoBaseTest(UniqueCourseTest):
self
.
video
=
VideoPage
(
self
.
browser
)
self
.
tab_nav
=
TabNavPage
(
self
.
browser
)
self
.
courseware
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
self
.
courseware
_page
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
self
.
course_info_page
=
CourseInfoPage
(
self
.
browser
,
self
.
course_id
)
self
.
auth_page
=
AutoAuthPage
(
self
.
browser
,
course_id
=
self
.
course_id
)
...
...
@@ -135,8 +135,7 @@ class VideoBaseTest(UniqueCourseTest):
""" Register for the course and navigate to the video unit """
self
.
auth_page
.
visit
()
self
.
user_info
=
self
.
auth_page
.
user_info
self
.
course_info_page
.
visit
()
self
.
tab_nav
.
go_to_tab
(
'Course'
)
self
.
courseware_page
.
visit
()
def
_navigate_to_courseware_video_and_render
(
self
):
""" Wait for the video player to render """
...
...
@@ -194,7 +193,7 @@ class VideoBaseTest(UniqueCourseTest):
"""
Navigate to sequential specified by `video_display_name`
"""
self
.
courseware
.
go_to_sequential_position
(
position
)
self
.
courseware
_page
.
go_to_sequential_position
(
position
)
self
.
video
.
wait_for_video_player_render
()
...
...
@@ -529,7 +528,7 @@ class YouTubeVideoTest(VideoBaseTest):
self
.
assertTrue
(
self
.
video
.
downloaded_transcript_contains_text
(
file_type
,
search_text
))
# open vertical containing video "C"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-2'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-2'
)
# menu "download_transcript" doesn't exist
self
.
assertFalse
(
self
.
video
.
is_menu_present
(
'download_transcript'
))
...
...
@@ -676,17 +675,17 @@ class YouTubeVideoTest(VideoBaseTest):
self
.
navigate_to_video
()
# select the "2.0" speed on video "A"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-0'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-0'
)
self
.
video
.
wait_for_video_player_render
()
self
.
video
.
speed
=
'2.0'
# select the "0.50" speed on video "B"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-1'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-1'
)
self
.
video
.
wait_for_video_player_render
()
self
.
video
.
speed
=
'0.50'
# open video "C"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-2'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-2'
)
self
.
video
.
wait_for_video_player_render
()
# Since the playback speed was set to .5 in "B", this video will also be impacted
...
...
@@ -695,7 +694,7 @@ class YouTubeVideoTest(VideoBaseTest):
self
.
video
.
verify_speed_changed
(
'0.75x'
)
# go to the vertical containing video "A"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-0'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-0'
)
# Video "A" should still play at speed 2.0 because it was explicitly set to that.
self
.
assertEqual
(
self
.
video
.
speed
,
'2.0x'
)
...
...
@@ -704,7 +703,7 @@ class YouTubeVideoTest(VideoBaseTest):
self
.
video
.
reload_page
()
# go to the vertical containing video "A"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-0'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-0'
)
# check if video "A" should start playing at speed "2.0"
self
.
assertEqual
(
self
.
video
.
speed
,
'2.0x'
)
...
...
@@ -713,13 +712,13 @@ class YouTubeVideoTest(VideoBaseTest):
self
.
video
.
speed
=
'1.0'
# go to the vertical containing "B"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-1'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-1'
)
# Video "B" should still play at speed .5 because it was explicitly set to that.
self
.
assertEqual
(
self
.
video
.
speed
,
'0.50x'
)
# go to the vertical containing video "C"
self
.
courseware
.
nav
.
go_to_vertical
(
'Test Vertical-2'
)
self
.
courseware
_page
.
nav
.
go_to_vertical
(
'Test Vertical-2'
)
# The change of speed for Video "A" should impact Video "C" because it still has
# not been explicitly set to a speed.
...
...
@@ -912,13 +911,13 @@ class YouTubeVideoTest(VideoBaseTest):
execute_video_steps
([
'A'
])
# go to second sequential position
self
.
courseware
.
go_to_sequential_position
(
2
)
self
.
courseware
_page
.
go_to_sequential_position
(
2
)
execute_video_steps
(
tab2_video_names
)
# go back to first sequential position
# we are again playing tab 1 videos to ensure that switching didn't broke some video functionality.
self
.
courseware
.
go_to_sequential_position
(
1
)
self
.
courseware
_page
.
go_to_sequential_position
(
1
)
execute_video_steps
(
tab1_video_names
)
self
.
video
.
browser
.
refresh
()
...
...
lms/djangoapps/courseware/tests/test_views.py
View file @
fe23b766
...
...
@@ -957,6 +957,7 @@ class ViewsTestCase(ModuleStoreTestCase):
response
=
self
.
client
.
get
(
reverse
(
'info'
,
args
=
[
course_id
]),
HTTP_REFERER
=
'foo'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
# TODO: TNL-6387: Remove test
def
test_accordion
(
self
):
"""
This needs a response_context, which is not included in the render_accordion's main method
...
...
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