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
97f70e85
Commit
97f70e85
authored
Aug 16, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wording to better reflect BDD specs
parent
fc67c2ee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
28 deletions
+34
-28
lms/djangoapps/courseware/features/help.feature
+6
-16
lms/djangoapps/courseware/features/help.py
+28
-12
No files found.
lms/djangoapps/courseware/features/help.feature
View file @
97f70e85
...
@@ -6,23 +6,13 @@ Feature: The help module should work
...
@@ -6,23 +6,13 @@ Feature: The help module should work
Scenario
:
I
can submit a problem when I am not logged in
Scenario
:
I
can submit a problem when I am not logged in
Given
I visit the homepage
Given
I visit the homepage
When
I
click the help modal
When
I
open the help form
And
I report a
"problem"
And
I report a
"problem"
And
I fill
"name"
with
"Robot"
Then
I should see confirmation that the problem was received
And
I fill
"email"
with
"Robot@edx.org"
And
I fill
"subject"
with
"Test Issue"
And
I fill
"details"
with
"I am having a problem"
And
I submit the issue
Then
The submit button should be disabled
Scenario
:
I
can submit a problem when I am logged in
Scenario
:
I
can submit a problem when I am logged in
Given
I am registered for the course
"6.002x"
Given
I am in a course
And
I am logged in
When
I open the help form
And
I click on View Courseware
And
I report a
"problem"
without saying who I am
When
I click the help modal
Then
I should see confirmation that the problem was received
And
I report a
"problem"
And
I fill
"subject"
with
"Test Issue"
And
I fill
"details"
with
"I am having a problem"
And
I submit the issue
Then
The submit button should be disabled
lms/djangoapps/courseware/features/help.py
View file @
97f70e85
...
@@ -3,31 +3,47 @@
...
@@ -3,31 +3,47 @@
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
@step
(
u'I
click the help modal
'
)
@step
(
u'I
open the help form
'
)
def
open_help_modal
(
step
):
def
open_help_modal
(
step
):
help_css
=
'div.help-tab'
help_css
=
'div.help-tab'
world
.
css_click
(
help_css
)
world
.
css_click
(
help_css
)
@step
(
u'I report a "([^"]*)"$'
)
@step
(
u'I report a "([^"]*)"$'
)
def
s
elec
t_problem_type
(
step
,
submission_type
):
def
s
ubmi
t_problem_type
(
step
,
submission_type
):
type_css
=
'#feedback_link_{}'
.
format
(
submission_type
)
type_css
=
'#feedback_link_{}'
.
format
(
submission_type
)
world
.
css_click
(
type_css
)
world
.
css_click
(
type_css
)
fill_field
(
'name'
,
'Robot'
)
fill_field
(
'email'
,
'robot@edx.org'
)
fill_field
(
'subject'
,
'Test Issue'
)
fill_field
(
'details'
,
'I am having a problem'
)
submit_css
=
'div.submit'
world
.
css_click
(
submit_css
)
@step
(
u'I fill "([^"]*)" with "([^"]*)"$'
)
@step
(
u'I report a "([^"]*)" without saying who I am$'
)
def
fill_field
(
step
,
name
,
info
):
def
submit_partial_problem_type
(
step
,
submission_type
):
form_css
=
'form.feedback_form'
type_css
=
'#feedback_link_{}'
.
format
(
submission_type
)
form
=
world
.
css_find
(
form_css
)
world
.
css_click
(
type_css
)
form
.
find_by_name
(
name
)
.
fill
(
info
)
fill_field
(
'subject'
,
'Test Issue'
)
fill_field
(
'details'
,
'I am having a problem'
)
@step
(
u'I submit the issue'
)
def
submit_issue
(
step
):
submit_css
=
'div.submit'
submit_css
=
'div.submit'
world
.
css_click
(
submit_css
)
world
.
css_click
(
submit_css
)
@step
(
u'
The submit button should be disabl
ed'
)
@step
(
u'
I should see confirmation that the problem was receiv
ed'
)
def
see_confirmation
(
step
):
def
see_confirmation
(
step
):
assert
world
.
browser
.
evaluate_script
(
"$('input[value=
\"
Submit
\"
]').attr('disabled')"
)
==
'disabled'
assert
world
.
browser
.
evaluate_script
(
"$('input[value=
\"
Submit
\"
]').attr('disabled')"
)
==
'disabled'
@step
(
u'I am in a course'
)
def
go_into_course
(
step
):
step
.
given
(
'I am registered for the course "6.002x"'
)
step
.
given
(
'And I am logged in'
)
step
.
given
(
'And I click on View Courseware'
)
def
fill_field
(
name
,
info
):
form_css
=
'form.feedback_form'
form
=
world
.
css_find
(
form_css
)
form
.
find_by_name
(
name
)
.
fill
(
info
)
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