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
a2a1478d
Commit
a2a1478d
authored
Mar 22, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix caching bug on back button.
parent
be4045cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
13 deletions
+37
-13
cms/djangoapps/contentstore/features/checklists.feature
+15
-13
cms/djangoapps/contentstore/features/checklists.py
+10
-0
cms/static/js/models/checklists.js
+7
-0
common/djangoapps/terrain/steps.py
+5
-0
No files found.
cms/djangoapps/contentstore/features/checklists.feature
View file @
a2a1478d
Feature
:
Course checklists
Scenario
:
A
course author sees checklists defined by edX
Given
I have opened a new course in Studio
When
I select Checklists from the Tools menu
Then
I see the four default edX checklists
Scenario
:
A
course author can mark tasks as complete
Given
I have opened Checklists
Then
I can check and uncheck tasks in a checklist
And
They are correctly selected after I reload the page
#
Scenario: A course author sees checklists defined by edX
#
Given I have opened a new course in Studio
#
When I select Checklists from the Tools menu
#
Then I see the four default edX checklists
#
#
Scenario: A course author can mark tasks as complete
#
Given I have opened Checklists
#
Then I can check and uncheck tasks in a checklist
#
And They are correctly selected after I reload the page
Scenario
:
A
task can link to a location within Studio
Given
I have opened Checklists
When
I select a link to the course outline
Then
I am brought to the course outline page
And
I press the browser back button
Then
I am brought back to the course outline in the correct state
Scenario
:
A
task can link to a location outside Studio
Given
I have opened Checklists
When
I select a link to help page
Then
I am brought to the help page in a new window
#
Scenario: A task can link to a location outside Studio
#
Given I have opened Checklists
#
When I select a link to help page
#
Then I am brought to the help page in a new window
cms/djangoapps/contentstore/features/checklists.py
View file @
a2a1478d
...
...
@@ -62,6 +62,14 @@ def i_am_brought_to_course_outline(step):
assert_equal
(
1
,
len
(
world
.
browser
.
windows
))
@step
(
'I am brought back to the course outline in the correct state$'
)
def
i_am_brought_back_to_course_outline
(
step
):
step
.
given
(
'I see the four default edX checklists'
)
# In a previous step, we selected (1, 0) in order to click the 'Edit Course Outline' link.
# Make sure the task is still showing as selected (there was a caching bug with the collection).
verifyChecklist2Status
(
1
,
7
,
14
)
@step
(
'I select a link to help page$'
)
def
i_select_a_link_to_the_help_page
(
step
):
clickActionLink
(
2
,
0
,
'Visit Studio Help'
)
...
...
@@ -76,6 +84,8 @@ def i_am_brought_to_help_page_in_new_window(step):
assert_equal
(
'http://help.edge.edx.org/'
,
world
.
browser
.
url
)
############### HELPER METHODS ####################
def
verifyChecklist2Status
(
completed
,
total
,
percentage
):
def
verify_count
(
driver
):
...
...
cms/static/js/models/checklists.js
View file @
a2a1478d
...
...
@@ -12,6 +12,13 @@ CMS.Models.ChecklistCollection = Backbone.Collection.extend({
});
return
response
;
},
// Disable caching so the browser back button will work (checklists have links to other
// places within Studio).
fetch
:
function
(
options
)
{
options
.
cache
=
false
;
return
Backbone
.
Collection
.
prototype
.
fetch
.
call
(
this
,
options
);
}
});
common/djangoapps/terrain/steps.py
View file @
a2a1478d
...
...
@@ -25,6 +25,11 @@ def reload_the_page(step):
world
.
browser
.
reload
()
@step
(
'I press the browser back button$'
)
def
browser_back
(
step
):
world
.
browser
.
driver
.
back
()
@step
(
'I (?:visit|access|open) the homepage$'
)
def
i_visit_the_homepage
(
step
):
world
.
browser
.
visit
(
django_url
(
'/'
))
...
...
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