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
fa319539
Commit
fa319539
authored
Apr 05, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests for GMT, get Advanced Settings test to pass reliably.
parent
2ad3fce2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
11 deletions
+15
-11
cms/djangoapps/contentstore/features/advanced-settings.feature
+1
-2
cms/djangoapps/contentstore/features/advanced-settings.py
+6
-1
cms/djangoapps/contentstore/features/course-settings.py
+2
-2
cms/djangoapps/contentstore/features/section.py
+2
-2
cms/djangoapps/contentstore/features/subsection.py
+4
-4
No files found.
cms/djangoapps/contentstore/features/advanced-settings.feature
View file @
fa319539
...
...
@@ -21,8 +21,7 @@ Feature: Advanced (manual) course policy
Scenario
:
Test editing key value
Given
I am on the Advanced Course Settings page in Studio
When
I edit the value of a policy key
And
I press the
"Save"
notification button
When
I edit the value of a policy key and save
Then
the policy key value is changed
And
I reload the page
Then
the policy key value is changed
...
...
cms/djangoapps/contentstore/features/advanced-settings.py
View file @
fa319539
...
...
@@ -51,6 +51,11 @@ def edit_the_value_of_a_policy_key(step):
e
.
_element
.
send_keys
(
Keys
.
TAB
,
Keys
.
END
,
Keys
.
ARROW_LEFT
,
' '
,
'X'
)
@step
(
u'I edit the value of a policy key and save$'
)
def
edit_the_value_of_a_policy_key
(
step
):
change_display_name_value
(
step
,
'"foo"'
)
@step
(
'I create a JSON object as a value$'
)
def
create_JSON_object
(
step
):
change_display_name_value
(
step
,
'{"key": "value", "key_2": "value_2"}'
)
...
...
@@ -96,7 +101,7 @@ def the_policy_key_value_is_unchanged(step):
@step
(
u'the policy key value is changed$'
)
def
the_policy_key_value_is_changed
(
step
):
assert_equal
(
get_display_name_value
(),
'"
Robot Super Course X
"'
)
assert_equal
(
get_display_name_value
(),
'"
foo
"'
)
############# HELPERS ###############
...
...
cms/djangoapps/contentstore/features/course-settings.py
View file @
fa319539
...
...
@@ -18,8 +18,8 @@ COURSE_END_TIME_CSS = "#course-end-time"
ENROLLMENT_START_TIME_CSS
=
"#course-enrollment-start-time"
ENROLLMENT_END_TIME_CSS
=
"#course-enrollment-end-time"
DUMMY_TIME
=
"
3:30pm
"
DEFAULT_TIME
=
"
12:00am
"
DUMMY_TIME
=
"
15:30
"
DEFAULT_TIME
=
"
00:00
"
############### ACTIONS ####################
...
...
cms/djangoapps/contentstore/features/section.py
View file @
fa319539
...
...
@@ -38,7 +38,7 @@ def i_click_the_edit_link_for_the_release_date(step):
@step
(
'I save a new section release date$'
)
def
i_save_a_new_section_release_date
(
step
):
set_date_and_time
(
'input.start-date.date.hasDatepicker'
,
'12/25/2013'
,
'input.start-time.time.ui-timepicker-input'
,
'
12:00am
'
)
'input.start-time.time.ui-timepicker-input'
,
'
00:00
'
)
world
.
browser
.
click_link_by_text
(
'Save'
)
...
...
@@ -105,7 +105,7 @@ def the_section_release_date_picker_not_visible(step):
def
the_section_release_date_is_updated
(
step
):
css
=
'span.published-status'
status_text
=
world
.
css_text
(
css
)
assert_equal
(
status_text
,
'Will Release: 12/25/2013 at
12:00am
'
)
assert_equal
(
status_text
,
'Will Release: 12/25/2013 at
00:00 UTC
'
)
############ HELPER METHODS ###################
...
...
cms/djangoapps/contentstore/features/subsection.py
View file @
fa319539
...
...
@@ -57,18 +57,18 @@ def i_see_complete_subsection_name_with_quote_in_editor(step):
@step
(
'I have set a release date and due date in different years$'
)
def
test_have_set_dates_in_different_years
(
step
):
set_date_and_time
(
'input#start_date'
,
'12/25/2011'
,
'input#start_time'
,
'
3:00am
'
)
set_date_and_time
(
'input#start_date'
,
'12/25/2011'
,
'input#start_time'
,
'
03:00
'
)
world
.
css_click
(
'.set-date'
)
# Use a year in the past so that current year will always be different.
set_date_and_time
(
'input#due_date'
,
'01/02/2012'
,
'input#due_time'
,
'
4:00am
'
)
set_date_and_time
(
'input#due_date'
,
'01/02/2012'
,
'input#due_time'
,
'
04:00
'
)
@step
(
'I see the correct dates$'
)
def
i_see_the_correct_dates
(
step
):
assert_equal
(
'12/25/2011'
,
world
.
css_find
(
'input#start_date'
)
.
first
.
value
)
assert_equal
(
'
3:00am
'
,
world
.
css_find
(
'input#start_time'
)
.
first
.
value
)
assert_equal
(
'
03:00
'
,
world
.
css_find
(
'input#start_time'
)
.
first
.
value
)
assert_equal
(
'01/02/2012'
,
world
.
css_find
(
'input#due_date'
)
.
first
.
value
)
assert_equal
(
'
4:00am
'
,
world
.
css_find
(
'input#due_time'
)
.
first
.
value
)
assert_equal
(
'
04:00
'
,
world
.
css_find
(
'input#due_time'
)
.
first
.
value
)
@step
(
'I mark it as Homework$'
)
...
...
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