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
7635a96d
Commit
7635a96d
authored
May 13, 2016
by
Muddasser Hussain
Committed by
Muddasser
May 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advanced_settins.feature conversion to lettuce
parent
7bca66c2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
80 deletions
+27
-80
cms/djangoapps/contentstore/features/advanced_settings.feature
+0
-80
common/test/acceptance/pages/studio/settings_advanced.py
+27
-0
common/test/acceptance/tests/studio/test_studio_settings.py
+0
-0
No files found.
cms/djangoapps/contentstore/features/advanced_settings.feature
deleted
100644 → 0
View file @
7bca66c2
@shard_1
Feature
:
CMS.Advanced (manual) course policy
In order to specify course policy settings for which no custom user interface exists
I want to be able to manually enter JSON key /value pairs
Scenario
:
A
course author sees default advanced settings
Given
I have opened a new course in Studio
When
I select the Advanced Settings
Then
I see default advanced settings
Scenario
:
Add new entries, and they appear alphabetically after save
Given
I am on the Advanced Course Settings page in Studio
Then
the settings are alphabetized
# Sauce labs does not play nicely with CodeMirror
@skip_sauce
Scenario
:
Test cancel 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
"Cancel"
notification button
Then
the policy key value is unchanged
And
I reload the page
Then
the policy key value is unchanged
# Sauce labs does not play nicely with CodeMirror
@skip_sauce
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 save
Then
the policy key value is changed
And
I reload the page
Then
the policy key value is changed
# Sauce labs does not play nicely with CodeMirror
@skip_sauce
Scenario
:
Test how multi-line input appears
Given
I am on the Advanced Course Settings page in Studio
When
I create a JSON object as a value for
"Discussion Topic Mapping"
Then
it is displayed as formatted
And
I reload the page
Then
it is displayed as formatted
# Sauce labs does not play nicely with CodeMirror
@skip_sauce
Scenario
:
Test error if value supplied is of the wrong type
Given
I am on the Advanced Course Settings page in Studio
When
I create a JSON object as a value for
"Course Display Name"
Then
I get an error on save
And
I reload the page
Then
the policy key value is unchanged
# This feature will work in Firefox only when Firefox is the active window
# Sauce labs does not play nicely with CodeMirror
@skip_sauce
Scenario
:
Test automatic quoting of non-JSON values
Given
I am on the Advanced Course Settings page in Studio
When
I create a non-JSON value not in quotes
Then
it is displayed as a string
And
I reload the page
Then
it is displayed as a string
# Sauce labs does not play nicely with CodeMirror
@skip_sauce
Scenario
:
Confirmation is shown on save
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
Then
I see a confirmation that my changes have been saved
Scenario
:
Deprecated Settings are not shown by default
Given
I am on the Advanced Course Settings page in Studio
Then
deprecated settings are not shown
Scenario
:
Deprecated Settings can be toggled
Given
I am on the Advanced Course Settings page in Studio
When
I toggle the display of deprecated settings
Then
deprecated settings are then shown
And
I toggle the display of deprecated settings
Then
deprecated settings are not shown
common/test/acceptance/pages/studio/settings_advanced.py
View file @
7635a96d
...
...
@@ -107,6 +107,13 @@ class AdvancedSettingsPage(CoursePage):
return
-
1
def
get_index_of
(
self
,
key
):
"""
Returns the index of a setting passed as key.
Returns -1 when key is not found.
"""
return
self
.
_get_index_of
(
key
)
def
save
(
self
):
press_the_notification_button
(
self
,
"Save"
)
...
...
@@ -118,6 +125,19 @@ class AdvancedSettingsPage(CoursePage):
type_in_codemirror
(
self
,
index
,
new_value
)
self
.
save
()
def
set_value_without_saving
(
self
,
key
,
new_value
):
"""
Set value without saving it.
"""
index
=
self
.
_get_index_of
(
key
)
type_in_codemirror
(
self
,
index
,
new_value
)
def
click_toggle_button
(
self
):
"""
Click toggle button with css class deprecated-settings-label.
"""
self
.
q
(
css
=
'.deprecated-settings-label'
)
.
click
()
def
get
(
self
,
key
):
index
=
self
.
_get_index_of
(
key
)
return
get_codemirror_value
(
self
,
index
)
...
...
@@ -222,3 +242,10 @@ class AdvancedSettingsPage(CoursePage):
'learning_info'
,
'instructor_info'
]
def
get_all_displayed_settings
(
self
):
"""
Get names of all displayed settings.
"""
query
=
self
.
q
(
css
=
SETTINGS_NAME_SELECTOR
)
return
query
.
text
common/test/acceptance/tests/studio/test_studio_settings.py
View file @
7635a96d
This diff is collapsed.
Click to expand it.
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