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
c167ad5e
Commit
c167ad5e
authored
Dec 01, 2015
by
raeeschachar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test studio split test failing on chrome
parent
a0db0d82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
common/test/acceptance/tests/studio/test_studio_split_test.py
+13
-8
No files found.
common/test/acceptance/tests/studio/test_studio_split_test.py
View file @
c167ad5e
...
...
@@ -333,9 +333,9 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin):
return
config
,
split_test
return
config
def
publish_unit_in_
LMS_and_view
(
self
,
courseware_pag
e
):
def
publish_unit_in_
lms_and_view
(
self
,
courseware_page
,
publish
=
Tru
e
):
"""
Given course outline page, publish first unit and view it in LMS
Given course outline page, publish first unit and view it in LMS
when publish is false, it will only view
"""
self
.
outline_page
.
visit
()
self
.
outline_page
.
expand_all_subsections
()
...
...
@@ -343,7 +343,8 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin):
unit
=
section
.
subsection_at
(
0
)
.
unit_at
(
0
)
.
go_to
()
# I publish and view in LMS and it is rendered correctly
unit
.
publish_action
.
click
()
if
publish
:
unit
.
publish_action
.
click
()
unit
.
view_published_version
()
self
.
assertEqual
(
len
(
self
.
browser
.
window_handles
),
2
)
courseware_page
.
wait_for_page
()
...
...
@@ -1033,11 +1034,11 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin):
config
.
edit_warning_message_text
)
def
publish_unit_and_verify_groups_in_
LMS
(
self
,
courseware_page
,
group_names
):
def
publish_unit_and_verify_groups_in_
lms
(
self
,
courseware_page
,
group_names
,
publish
=
True
):
"""
Publish first unit in LMS and verify that Courseware page has given Groups
"""
self
.
publish_unit_in_
LMS_and_view
(
courseware_page
)
self
.
publish_unit_in_
lms_and_view
(
courseware_page
,
publish
)
self
.
assertEqual
(
u'split_test'
,
courseware_page
.
xblock_component_type
())
self
.
assertTrue
(
courseware_page
.
q
(
css
=
".split-test-select"
)
.
is_present
())
rendered_group_names
=
self
.
get_select_options
(
page
=
courseware_page
,
selector
=
".split-test-select"
)
...
...
@@ -1064,7 +1065,7 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin):
# render in LMS correctly
courseware_page
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
self
.
publish_unit_and_verify_groups_in_
LMS
(
courseware_page
,
[
u'Group A'
,
u'Group B'
,
u'Group C'
])
self
.
publish_unit_and_verify_groups_in_
lms
(
courseware_page
,
[
u'Group A'
,
u'Group B'
,
u'Group C'
])
# I go to group configuration and delete group
self
.
page
.
visit
()
...
...
@@ -1078,7 +1079,11 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin):
self
.
browser
.
switch_to_window
(
self
.
browser
.
window_handles
[
0
])
# render in LMS to see how inactive vertical is rendered
self
.
publish_unit_and_verify_groups_in_LMS
(
courseware_page
,
[
u'Group A'
,
u'Group B'
,
u'Group ID 2 (inactive)'
])
self
.
publish_unit_and_verify_groups_in_lms
(
courseware_page
,
[
u'Group A'
,
u'Group B'
,
u'Group ID 2 (inactive)'
],
publish
=
False
)
self
.
browser
.
close
()
self
.
browser
.
switch_to_window
(
self
.
browser
.
window_handles
[
0
])
...
...
@@ -1088,4 +1093,4 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin):
container
.
delete
(
0
)
# render in LMS again
self
.
publish_unit_and_verify_groups_in_
LMS
(
courseware_page
,
[
u'Group A'
,
u'Group B'
])
self
.
publish_unit_and_verify_groups_in_
lms
(
courseware_page
,
[
u'Group A'
,
u'Group B'
])
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