Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
8dee3fda
Commit
8dee3fda
authored
6 years ago
by
attiyaishaque
Browse files
Options
Downloads
Patches
Plain Diff
Fixed tests that are flaky on fireFox 59.
parent
2075f52d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/test/acceptance/tests/studio/test_studio_outline.py
+62
-0
62 additions, 0 deletions
common/test/acceptance/tests/studio/test_studio_outline.py
with
62 additions
and
0 deletions
common/test/acceptance/tests/studio/test_studio_outline.py
+
62
−
0
View file @
8dee3fda
...
...
@@ -602,6 +602,46 @@ class UnitAccessTest(CourseOutlineTest):
staff_page
.
wait_for_page
()
self
.
assertEqual
(
course_home_page
.
outline
.
num_units
,
2
)
def
test_restricted_sections_for_enrollment_track_users_in_lms
(
self
):
"""
Verify that those who are in an enrollment track with access to a restricted unit are able
to see that unit in lms, and those who are in an enrollment track without access to a restricted
unit are not able to see that unit in lms
"""
# Add just 1 enrollment track to verify the enrollment option isn't available in the modal
add_enrollment_course_modes
(
self
.
browser
,
self
.
course_id
,
[
"
audit
"
])
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
expand_all_subsections
()
unit
=
self
.
course_outline_page
.
section_at
(
0
).
subsection_at
(
0
).
unit_at
(
0
)
enrollment_select_options
=
unit
.
get_enrollment_select_options
()
self
.
assertFalse
(
'
Enrollment Track Groups
'
in
enrollment_select_options
)
# Add the additional enrollment track so the unit access toggles should now be available
add_enrollment_course_modes
(
self
.
browser
,
self
.
course_id
,
[
"
verified
"
])
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
expand_all_subsections
()
unit
=
self
.
course_outline_page
.
section_at
(
0
).
subsection_at
(
0
).
unit_at
(
0
)
unit
.
toggle_unit_access
(
'
Enrollment Track Groups
'
,
[
1
])
# Hard coded 1 for audit ID
self
.
course_outline_page
.
view_live
()
course_home_page
=
CourseHomePage
(
self
.
browser
,
self
.
course_id
)
course_home_page
.
visit
()
course_home_page
.
wait_for_page
()
course_home_page
.
resume_course_from_header
()
self
.
assertEqual
(
course_home_page
.
outline
.
num_units
,
2
)
# Test for a user without additional content available
staff_page
=
StaffCoursewarePage
(
self
.
browser
,
self
.
course_id
)
staff_page
.
set_staff_view_mode
(
'
Learner in Verified
'
)
staff_page
.
wait_for_page
()
self
.
assertEqual
(
course_home_page
.
outline
.
num_units
,
1
)
# Test for a user with additional content available
staff_page
=
StaffCoursewarePage
(
self
.
browser
,
self
.
course_id
)
staff_page
.
set_staff_view_mode
(
'
Learner in Audit
'
)
staff_page
.
wait_for_page
()
self
.
assertEqual
(
course_home_page
.
outline
.
num_units
,
2
)
@attr
(
shard
=
14
)
class
StaffLockTest
(
CourseOutlineTest
):
...
...
@@ -680,6 +720,28 @@ class StaffLockTest(CourseOutlineTest):
unit
=
self
.
course_outline_page
.
section_at
(
0
).
subsection_at
(
0
).
unit_at
(
0
)
self
.
_toggle_lock_on_unlocked_item
(
unit
)
def
test_locked_subsections_do_not_appear_in_lms
(
self
):
"""
Scenario: A locked subsection is not visible to students in the LMS
Given I have a course with two subsections
When I enable explicit staff lock on one subsection
And I click the View Live button to switch to staff view
And I visit the course home with the outline
Then I see two subsections in the outline
And when I switch the view mode to student view
Then I see one subsection in the outline
"""
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
section_at
(
0
).
subsection_at
(
1
).
set_staff_lock
(
True
)
self
.
course_outline_page
.
view_live
()
course_home_page
=
CourseHomePage
(
self
.
browser
,
self
.
course_id
)
course_home_page
.
visit
()
course_home_page
.
wait_for_page
()
self
.
assertEqual
(
course_home_page
.
outline
.
num_subsections
,
2
)
course_home_page
.
preview
.
set_staff_view_mode
(
'
Learner
'
)
self
.
assertEqual
(
course_home_page
.
outline
.
num_subsections
,
1
)
def
test_subsections_can_be_locked
(
self
):
"""
Scenario: Subsections can be locked and unlocked from the course outline page
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment