Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
b31416bc
Commit
b31416bc
authored
Feb 21, 2014
by
Sindre Sorhus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #859 from ColinEberhardt/routing-test
Added a test to verify that routing works with the back button
parents
a82f3ee7
ba0bf8b1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
0 deletions
+58
-0
browser-tests/knownIssues.js
browser-tests/knownIssues.js
+33
-0
browser-tests/page.js
browser-tests/page.js
+6
-0
browser-tests/test.js
browser-tests/test.js
+19
-0
No files found.
browser-tests/knownIssues.js
View file @
b31416bc
...
...
@@ -111,33 +111,57 @@ module.exports = [
'
TodoMVC - dijon, Editing, should cancel edits on escape
'
,
'
TodoMVC - knockoutjs_require, Editing, should cancel edits on escape
'
,
// all the following are covered by this issue:
// https://github.com/tastejs/todomvc/issues/856
'
TodoMVC - knockoutjs, Routing, should respect the back button
'
,
'
TodoMVC - spine, Routing, should respect the back button
'
,
'
TodoMVC - componentjs, Routing, should respect the back button
'
,
'
TodoMVC - react, Routing, should respect the back button
'
,
'
TodoMVC - serenadejs, Routing, should respect the back button
'
,
'
TodoMVC - somajs, Routing, should respect the back button
'
,
'
TodoMVC - flight, Routing, should respect the back button
'
,
'
TodoMVC - lavaca_require, Routing, should respect the back button
'
,
'
TodoMVC - somajs_require, Routing, should respect the back button
'
,
// all the following are covered by this issue:
// https://github.com/tastejs/todomvc/issues/790
// these implementations filter the view rather than the model when routing
'
TodoMVC - agilityjs, Routing, should allow me to display active items
'
,
'
TodoMVC - agilityjs, Routing, should allow me to display completed items
'
,
'
TodoMVC - agilityjs, Routing, should respect the back button
'
,
'
TodoMVC - backbone, Routing, should allow me to display active items
'
,
'
TodoMVC - backbone, Routing, should allow me to display completed items
'
,
'
TodoMVC - backbone, Routing, should respect the back button
'
,
'
TodoMVC - maria, Routing, should allow me to display active items
'
,
'
TodoMVC - maria, Routing, should allow me to display completed items
'
,
'
TodoMVC - maria, Routing, should respect the back button
'
,
'
TodoMVC - dojo, Routing, should allow me to display active items
'
,
'
TodoMVC - dojo, Routing, should allow me to display completed items
'
,
'
TodoMVC - dojo, Routing, should respect the back button
'
,
'
TodoMVC - atmajs, Routing, should allow me to display active items
'
,
'
TodoMVC - atmajs, Routing, should allow me to display completed items
'
,
'
TodoMVC - atmajs, Routing, should respect the back button
'
,
'
TodoMVC - backbone_marionette, Routing, should allow me to display active items
'
,
'
TodoMVC - backbone_marionette, Routing, should allow me to display completed items
'
,
'
TodoMVC - backbone_marionette, Routing, should respect the back button
'
,
'
TodoMVC - exoskeleton, Routing, should allow me to display active items
'
,
'
TodoMVC - exoskeleton, Routing, should allow me to display completed items
'
,
'
TodoMVC - exoskeleton, Routing, should respect the back button
'
,
'
TodoMVC - thorax, Routing, should allow me to display active items
'
,
'
TodoMVC - thorax, Routing, should allow me to display completed items
'
,
'
TodoMVC - thorax, Routing, should respect the back button
'
,
'
TodoMVC - thorax_lumbar, Routing, should allow me to display active items
'
,
'
TodoMVC - thorax_lumbar, Routing, should allow me to display completed items
'
,
'
TodoMVC - thorax_lumbar, Routing, should respect the back button
'
,
'
TodoMVC - troopjs_require, Routing, should allow me to display active items
'
,
'
TodoMVC - troopjs_require, Routing, should allow me to display completed items
'
,
'
TodoMVC - troopjs_require, Routing, should respect the back button
'
,
'
TodoMVC - backbone_require, Routing, should allow me to display active items
'
,
'
TodoMVC - backbone_require, Routing, should allow me to display completed items
'
,
'
TodoMVC - backbone_require, Routing, should respect the back button
'
,
'
TodoMVC - ariatemplates, Routing, should allow me to display active items
'
,
'
TodoMVC - ariatemplates, Routing, should allow me to display completed items
'
,
'
TodoMVC - ariatemplates, Routing, should respect the back button
'
,
'
TodoMVC - backbone_marionette_require, Routing, should allow me to display active items
'
,
'
TodoMVC - backbone_marionette_require, Routing, should allow me to display completed items
'
,
'
TodoMVC - chaplin-brunch, Routing, should allow me to display active items
'
,
...
...
@@ -159,26 +183,32 @@ module.exports = [
'
TodoMVC - extjs_deftjs, Routing, should allow me to display completed items
'
,
'
TodoMVC - extjs_deftjs, Routing, should allow me to display all items
'
,
'
TodoMVC - extjs_deftjs, Routing, should highlight the currently applied filter
'
,
'
TodoMVC - extjs_deftjs, Routing, should respect the back button
'
,
'
TodoMVC - olives, Routing, should allow me to display active items
'
,
'
TodoMVC - olives, Routing, should allow me to display completed items
'
,
'
TodoMVC - olives, Routing, should allow me to display all items
'
,
'
TodoMVC - olives, Routing, should highlight the currently applied filter
'
,
'
TodoMVC - olives, Routing, should respect the back button
'
,
'
TodoMVC - dijon, Routing, should allow me to display active items
'
,
'
TodoMVC - dijon, Routing, should allow me to display completed items
'
,
'
TodoMVC - dijon, Routing, should allow me to display all items
'
,
'
TodoMVC - dijon, Routing, should highlight the currently applied filter
'
,
'
TodoMVC - dijon, Routing, should respect the back button
'
,
'
TodoMVC - duel, Routing, should allow me to display active items
'
,
'
TodoMVC - duel, Routing, should allow me to display completed items
'
,
'
TodoMVC - duel, Routing, should allow me to display all items
'
,
'
TodoMVC - duel, Routing, should highlight the currently applied filter
'
,
'
TodoMVC - duel, Routing, should respect the back button
'
,
'
TodoMVC - knockoutjs_require, Routing, should allow me to display active items
'
,
'
TodoMVC - knockoutjs_require, Routing, should allow me to display completed items
'
,
'
TodoMVC - knockoutjs_require, Routing, should allow me to display all items
'
,
'
TodoMVC - knockoutjs_require, Routing, should highlight the currently applied filter
'
,
'
TodoMVC - knockoutjs_require, Routing, should respect the back button
'
,
'
TodoMVC - angular-dart, Routing, should allow me to display active items
'
,
'
TodoMVC - angular-dart, Routing, should allow me to display completed items
'
,
'
TodoMVC - angular-dart, Routing, should allow me to display all items
'
,
'
TodoMVC - angular-dart, Routing, should highlight the currently applied filter
'
,
'
TodoMVC - angular-dart, Routing, should respect the back button
'
,
'
TodoMVC - typescript-backbone, Routing, should allow me to display active items
'
,
'
TodoMVC - typescript-backbone, Routing, should allow me to display completed items
'
,
'
TodoMVC - typescript-backbone, Routing, should allow me to display all items
'
,
...
...
@@ -201,6 +231,7 @@ module.exports = [
'
TodoMVC - extjs, Routing, should allow me to display completed items
'
,
'
TodoMVC - extjs, Routing, should allow me to display all items
'
,
'
TodoMVC - extjs, Routing, should highlight the currently applied filter
'
,
'
TodoMVC - extjs, Routing, should respect the back button
'
,
// stapes is completely broken!
// see: https://github.com/tastejs/todomvc/issues/808
...
...
@@ -224,6 +255,7 @@ module.exports = [
'
TodoMVC - stapes, Routing, should allow me to display active items
'
,
'
TodoMVC - stapes, Routing, should allow me to display completed items
'
,
'
TodoMVC - stapes, Routing, should allow me to display all items
'
,
'
TodoMVC - stapes, Routing, should respect the back button
'
,
'
TodoMVC - stapes_require, No Todos, should hide #main and #footer
'
,
'
TodoMVC - stapes_require, New Todo, should allow me to add todo items
'
,
'
TodoMVC - stapes_require, New Todo, should append new items to the bottom of the list
'
,
...
...
@@ -247,6 +279,7 @@ module.exports = [
'
TodoMVC - stapes_require, Routing, should allow me to display active items
'
,
'
TodoMVC - stapes_require, Routing, should allow me to display completed items
'
,
'
TodoMVC - stapes_require, Routing, should allow me to display all items
'
,
'
TodoMVC - stapes_require, Routing, should respect the back button
'
,
// mozart is not on the public website
'
TodoMVC - mozart, New Todo, should allow me to add todo items
'
,
...
...
browser-tests/page.js
View file @
b31416bc
...
...
@@ -23,6 +23,12 @@ module.exports = function Page(browser) {
return
this
.
getTodoListXpath
()
+
'
/li[
'
+
(
index
+
1
)
+
'
]
'
;
};
// ----------------- navigation methods
this
.
back
=
function
()
{
return
browser
.
navigate
().
back
();
}
// ----------------- try / get methods
// unfortunately webdriver does not have a decent API for determining if an
...
...
browser-tests/test.js
View file @
b31416bc
...
...
@@ -315,6 +315,25 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod
testOps
.
assertItems
([
TODO_ITEM_ONE
,
TODO_ITEM_THREE
]);
});
test
.
it
(
'
should respect the back button
'
,
function
()
{
createStandardItems
();
page
.
toggleItemAtIndex
(
1
);
page
.
filterByActiveItems
();
page
.
filterByCompletedItems
();
// should show completed items
testOps
.
assertItems
([
TODO_ITEM_TWO
]);
// then active items
page
.
back
();
testOps
.
assertItems
([
TODO_ITEM_ONE
,
TODO_ITEM_THREE
]);
// then all items
page
.
back
();
testOps
.
assertItems
([
TODO_ITEM_ONE
,
TODO_ITEM_TWO
,
TODO_ITEM_THREE
]);
});
test
.
it
(
'
should allow me to display completed items
'
,
function
()
{
createStandardItems
();
page
.
toggleItemAtIndex
(
1
);
...
...
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