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
8d15b74a
Commit
8d15b74a
authored
Jun 06, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed errors in spacing and refactoring out of scenario
parent
c62cc23b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
lms/djangoapps/courseware/features/navigation.feature
+1
-2
lms/djangoapps/courseware/features/navigation.py
+18
-9
No files found.
lms/djangoapps/courseware/features/navigation.feature
View file @
8d15b74a
...
...
@@ -8,7 +8,6 @@ Feature: Navigate Course
When
I click on section
"2"
Then
I should see the content of section
"2"
Scenario
:
I
can navigate to subsections
Given
I am viewing a section with multiple subsections
When
I click on subsection
"2"
...
...
@@ -23,4 +22,4 @@ Feature: Navigate Course
Given
I am viewing a course with multiple sections
When
I click on section
"2"
And
I return later
Then
I should see
"You were most recently in Test Section2"
somewhere on the page
Then
I should see
that I was most recently in section
"2"
lms/djangoapps/courseware/features/navigation.py
View file @
8d15b74a
...
...
@@ -21,19 +21,19 @@ def view_course_multiple_sections(step):
create_course
()
# Add a section to the course to contain problems
section1
=
world
.
ItemFactory
.
create
(
parent_location
=
COURSE_LOC
,
display_name
=
TEST_SECTION_NAME
+
"1"
)
display_name
=
section_name
(
1
)
)
# Add a section to the course to contain problems
section2
=
world
.
ItemFactory
.
create
(
parent_location
=
COURSE_LOC
,
display_name
=
TEST_SECTION_NAME
+
"2"
)
display_name
=
section_name
(
2
)
)
world
.
ItemFactory
.
create
(
parent_location
=
section1
.
location
,
template
=
'i4x://edx/templates/sequential/Empty'
,
display_name
=
TEST_SECTION_NAME
+
"1"
)
display_name
=
section_name
(
1
)
)
world
.
ItemFactory
.
create
(
parent_location
=
section2
.
location
,
template
=
'i4x://edx/templates/sequential/Empty'
,
display_name
=
TEST_SECTION_NAME
+
"2"
)
display_name
=
section_name
(
2
)
)
add_problem_to_course_section
(
'model_course'
,
'multiple choice'
,
section
=
1
)
add_problem_to_course_section
(
'model_course'
,
'drop down'
,
section
=
2
)
...
...
@@ -47,14 +47,14 @@ def view_course_multiple_subsections(step):
# Add a section to the course to contain problems
section1
=
world
.
ItemFactory
.
create
(
parent_location
=
COURSE_LOC
,
display_name
=
TEST_SECTION_NAME
+
"1"
)
display_name
=
section_name
(
1
)
)
world
.
ItemFactory
.
create
(
parent_location
=
section1
.
location
,
template
=
'i4x://edx/templates/sequential/Empty'
,
display_name
=
TEST_SECTION_NAME
+
"1"
)
display_name
=
section_name
(
1
)
)
section2
=
world
.
ItemFactory
.
create
(
parent_location
=
section1
.
location
,
display_name
=
TEST_SECTION_NAME
+
"2"
)
display_name
=
section_name
(
2
)
)
global
SUBSECTION_2_LOC
SUBSECTION_2_LOC
=
section2
.
location
...
...
@@ -70,12 +70,12 @@ def view_course_multiple_sequences(step):
create_course
()
# Add a section to the course to contain problems
section1
=
world
.
ItemFactory
.
create
(
parent_location
=
COURSE_LOC
,
display_name
=
TEST_SECTION_NAME
+
"1"
)
display_name
=
section_name
(
1
)
)
world
.
ItemFactory
.
create
(
parent_location
=
section1
.
location
,
template
=
'i4x://edx/templates/sequential/Empty'
,
display_name
=
TEST_SECTION_NAME
+
"1"
)
display_name
=
section_name
(
1
)
)
add_problem_to_course_section
(
'model_course'
,
'multiple choice'
,
section
=
1
)
add_problem_to_course_section
(
'model_course'
,
'drop down'
,
section
=
1
)
...
...
@@ -125,11 +125,20 @@ def return_to_course(step):
world
.
click_link
(
"View Course"
)
world
.
click_link
(
"Courseware"
)
@step
(
u'I should see that I was most recently in section "([^"]*)"'
)
def
see_recent_section
(
step
,
section
):
step
.
given
(
'I should see "You were most recently in
%
s" somewhere on the page'
%
section_name
(
int
(
section
)))
#####################
# HELPERS
#####################
def
section_name
(
section
):
return
TEST_SECTION_NAME
+
str
(
section
)
def
create_course
():
world
.
clear_courses
()
...
...
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