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
9b986049
Commit
9b986049
authored
Jul 25, 2014
by
Ben McMorran
Committed by
cahrens
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix most bokchoy tests
parent
c433d2b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
cms/static/js/views/xblock_outline.js
+1
-1
common/test/acceptance/pages/studio/overview.py
+4
-4
common/test/acceptance/tests/test_studio_container.py
+16
-14
No files found.
cms/static/js/views/xblock_outline.js
View file @
9b986049
...
...
@@ -202,7 +202,7 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/utils/
}
ViewUtils
.
setScrollOffset
(
locatorElement
,
scrollOffset
);
if
(
editDisplayName
)
{
locatorElement
.
find
(
'>
.wrapper-xblock-header
.xblock-field-value-edit'
).
click
();
locatorElement
.
find
(
'>
div[class$="header"]
.xblock-field-value-edit'
).
click
();
}
}
this
.
initialState
=
null
;
...
...
common/test/acceptance/pages/studio/overview.py
View file @
9b986049
...
...
@@ -14,9 +14,9 @@ class CourseOutlineItem(object):
A mixin class for any :class:`PageObject` shown in a course outline.
"""
BODY_SELECTOR
=
None
EDIT_BUTTON_SELECTOR
=
'.xblock-
title .xblock-
field-value-edit'
EDIT_BUTTON_SELECTOR
=
'.xblock-field-value-edit'
NAME_SELECTOR
=
'.xblock-title .xblock-field-value'
NAME_INPUT_SELECTOR
=
'.xblock-
title .xblock-
field-input'
NAME_INPUT_SELECTOR
=
'.xblock-field-input'
NAME_FIELD_WRAPPER_SELECTOR
=
'.xblock-title .wrapper-xblock-field'
def
__repr__
(
self
):
...
...
@@ -271,7 +271,7 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
"""
url_path
=
"course"
CHILD_CLASS
=
CourseOutlineSection
EXPAND_COLLAPSE_CSS
=
'.
toggle-button
-expand-collapse'
EXPAND_COLLAPSE_CSS
=
'.
button-toggle
-expand-collapse'
BOTTOM_ADD_SECTION_BUTTON
=
'.outline > .add-section .button-new'
def
is_browser_on_page
(
self
):
...
...
@@ -367,7 +367,7 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
"""
Returns true if a message informing the user that the course has no content is visible
"""
return
self
.
q
(
css
=
'.
course-
outline .no-content'
)
.
is_present
()
return
self
.
q
(
css
=
'.outline .no-content'
)
.
is_present
()
@property
def
expand_collapse_link_state
(
self
):
...
...
common/test/acceptance/tests/test_studio_container.py
View file @
9b986049
...
...
@@ -380,9 +380,11 @@ class UnitPublishingTest(ContainerBase):
__test__
=
True
PUBLISHED_STATUS
=
"Publishing Status
\n
Published"
PUBLISHED_LIVE_STATUS
=
"Publishing Status
\n
Published and Live"
DRAFT_STATUS
=
"Publishing Status
\n
Draft (Unpublished changes)"
LOCKED_STATUS
=
"Publishing Status
\n
Unpublished (Staff only)"
RELEASE_TITLE_RELEASED
=
"RELEASED:"
RELEASE_TITLE_RELEASE
=
"RELEASE:"
LAST_PUBLISHED
=
'Last published'
LAST_SAVED
=
'Draft saved on'
...
...
@@ -426,7 +428,7 @@ class UnitPublishingTest(ContainerBase):
Scenario: The publish title changes based on whether or not draft content exists
Given I have a published unit with no unpublished changes
When I go to the unit page in Studio
Then the title in the Publish information box is "Published"
Then the title in the Publish information box is "Published
and Live
"
And the Publish button is disabled
And the last published text contains "Last published"
And the last saved text contains "Last published"
...
...
@@ -435,12 +437,12 @@ class UnitPublishingTest(ContainerBase):
And the last saved text contains "Draft saved on"
And the Publish button is enabled
And when I click the Publish button
Then the title in the Publish information box is "Published"
Then the title in the Publish information box is "Published
and Live
"
And the last published text contains "Last published"
And the last saved text contains "Last published"
"""
unit
=
self
.
go_to_unit_page
()
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_STATUS
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_
LIVE_
STATUS
)
# Start date set in course fixture to 1970.
self
.
_verify_release_date_info
(
unit
,
self
.
RELEASE_TITLE_RELEASED
,
'Jan 01, 1970 at 00:00 UTC with Section "Test Section"'
...
...
@@ -455,7 +457,7 @@ class UnitPublishingTest(ContainerBase):
self
.
_verify_last_published_and_saved
(
unit
,
self
.
LAST_PUBLISHED
,
self
.
LAST_SAVED
)
unit
.
publish_action
.
click
()
unit
.
wait_for_ajax
()
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_STATUS
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_
LIVE_
STATUS
)
self
.
_verify_last_published_and_saved
(
unit
,
self
.
LAST_PUBLISHED
,
self
.
LAST_PUBLISHED
)
def
test_discard_changes
(
self
):
...
...
@@ -468,13 +470,13 @@ class UnitPublishingTest(ContainerBase):
Then the title in the Publish information box is "Draft (Unpublished changes)"
And the Discard Changes button is enabled
And when I click the Discard Changes button
Then the title in the Publish information box is "Published"
Then the title in the Publish information box is "Published
and Live
"
"""
unit
=
self
.
go_to_unit_page
()
add_discussion
(
unit
)
self
.
_verify_publish_title
(
unit
,
self
.
DRAFT_STATUS
)
unit
.
discard_changes
()
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_STATUS
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_
LIVE_
STATUS
)
def
test_view_live_no_changes
(
self
):
"""
...
...
@@ -533,7 +535,7 @@ class UnitPublishingTest(ContainerBase):
Then I see the content in the unit
"""
unit
=
self
.
go_to_unit_page
(
"Unlocked Section"
,
"Unlocked Subsection"
,
"Unlocked Unit"
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_STATUS
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_
LIVE_
STATUS
)
self
.
assertTrue
(
unit
.
currently_visible_to_students
)
self
.
_verify_release_date_info
(
unit
,
self
.
RELEASE_TITLE_RELEASED
,
self
.
past_start_date_text
+
' with Section "Unlocked Section"'
...
...
@@ -570,7 +572,7 @@ class UnitPublishingTest(ContainerBase):
Given I have a published locked unit with release date in the past
When I go to the unit page in Studio
Then the unit does not have a warning that it is visible to students
And it is marked as "RELEASE
D
" with release date in the past visible
And it is marked as "RELEASE" with release date in the past visible
And when I click on the View Live Button
And when I view the course as a student
Then I do not see any content in the unit
...
...
@@ -579,7 +581,7 @@ class UnitPublishingTest(ContainerBase):
self
.
_verify_publish_title
(
unit
,
self
.
LOCKED_STATUS
)
self
.
assertFalse
(
unit
.
currently_visible_to_students
)
self
.
_verify_release_date_info
(
unit
,
self
.
RELEASE_TITLE_RELEASE
D
,
unit
,
self
.
RELEASE_TITLE_RELEASE
,
self
.
past_start_date_text
+
' with Subsection "Subsection With Locked Unit"'
)
self
.
_view_published_version
(
unit
)
...
...
@@ -600,7 +602,7 @@ class UnitPublishingTest(ContainerBase):
unit
=
self
.
go_to_unit_page
(
"Section With Locked Unit"
,
"Subsection With Locked Unit"
,
"Locked Unit"
)
checked
=
unit
.
toggle_staff_lock
()
self
.
assertFalse
(
checked
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_STATUS
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_
LIVE_
STATUS
)
self
.
assertTrue
(
unit
.
currently_visible_to_students
)
self
.
_view_published_version
(
unit
)
# Will initially be in staff view, components always visible.
...
...
@@ -617,7 +619,7 @@ class UnitPublishingTest(ContainerBase):
Then the content changes
And the title in the Publish information box is "Draft (Unpublished changes)"
And when I click the Publish button
Then the title in the Publish information box is "Published"
Then the title in the Publish information box is "Published
and Live
"
And when I click the View Live button
Then I see the changed content in LMS
"""
...
...
@@ -631,7 +633,7 @@ class UnitPublishingTest(ContainerBase):
self
.
_verify_publish_title
(
unit
,
self
.
DRAFT_STATUS
)
unit
.
publish_action
.
click
()
unit
.
wait_for_ajax
()
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_STATUS
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_
LIVE_
STATUS
)
self
.
_view_published_version
(
unit
)
self
.
assertTrue
(
modified_content
in
self
.
courseware
.
xblock_component_html_content
(
0
))
...
...
@@ -643,7 +645,7 @@ class UnitPublishingTest(ContainerBase):
And delete the only component
Then the title in the Publish information box is "Draft (Unpublished changes)"
And when I click the Publish button
Then the title in the Publish information box is "Published"
Then the title in the Publish information box is "Published
and Live
"
And when I click the View Live button
Then I see an empty unit in LMS
"""
...
...
@@ -652,7 +654,7 @@ class UnitPublishingTest(ContainerBase):
self
.
_verify_publish_title
(
unit
,
self
.
DRAFT_STATUS
)
unit
.
publish_action
.
click
()
unit
.
wait_for_ajax
()
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_STATUS
)
self
.
_verify_publish_title
(
unit
,
self
.
PUBLISHED_
LIVE_
STATUS
)
self
.
_view_published_version
(
unit
)
self
.
assertEqual
(
0
,
self
.
courseware
.
num_xblock_components
)
...
...
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