Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
renderjs
Commits
d30cceba
Commit
d30cceba
authored
Feb 01, 2013
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend test for TabularGadget so no API regressions happens silently.
Clean up.
parent
2aaacd10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
renderjs.js
renderjs.js
+2
-7
test/renderjs_test.js
test/renderjs_test.js
+15
-0
No files found.
renderjs.js
View file @
d30cceba
...
@@ -609,7 +609,7 @@ var RenderJs = (function () {
...
@@ -609,7 +609,7 @@ var RenderJs = (function () {
* Read this list from data structure created in HTML5 local
* Read this list from data structure created in HTML5 local
* storage by updateGadgetIndexFromURL
* storage by updateGadgetIndexFromURL
*/
*/
//
XXX:
get from Cache stored index and itterate over it
// get from Cache stored index and itterate over it
// to find matching ones
// to find matching ones
var
gadget_list
=
[];
var
gadget_list
=
[];
$
.
each
(
RenderJs
.
GadgetCatalog
.
getGadgetIndexUrlList
(),
$
.
each
(
RenderJs
.
GadgetCatalog
.
getGadgetIndexUrlList
(),
...
@@ -728,9 +728,4 @@ var RenderJs = (function () {
...
@@ -728,9 +728,4 @@ var RenderJs = (function () {
};
};
}())
}())
};
};
}());
}());
\ No newline at end of file
// impliticly call RenderJs bootstrap
// $(document).ready(function () {
// RenderJs.init();
// });
test/renderjs_test.js
View file @
d30cceba
...
@@ -105,6 +105,21 @@ function setupRenderJSTest(){
...
@@ -105,6 +105,21 @@ function setupRenderJSTest(){
});
});
});
});
module
(
"
TabularGadget
"
);
test
(
'
addTabularGadget
'
,
function
()
{
cleanUp
();
equal
(
RenderJs
.
GadgetIndex
.
getGadgetList
().
length
,
0
);
RenderJs
.
TabbularGadget
.
addNewTabGadget
(
"
qunit-fixture
"
,
"
new_added
"
,
"
loading/test-gadget.html
"
,
""
,
""
);
stop
();
RenderJs
.
bindReady
(
function
(){
start
();
equal
(
$
(
"
#qunit-fixture
"
).
children
(
"
#new_added
"
).
length
,
1
);
equal
(
RenderJs
.
GadgetIndex
.
getGadgetList
().
length
,
1
);
equal
(
RenderJs
.
GadgetIndex
.
getRootGadget
().
getDom
().
attr
(
"
id
"
),
"
new_added
"
);
});
});
module
(
"
GadgetInitialization
"
);
module
(
"
GadgetInitialization
"
);
test
(
'
GadgetInitialization
'
,
function
()
{
test
(
'
GadgetInitialization
'
,
function
()
{
cleanUp
();
cleanUp
();
...
...
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