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
bb9d0df0
Commit
bb9d0df0
authored
Aug 08, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed problem-editor scenario to pass in both firefox and chrome
parent
287d219a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
cms/djangoapps/contentstore/features/problem-editor.feature
+2
-4
cms/djangoapps/contentstore/features/problem-editor.py
+6
-4
No files found.
cms/djangoapps/contentstore/features/problem-editor.feature
View file @
bb9d0df0
...
@@ -44,17 +44,15 @@ Feature: Problem Editor
...
@@ -44,17 +44,15 @@ Feature: Problem Editor
When
I edit and select Settings
When
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
# CHROME ONLY, firefox will behave differently, it will display as 2.34 and persist as 2 due to HTML4
Scenario
:
User cannot type decimal values integer number field
Scenario
:
User cannot type decimal values integer number field
Given
I have created a Blank Common Problem
Given
I have created a Blank Common Problem
When
I edit and select Settings
When
I edit and select Settings
Then
if I set the max attempts to
"2.34"
, it
displays initially as
"234"
, and is persisted as
"234"
Then
if I set the max attempts to
"2.34"
, it
will persist as a valid integer
# CHROME ONLY, Firefox will behave differently, it will display as -3 and persist as 3 due to HTML4
Scenario
:
User cannot type out of range values in an integer number field
Scenario
:
User cannot type out of range values in an integer number field
Given
I have created a Blank Common Problem
Given
I have created a Blank Common Problem
When
I edit and select Settings
When
I edit and select Settings
Then
if I set the max attempts to
"-3"
, it
displays initially as
"-3"
, and is persisted as
"0"
Then
if I set the max attempts to
"-3"
, it
will persist as a valid integer
Scenario
:
Settings changes are not saved on Cancel
Scenario
:
Settings changes are not saved on Cancel
Given
I have created a Blank Common Problem
Given
I have created a Blank Common Problem
...
...
cms/djangoapps/contentstore/features/problem-editor.py
View file @
bb9d0df0
...
@@ -133,14 +133,16 @@ def set_the_weight_to_abc(step, bad_weight):
...
@@ -133,14 +133,16 @@ def set_the_weight_to_abc(step, bad_weight):
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
PROBLEM_WEIGHT
),
PROBLEM_WEIGHT
,
""
,
False
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
PROBLEM_WEIGHT
),
PROBLEM_WEIGHT
,
""
,
False
)
@step
(
'if I set the max attempts to "(.*)", it
displays initially as "(.*)", and is persisted as "(.*)"
'
)
@step
(
'if I set the max attempts to "(.*)", it
will persist as a valid integer$
'
)
def
set_the_max_attempts
(
step
,
max_attempts_set
,
max_attempts_displayed
,
max_attempts_persisted
):
def
set_the_max_attempts
(
step
,
max_attempts_set
):
#on firefox with selenium, the behaviour is different. eg 2.34 displays as 2.34 and is persisted as 2
#on firefox with selenium, the behaviour is different. eg 2.34 displays as 2.34 and is persisted as 2
index
=
world
.
get_setting_entry_index
(
MAXIMUM_ATTEMPTS
)
index
=
world
.
get_setting_entry_index
(
MAXIMUM_ATTEMPTS
)
world
.
css_fill
(
'.wrapper-comp-setting .setting-input'
,
max_attempts_set
,
index
=
index
)
world
.
css_fill
(
'.wrapper-comp-setting .setting-input'
,
max_attempts_set
,
index
=
index
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
max_attempts_displayed
,
True
)
if
world
.
is_firefox
():
world
.
trigger_event
(
'.wrapper-comp-setting .setting-input'
,
index
=
index
)
world
.
save_component_and_reopen
(
step
)
world
.
save_component_and_reopen
(
step
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
MAXIMUM_ATTEMPTS
),
MAXIMUM_ATTEMPTS
,
max_attempts_persisted
,
True
)
value
=
int
(
world
.
css_value
(
'input.setting-input'
,
index
=
index
))
assert
value
>=
0
@step
(
'Edit High Level Source is not visible'
)
@step
(
'Edit High Level Source is not visible'
)
...
...
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