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
fc67c2ee
Commit
fc67c2ee
authored
Aug 16, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrote preliminary help modal acceptance tests
parent
346fb7b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
lms/djangoapps/courseware/features/help.feature
+28
-0
lms/djangoapps/courseware/features/help.py
+33
-0
lms/envs/acceptance.py
+3
-0
No files found.
lms/djangoapps/courseware/features/help.feature
0 → 100644
View file @
fc67c2ee
Feature
:
The help module should work
In order to get help
As a student
I want to be able to report a problem
Scenario
:
I
can submit a problem when I am not logged in
Given
I visit the homepage
When
I click the help modal
And
I report a
"problem"
And
I fill
"name"
with
"Robot"
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
Given
I am registered for the course
"6.002x"
And
I am logged in
And
I click on View Courseware
When
I click the help modal
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
0 → 100644
View file @
fc67c2ee
#pylint: disable=C0111
#pylint: disable=W0621
from
lettuce
import
world
,
step
@step
(
u'I click the help modal'
)
def
open_help_modal
(
step
):
help_css
=
'div.help-tab'
world
.
css_click
(
help_css
)
@step
(
u'I report a "([^"]*)"$'
)
def
select_problem_type
(
step
,
submission_type
):
type_css
=
'#feedback_link_{}'
.
format
(
submission_type
)
world
.
css_click
(
type_css
)
@step
(
u'I fill "([^"]*)" with "([^"]*)"$'
)
def
fill_field
(
step
,
name
,
info
):
form_css
=
'form.feedback_form'
form
=
world
.
css_find
(
form_css
)
form
.
find_by_name
(
name
)
.
fill
(
info
)
@step
(
u'I submit the issue'
)
def
submit_issue
(
step
):
submit_css
=
'div.submit'
world
.
css_click
(
submit_css
)
@step
(
u'The submit button should be disabled'
)
def
see_confirmation
(
step
):
assert
world
.
browser
.
evaluate_script
(
"$('input[value=
\"
Submit
\"
]').attr('disabled')"
)
==
'disabled'
lms/envs/acceptance.py
View file @
fc67c2ee
...
...
@@ -87,6 +87,9 @@ MITX_FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True
# We do not yet understand why this occurs. Setting this to true is a stopgap measure
USE_I18N
=
True
MITX_FEATURES
[
'ENABLE_FEEDBACK_SUBMISSION'
]
=
True
FEEDBACK_SUBMISSION_EMAIL
=
'dummy@example.com'
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS
+=
(
'lettuce.django'
,)
LETTUCE_APPS
=
(
'courseware'
,)
...
...
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