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
57f8bbf6
Commit
57f8bbf6
authored
May 31, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to Selenium test based on feedback.
parent
ab5834fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
24 deletions
+20
-24
cms/djangoapps/contentstore/features/problem-editor.feature
+5
-5
cms/djangoapps/contentstore/features/problem-editor.py
+15
-19
No files found.
cms/djangoapps/contentstore/features/problem-editor.feature
View file @
57f8bbf6
...
...
@@ -35,29 +35,29 @@ Feature: Problem Editor
Scenario
:
User can modify float input values
Given
I have created a Blank Common Problem
And
I edit and select Settings
Then
I can set the weight to
3.5
Then
I can set the weight to
"3.5"
And
my change to weight is persisted
And
I can revert to the default value of unset for weight
Scenario
:
User cannot type letters in float number field
Given
I have created a Blank Common Problem
And
I edit and select Settings
Then
if I set the weight to
abc
, it remains unset
Then
if I set the weight to
"abc"
, it remains unset
Scenario
:
User cannot type decimal values integer number field
Given
I have created a Blank Common Problem
And
I edit and select Settings
Then
if I set the max attempts to
2.34, the max attempts are persisted as 234
Then
if I set the max attempts to
"2.34"
, it displays initially as
"234"
, and is persisted as
"234"
Scenario
:
User cannot type out of range values in an integer number field
Given
I have created a Blank Common Problem
And
I edit and select Settings
Then
if I set the max attempts to
-3, the max attempts are persisted as 1
Then
if I set the max attempts to
"-3"
, it displays initially as
"-3"
, and is persisted as
"1"
Scenario
:
Settings changes are not saved on Cancel
Given
I have created a Blank Common Problem
And
I edit and select Settings
Then
I can set the weight to
3.5
Then
I can set the weight to
"3.5"
And
I can modify the display name
Then
If I press Cancel my changes are not persisted
...
...
cms/djangoapps/contentstore/features/problem-editor.py
View file @
57f8bbf6
...
...
@@ -94,9 +94,9 @@ def i_can_revert_to_default_for_randomization(step):
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
RANDOMIZATION
),
RANDOMIZATION
,
"Always"
,
False
)
@step
(
'I can set the weight to
3.5
'
)
def
i_can_set_weight
_to_3_5
(
step
):
world
.
get_setting_entry
(
PROBLEM_WEIGHT
)
.
find_by_css
(
'.setting-input'
)[
0
]
.
fill
(
'3.5'
)
@step
(
'I can set the weight to
"(.*)"?
'
)
def
i_can_set_weight
(
step
,
weight
):
set_weight
(
weight
)
verify_modified_weight
()
...
...
@@ -113,9 +113,9 @@ def i_can_revert_to_default_for_unset_weight(step):
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
PROBLEM_WEIGHT
),
PROBLEM_WEIGHT
,
""
,
False
)
@step
(
'if I set the weight to
abc
, it remains unset'
)
def
set_the_weight_to_abc
(
step
):
world
.
get_setting_entry
(
PROBLEM_WEIGHT
)
.
find_by_css
(
'.setting-input'
)[
0
]
.
fill
(
'abc'
)
@step
(
'if I set the weight to
"(.*)"
, it remains unset'
)
def
set_the_weight_to_abc
(
step
,
bad_weight
):
set_weight
(
bad_weight
)
# We show the clear button immediately on type, hence the "True" here.
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
PROBLEM_WEIGHT
),
PROBLEM_WEIGHT
,
""
,
True
)
world
.
save_component_and_reopen
(
step
)
...
...
@@ -123,20 +123,12 @@ def set_the_weight_to_abc(step):
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
PROBLEM_WEIGHT
),
PROBLEM_WEIGHT
,
""
,
False
)
@step
(
'if I set the max attempts to
2.34, the max attempts are persisted as 234
'
)
def
set_the_max_attempts
_234
(
step
):
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
)
.
find_by_css
(
'.setting-input'
)[
0
]
.
fill
(
'2.34'
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
"234"
,
True
)
@step
(
'if I set the max attempts to
"(.*)", it displays initially as "(.*)", and is persisted as "(.*)"
'
)
def
set_the_max_attempts
(
step
,
max_attempts_set
,
max_attempts_displayed
,
max_attempts_persisted
):
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
)
.
find_by_css
(
'.setting-input'
)[
0
]
.
fill
(
max_attempts_set
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
max_attempts_displayed
,
True
)
world
.
save_component_and_reopen
(
step
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
"234"
,
True
)
@step
(
'I set the max attempts to -3, the max attempts are persisted as 1'
)
def
set_max_attempts_to_neg_3
(
step
):
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
)
.
find_by_css
(
'.setting-input'
)[
0
]
.
fill
(
'-3'
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
"-3"
,
True
)
world
.
save_component_and_reopen
(
step
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
"1"
,
True
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
max_attempts_persisted
,
True
)
@step
(
'Edit High Level Source is not visible'
)
...
...
@@ -189,3 +181,7 @@ def verify_modified_display_name_with_special_chars():
def
verify_unset_display_name
():
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
DISPLAY_NAME
),
DISPLAY_NAME
,
''
,
False
)
def
set_weight
(
weight
):
world
.
get_setting_entry
(
PROBLEM_WEIGHT
)
.
find_by_css
(
'.setting-input'
)[
0
]
.
fill
(
weight
)
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