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
04be309e
Commit
04be309e
authored
Aug 04, 2014
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup from rebase.
parent
36afbfbd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
21 deletions
+17
-21
cms/djangoapps/contentstore/views/tests/test_course_index.py
+9
-13
cms/static/js/views/group_configuration_item.js
+5
-5
common/test/acceptance/pages/studio/overview.py
+2
-2
common/test/acceptance/tests/test_studio_container.py
+1
-1
No files found.
cms/djangoapps/contentstore/views/tests/test_course_index.py
View file @
04be309e
...
...
@@ -11,7 +11,6 @@ from contentstore.views.course import course_outline_initial_state
from
contentstore.views.item
import
create_xblock_info
,
VisibilityState
from
course_action_state.models
import
CourseRerunState
from
contentstore.views.item
import
create_xblock_info
from
contentstore.views.item
import
create_xblock_info
,
PublishState
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
opaque_keys.edx.locator
import
CourseLocator
...
...
@@ -107,19 +106,19 @@ class TestCourseIndex(CourseTestCase):
self
.
assertEqual
(
json_response
[
'category'
],
'course'
)
self
.
assertEqual
(
json_response
[
'id'
],
'i4x://MITx/999/course/Robot_Super_Course'
)
self
.
assertEqual
(
json_response
[
'display_name'
],
'Robot Super Course'
)
self
.
assertTrue
(
json_response
[
'
is_container
'
])
self
.
assert
False
(
json_response
[
'is_draft
'
])
self
.
assertTrue
(
json_response
[
'
published
'
])
self
.
assert
IsNone
(
json_response
[
'visibility_state
'
])
# Now verify the first child
children
=
json_response
[
'children'
]
children
=
json_response
[
'child
_info'
][
'child
ren'
]
self
.
assertTrue
(
len
(
children
)
>
0
)
first_child_response
=
children
[
0
]
self
.
assertEqual
(
first_child_response
[
'category'
],
'chapter'
)
self
.
assertEqual
(
first_child_response
[
'id'
],
'i4x://MITx/999/chapter/Week_1'
)
self
.
assertEqual
(
first_child_response
[
'display_name'
],
'Week 1'
)
self
.
assertTrue
(
first_child_response
[
'is_container
'
])
self
.
assert
False
(
first_child_response
[
'is_draft'
]
)
self
.
assertTrue
(
len
(
first_child_response
[
'children'
])
>
0
)
self
.
assertTrue
(
json_response
[
'published
'
])
self
.
assert
Equal
(
first_child_response
[
'visibility_state'
],
VisibilityState
.
unscheduled
)
self
.
assertTrue
(
len
(
first_child_response
[
'child
_info'
][
'child
ren'
])
>
0
)
# Finally, validate the entire response for consistency
self
.
assert_correct_json_response
(
json_response
)
...
...
@@ -188,13 +187,10 @@ class TestCourseIndex(CourseTestCase):
self
.
assertIsNotNone
(
json_response
[
'display_name'
])
self
.
assertIsNotNone
(
json_response
[
'id'
])
self
.
assertIsNotNone
(
json_response
[
'category'
])
self
.
assertIsNotNone
(
json_response
[
'is_draft'
])
self
.
assertIsNotNone
(
json_response
[
'is_container'
])
if
json_response
[
'is_container'
]:
for
child_response
in
json_response
[
'children'
]:
self
.
assertTrue
(
json_response
[
'published'
])
if
json_response
.
get
(
'child_info'
,
None
):
for
child_response
in
json_response
[
'child_info'
][
'children'
]:
self
.
assert_correct_json_response
(
child_response
)
else
:
self
.
assertFalse
(
'children'
in
json_response
)
class
TestCourseOutline
(
CourseTestCase
):
...
...
cms/static/js/views/group_configuration_item.js
View file @
04be309e
define
([
'js/views/baseview'
,
'jquery'
,
'js/views/group_configuration_details'
,
'js/views/group_configuration_edit'
'js/views/baseview'
,
'jquery'
,
"gettext"
,
'js/views/group_configuration_details'
,
'js/views/group_configuration_edit'
,
"js/views/utils/view_utils"
],
function
(
BaseView
,
$
,
GroupConfigurationDetails
,
GroupConfigurationEdit
BaseView
,
$
,
gettext
,
GroupConfigurationDetails
,
GroupConfigurationEdit
,
ViewUtils
)
{
'use strict'
;
var
GroupConfigurationsItem
=
BaseView
.
extend
({
...
...
@@ -35,12 +35,12 @@ define([
deleteConfiguration
:
function
(
event
)
{
if
(
event
&&
event
.
preventDefault
)
{
event
.
preventDefault
();
}
var
self
=
this
;
thi
s
.
confirmThenRunOperation
(
ViewUtil
s
.
confirmThenRunOperation
(
gettext
(
'Delete this Group Configuration?'
),
gettext
(
'Deleting this Group Configuration is permanent and cannot be undone.'
),
gettext
(
'Delete'
),
function
()
{
return
self
.
runOperationShowingMessage
(
return
ViewUtils
.
runOperationShowingMessage
(
gettext
(
'Deleting'
)
+
'…'
,
function
()
{
return
self
.
model
.
destroy
({
wait
:
true
});
...
...
common/test/acceptance/pages/studio/overview.py
View file @
04be309e
...
...
@@ -11,7 +11,7 @@ from selenium.webdriver.common.keys import Keys
from
.course_page
import
CoursePage
from
.container
import
ContainerPage
from
.utils
import
set_input_value_and_save
,
click_css
,
confirm_prompt
,
set_input_value
from
.utils
import
set_input_value_and_save
,
click_css
,
confirm_prompt
class
CourseOutlineItem
(
object
):
...
...
@@ -82,7 +82,7 @@ class CourseOutlineItem(object):
"""
Enters new_name as the item's display name.
"""
set_input_value
(
self
,
self
.
_bounded_selector
(
self
.
NAME_INPUT_SELECTOR
),
new_name
)
set_input_value
_and_save
(
self
,
self
.
_bounded_selector
(
self
.
NAME_INPUT_SELECTOR
),
new_name
)
def
change_name
(
self
,
new_name
):
"""
...
...
common/test/acceptance/tests/test_studio_container.py
View file @
04be309e
...
...
@@ -16,7 +16,7 @@ from ..pages.lms.staff_view import StaffPage
import
datetime
from
bok_choy.promise
import
Promise
,
EmptyPromise
from
acceptance.tests
.base_studio_test
import
StudioCourseTest
from
.base_studio_test
import
StudioCourseTest
@attr
(
'shard_1'
)
...
...
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