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
ee537451
Commit
ee537451
authored
Aug 23, 2012
by
asudoh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed test files from dojo18 branch.
parent
bf4f1975
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
366 deletions
+0
-366
architecture-examples/dojo/js/todo/tests/app18.html
architecture-examples/dojo/js/todo/tests/app18.html
+0
-209
architecture-examples/dojo/js/todo/tests/ctrl/TodoListRefController.js
...examples/dojo/js/todo/tests/ctrl/TodoListRefController.js
+0
-56
architecture-examples/dojo/js/todo/tests/dojoConfig.js
architecture-examples/dojo/js/todo/tests/dojoConfig.js
+0
-7
architecture-examples/dojo/js/todo/tests/model/SimpleTodoModel.js
...ture-examples/dojo/js/todo/tests/model/SimpleTodoModel.js
+0
-36
architecture-examples/dojo/js/todo/tests/module.js
architecture-examples/dojo/js/todo/tests/module.js
+0
-8
architecture-examples/dojo/js/todo/tests/runTests.html
architecture-examples/dojo/js/todo/tests/runTests.html
+0
-50
No files found.
architecture-examples/dojo/js/todo/tests/app18.html
deleted
100644 → 0
View file @
bf4f1975
This diff is collapsed.
Click to expand it.
architecture-examples/dojo/js/todo/tests/ctrl/TodoListRefController.js
deleted
100644 → 0
View file @
bf4f1975
define
([
"
doh
"
,
"
dojo/json
"
,
"
dojox/mvc/at
"
,
"
../../ctrl/TodoListRefController
"
,
"
../../ctrl/TodoRefController
"
,
"
../../model/SimpleTodoModel
"
,
"
../../store/LocalStorage
"
],
function
(
doh
,
json
,
at
,
TodoListRefController
,
TodoRefController
,
SimpleTodoModel
,
LocalStorage
){
doh
.
register
(
"
todo.tests.ctrl.TodoListRefController
"
,
[
function
empty
(){
localStorage
.
removeItem
(
"
todos-dojo
"
);
var
ctrl
=
new
TodoRefController
({
defaultId
:
"
todos-dojo
"
,
modelClass
:
SimpleTodoModel
,
store
:
new
LocalStorage
()
}),
listCtrl
=
new
TodoListRefController
({
model
:
at
(
ctrl
,
"
todos
"
)
});
doh
.
is
(
0
,
ctrl
.
get
(
"
complete
"
),
"
The current count of completed todo items should be 0
"
);
doh
.
is
(
0
,
ctrl
.
get
(
"
incomplete
"
),
"
The current count of incomplete todo items should be 0
"
);
doh
.
is
(
0
,
listCtrl
.
get
(
"
length
"
),
"
The current length should be 0
"
);
listCtrl
.
model
.
push
({
title
:
"
Task0
"
,
completed
:
false
});
doh
.
is
(
0
,
ctrl
.
get
(
"
complete
"
),
"
The current count of completed todo items should be 0
"
);
doh
.
is
(
1
,
ctrl
.
get
(
"
incomplete
"
),
"
The current count of incomplete todo items should be 1
"
);
doh
.
is
(
1
,
listCtrl
.
get
(
"
length
"
),
"
The current length should be 1
"
);
},
function
existing
(){
localStorage
.
setItem
(
"
todos-dojo
"
,
json
.
stringify
({
id
:
"
todos-dojo
"
,
todos
:
[
{
title
:
"
Task0
"
,
completed
:
false
},
{
title
:
"
Task1
"
,
completed
:
true
},
{
title
:
"
Task2
"
,
completed
:
false
}
],
incomplete
:
2
,
complete
:
1
}));
var
ctrl
=
new
TodoRefController
({
defaultId
:
"
todos-dojo
"
,
modelClass
:
SimpleTodoModel
,
store
:
new
LocalStorage
()
}),
listCtrl
=
new
TodoListRefController
({
model
:
at
(
ctrl
,
"
todos
"
)
});
doh
.
is
(
1
,
ctrl
.
get
(
"
complete
"
),
"
The current count of completed todo items should be 1
"
);
doh
.
is
(
2
,
ctrl
.
get
(
"
incomplete
"
),
"
The current count of incomplete todo items should be 2
"
);
doh
.
is
(
3
,
listCtrl
.
get
(
"
length
"
),
"
The current length should be 3
"
);
}
]);
});
\ No newline at end of file
architecture-examples/dojo/js/todo/tests/dojoConfig.js
deleted
100644 → 0
View file @
bf4f1975
(
function
(
require
){
require
.
baseUrl
=
"
../../dojo
"
;
require
.
packages
=
(
require
.
packages
||
[]).
concat
([{
name
:
"
todo
"
,
location
:
"
../todomvc/architecture-examples/dojo/js/todo
"
}]);
})(
require
);
architecture-examples/dojo/js/todo/tests/model/SimpleTodoModel.js
deleted
100644 → 0
View file @
bf4f1975
define
([
"
doh
"
,
"
dojo/Stateful
"
,
"
../../model/SimpleTodoModel
"
],
function
(
doh
,
Stateful
,
SimpleTodoModel
){
doh
.
register
(
"
todo.tests.model.SimpleTodoModel
"
,
[
function
basic
(){
var
model
=
new
SimpleTodoModel
({
id
:
"
todos-dojo
"
,
todos
:
[
{
title
:
"
Task0
"
,
completed
:
false
},
{
title
:
"
Task1
"
,
completed
:
true
},
{
title
:
"
Task2
"
,
completed
:
false
}
],
incomplete
:
2
,
complete
:
1
});
model
.
todos
.
push
(
new
Stateful
({
title
:
"
Task3
"
,
completed
:
true
}),
new
Stateful
({
title
:
"
Task4
"
,
completed
:
false
}));
doh
.
is
(
2
,
model
.
complete
,
"
We should have two complete tasks
"
);
doh
.
is
(
3
,
model
.
incomplete
,
"
We should have three incomplete tasks
"
);
model
.
todos
.
push
(
new
Stateful
({
title
:
"
Task5
"
,
completed
:
false
}));
doh
.
is
(
2
,
model
.
complete
,
"
We should have two complete tasks
"
);
doh
.
is
(
4
,
model
.
incomplete
,
"
We should have four incomplete tasks
"
);
model
.
todos
[
4
].
set
(
"
completed
"
,
true
);
doh
.
is
(
3
,
model
.
complete
,
"
We should have three complete tasks
"
);
doh
.
is
(
3
,
model
.
incomplete
,
"
We should have three incomplete tasks
"
);
model
.
todos
.
splice
(
4
,
1
);
doh
.
is
(
2
,
model
.
complete
,
"
We should have two complete tasks
"
);
doh
.
is
(
3
,
model
.
incomplete
,
"
We should have three incomplete tasks
"
);
}
]);
});
\ No newline at end of file
architecture-examples/dojo/js/todo/tests/module.js
deleted
100644 → 0
View file @
bf4f1975
define
([
"
doh
"
,
"
./ctrl/TodoListRefController
"
,
"
./model/SimpleTodoModel
"
],
function
(
doh
){
var
userArgs
=
window
.
location
.
search
.
replace
(
/
[\?
&
](
dojoUrl|testUrl|testModule
)
=
[^
&
]
*/g
,
""
).
replace
(
/^&/
,
"
?
"
);
doh
.
registerUrl
(
"
todo.tests.app18
"
,
require
.
toUrl
(
"
todo/tests/app18.html
"
)
+
userArgs
,
999999
);
});
architecture-examples/dojo/js/todo/tests/runTests.html
deleted
100644 → 0
View file @
bf4f1975
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
This is a test runner for Dojo version of TodoMVC.
To use this, place todomvc directory at the directory containing dojo/dijit/dojox.
-->
<html>
<head>
<title>
Unit Test Runner
</title>
<script>
function
onLoadHandler
(){
var
queryString
=
window
.
location
.
search
.
substr
(
1
),
queries
=
queryString
.
split
(
"
&
"
),
moduleFound
=
false
;
for
(
var
i
=
0
;
i
<
queries
.
length
;
i
++
){
if
(
/^test
(
|Url|Module
)
=/i
.
test
(
queries
[
i
])){
moduleFound
=
true
;
break
;
}
}
if
(
!
moduleFound
){
queryString
+=
(
queryString
?
"
&
"
:
""
)
+
"
test=todo/tests/module&async=true
"
;
}
document
.
getElementById
(
"
testFrame
"
).
src
=
"
../../../../../../util/doh/runner.html?boot=../../todomvc/architecture-examples/dojo/js/todo/tests/dojoConfig.js
"
+
(
queryString
?
(
"
&
"
+
queryString
)
:
""
);
}
function
iFrameOnLoadHandler
(){
// summary:
// Makes sure todo/tests/dojoConfig.js is loaded before dojo.js is loaded.
// DOH's &boot URL arg handler does not allow us to specify what order the modules are loaded.
var
w
=
document
.
getElementById
(
"
testFrame
"
).
contentWindow
,
found
=
false
;
for
(
var
packs
=
(
w
.
require
||
{}).
packages
,
i
=
0
;
packs
&&
i
<
packs
.
length
;
i
++
){
if
(
packs
[
i
].
name
==
"
todo
"
){
found
=
true
;
break
;
}
}
if
(
!
found
){
return
setTimeout
(
iFrameOnLoadHandler
,
500
);
}
var
script
=
document
.
createElement
(
"
script
"
);
script
.
type
=
"
text/javascript
"
;
script
.
src
=
"
../../../../../../dojo/dojo.js
"
;
script
.
charset
=
"
utf-8
"
;
w
.
document
.
getElementsByTagName
(
"
head
"
)[
0
].
appendChild
(
script
);
}
</script>
</head>
<body
onload=
"onLoadHandler();"
style=
"width:100%;height:100%;margin:0;padding:0;"
>
<iframe
id=
"testFrame"
onload=
"iFrameOnLoadHandler();"
frameborder=
"0"
style=
"width:100%;height:100%;margin:0;padding:0;"
></iframe>
</body>
</html>
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