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
27d5ebf0
Commit
27d5ebf0
authored
Mar 22, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8 fixes
parent
00d25b68
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
39 additions
and
24 deletions
+39
-24
cms/djangoapps/contentstore/features/advanced-settings.feature
+4
-4
cms/djangoapps/contentstore/features/advanced-settings.py
+1
-0
cms/djangoapps/contentstore/features/common.py
+1
-0
cms/djangoapps/contentstore/features/courses.feature
+1
-2
cms/djangoapps/contentstore/features/courses.py
+1
-0
cms/djangoapps/contentstore/features/section.py
+1
-1
cms/djangoapps/contentstore/features/signup.py
+1
-0
cms/djangoapps/contentstore/features/studio-overview-togglesection.feature
+14
-14
cms/djangoapps/contentstore/features/subsection.py
+1
-0
common/djangoapps/terrain/course_helpers.py
+1
-0
common/djangoapps/terrain/steps.py
+3
-0
common/djangoapps/terrain/ui_helpers.py
+9
-2
lms/djangoapps/courseware/features/high-level-tabs.feature
+1
-1
No files found.
cms/djangoapps/contentstore/features/advanced-settings.feature
View file @
27d5ebf0
Feature
:
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
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
...
...
@@ -27,16 +27,16 @@ Feature: Advanced (manual) course policy
And
I reload the page
Then
the policy key value is changed
Scenario
:
Test how multi-line input appears
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
Then
it is displayed as formatted
And
I reload the page
Then
it is displayed as formatted
Scenario
:
Test automatic quoting of non-JSON values
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
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
cms/djangoapps/contentstore/features/advanced-settings.py
View file @
27d5ebf0
...
...
@@ -16,6 +16,7 @@ DISPLAY_NAME_KEY = "display_name"
DISPLAY_NAME_VALUE
=
'"Robot Super Course"'
############### ACTIONS ####################
@step
(
'I select the Advanced Settings$'
)
def
i_select_advanced_settings
(
step
):
expand_icon_css
=
'li.nav-course-settings i.icon-expand'
...
...
cms/djangoapps/contentstore/features/common.py
View file @
27d5ebf0
...
...
@@ -10,6 +10,7 @@ from logging import getLogger
logger
=
getLogger
(
__name__
)
########### STEP HELPERS ##############
@step
(
'I (?:visit|access|open) the Studio homepage$'
)
def
i_visit_the_studio_homepage
(
step
):
# To make this go to port 8001, put
...
...
cms/djangoapps/contentstore/features/courses.feature
View file @
27d5ebf0
...
...
@@ -10,4 +10,4 @@ Feature: Create Course
And
I fill in the new course information
And
I press the
"Save"
button
Then
the Courseware page has loaded in Studio
And
I see a link for adding a new section
\ No newline at end of file
And
I see a link for adding a new section
cms/djangoapps/contentstore/features/courses.py
View file @
27d5ebf0
...
...
@@ -43,6 +43,7 @@ def i_see_the_course_in_my_courses(step):
course_css
=
'span.class-name'
assert
world
.
css_has_text
(
course_css
,
'Robot Super Course'
)
@step
(
'the course is loaded$'
)
def
course_is_loaded
(
step
):
class_css
=
'a.class-name'
...
...
cms/djangoapps/contentstore/features/section.py
View file @
27d5ebf0
...
...
@@ -112,7 +112,7 @@ def the_section_release_date_picker_not_visible(step):
def
the_section_release_date_is_updated
(
step
):
css
=
'span.published-status'
status_text
=
world
.
css_text
(
css
)
assert_equal
(
status_text
,
'Will Release: 12/25/2013 at 12:00am'
)
assert_equal
(
status_text
,
'Will Release: 12/25/2013 at 12:00am'
)
############ HELPER METHODS ###################
...
...
cms/djangoapps/contentstore/features/signup.py
View file @
27d5ebf0
...
...
@@ -20,6 +20,7 @@ def i_press_the_button_on_the_registration_form(step):
e
=
world
.
css_find
(
submit_css
)
e
.
type
(
' '
)
@step
(
'I should see be on the studio home page$'
)
def
i_should_see_be_on_the_studio_home_page
(
step
):
assert
world
.
browser
.
find_by_css
(
'div.inner-wrapper'
)
...
...
cms/djangoapps/contentstore/features/studio-overview-togglesection.feature
View file @
27d5ebf0
Feature
:
Overview Toggle Section
In order to quickly view the details of a course's section or to scan the inventory of sections
As a course author
I want to toggle the visibility of each section's subsection details in the overview listing
As a course author
I want to toggle the visibility of each section's subsection details in the overview listing
Scenario
:
The default layout for the overview page is to show sections in expanded view
Given
I have a course with multiple sections
When
I navigate to the course overview page
Then
I see the
"Collapse All Sections"
link
And
all sections are expanded
When
I navigate to the course overview page
Then
I see the
"Collapse All Sections"
link
And
all sections are expanded
Scenario
:
Expand/collapse for a course with no sections
Scenario
:
Expand
/collapse for a course with no sections
Given
I have a course with no sections
When
I navigate to the course overview page
Then
I do not see the
"Collapse All Sections"
link
When
I navigate to the course overview page
Then
I do not see the
"Collapse All Sections"
link
Scenario
:
Collapse link appears after creating first section of a course
Given
I have a course with no sections
When
I navigate to the course overview page
And
I add a section
Then
I see the
"Collapse All Sections"
link
And
all sections are expanded
When
I navigate to the course overview page
And
I add a section
Then
I see the
"Collapse All Sections"
link
And
all sections are expanded
@skip-phantom
@skip
-phantom
Scenario
:
Collapse link is not removed after last section of a course is deleted
Given
I have a course with 1 section
And
I navigate to the course overview page
And
I navigate to the course overview page
When
I press the
"section"
delete icon
And
I confirm the alert
Then
I see the
"Collapse All Sections"
link
...
...
cms/djangoapps/contentstore/features/subsection.py
View file @
27d5ebf0
...
...
@@ -72,6 +72,7 @@ def save_subsection_name(name):
world
.
css_fill
(
name_css
,
name
)
world
.
css_click
(
save_css
)
def
see_subsection_name
(
name
):
css
=
'span.subsection-name'
assert
world
.
is_css_present
(
css
)
...
...
common/djangoapps/terrain/course_helpers.py
View file @
27d5ebf0
...
...
@@ -122,6 +122,7 @@ def save_the_course_content(path='/tmp'):
f
.
write
(
output
)
f
.
close
@world.absorb
def
clear_courses
():
# Flush and initialize the module store
...
...
common/djangoapps/terrain/steps.py
View file @
27d5ebf0
...
...
@@ -29,11 +29,13 @@ def i_visit_the_homepage(step):
world
.
visit
(
'/'
)
assert
world
.
is_css_present
(
'header.global'
)
@step
(
u'I (?:visit|access|open) the dashboard$'
)
def
i_visit_the_dashboard
(
step
):
world
.
visit
(
'/dashboard'
)
assert
world
.
is_css_present
(
'section.container.dashboard'
)
@step
(
'I should be on the dashboard page$'
)
def
i_should_be_on_the_dashboard
(
step
):
assert
world
.
is_css_present
(
'section.container.dashboard'
)
...
...
@@ -97,6 +99,7 @@ def i_am_staff_for_course_by_id(step, course_id):
def
click_the_link_called
(
step
,
text
):
world
.
click_link
(
text
)
@step
(
r'should see that the url is "([^"]*)"$'
)
def
should_have_the_url
(
step
,
url
):
assert_equals
(
world
.
browser
.
url
,
url
)
...
...
common/djangoapps/terrain/ui_helpers.py
View file @
27d5ebf0
...
...
@@ -12,10 +12,12 @@ from lettuce.django import django_url
def
wait
(
seconds
):
time
.
sleep
(
float
(
seconds
))
@world.absorb
def
wait_for
(
func
):
WebDriverWait
(
world
.
browser
.
driver
,
5
)
.
until
(
func
)
@world.absorb
def
visit
(
url
):
world
.
browser
.
visit
(
django_url
(
url
))
...
...
@@ -30,23 +32,26 @@ def url_equals(url):
def
is_css_present
(
css_selector
):
return
world
.
browser
.
is_element_present_by_css
(
css_selector
,
wait_time
=
4
)
@world.absorb
def
css_has_text
(
css_selector
,
text
):
return
world
.
css_text
(
css_selector
)
==
text
@world.absorb
def
css_find
(
css
):
def
is_visible
(
driver
):
return
EC
.
visibility_of_element_located
((
By
.
CSS_SELECTOR
,
css
,))
return
EC
.
visibility_of_element_located
((
By
.
CSS_SELECTOR
,
css
,))
world
.
browser
.
is_element_present_by_css
(
css
,
5
)
wait_for
(
is_visible
)
return
world
.
browser
.
find_by_css
(
css
)
@world.absorb
def
css_click
(
css_selector
):
'''
First try to use the regular click method,
First try to use the regular click method,
but if clicking in the middle of an element
doesn't work it might be that it thinks some other
element is on top of it there so click in the upper left
...
...
@@ -61,6 +66,7 @@ def css_click(css_selector):
time
.
sleep
(
1
)
world
.
browser
.
find_by_css
(
css_selector
)
.
click
()
@world.absorb
def
css_click_at
(
css
,
x
=
10
,
y
=
10
):
'''
...
...
@@ -72,6 +78,7 @@ def css_click_at(css, x=10, y=10):
e
.
action_chains
.
click
()
e
.
action_chains
.
perform
()
@world.absorb
def
css_fill
(
css_selector
,
text
):
world
.
browser
.
find_by_css
(
css_selector
)
.
first
.
fill
(
text
)
...
...
lms/djangoapps/courseware/features/high-level-tabs.feature
View file @
27d5ebf0
...
...
@@ -3,7 +3,7 @@ Feature: All the high level tabs should work
As a student
I want to navigate through the high level tabs
Scenario
:
I
can navigate to all high -level tabs in a course
Scenario
:
I
can navigate to all high -
level tabs in a course
Given
:
I
am registered for the course
"6.002x"
And
The course
"6.002x"
has extra tab
"Custom Tab"
And
I am logged in
...
...
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