projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
716e558
)
reset DOM change counter for second un-facet link, part of MKWS-241
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 9 Jul 2014 11:35:04 +0000
(11:35 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 9 Jul 2014 11:35:04 +0000
(11:35 +0000)
test/spec/mkws-pazpar2.js
patch
|
blob
|
history
diff --git
a/test/spec/mkws-pazpar2.js
b/test/spec/mkws-pazpar2.js
index
b353443
..
34b2804
100644
(file)
--- a/
test/spec/mkws-pazpar2.js
+++ b/
test/spec/mkws-pazpar2.js
@@
-585,19
+585,26
@@
describe("Check removable facets links", function () {
}, "Records DOM change mkwsRecords, removable", 2 * jasmine_config.second);
runs(function () {
}, "Records DOM change mkwsRecords, removable", 2 * jasmine_config.second);
runs(function () {
+ debug("unbind removable");
+ $("div.mkwsRecords").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
+ waitcount = 0;
+
+ $("div.mkwsRecords").bind("DOMNodeInserted DOMNodeRemoved propertychange", function () {
+ waitcount++;
+ debug("DOM change mkwsRecords for removeable2: " + waitcount);
+ });
+
var click = $("a.mkwsRemovable").eq(0).trigger("click");
debug("Removed second facets link: " + click.length);
expect(click.length).toBe(1);
});
waitsFor(function () {
var click = $("a.mkwsRemovable").eq(0).trigger("click");
debug("Removed second facets link: " + click.length);
expect(click.length).toBe(1);
});
waitsFor(function () {
- // debug("wait for: " + waitcount);
- return waitcount >= 4 && $("a.mkwsRemovable").length == 0 ? true : false;
+ return waitcount >= 2 && $("a.mkwsRemovable").length == 0 ? true : false;
}, "DOM change mkwsRecords, removable2", 2 * jasmine_config.second);
}, "DOM change mkwsRecords, removable2", 2 * jasmine_config.second);
-
runs(function () {
runs(function () {
- debug("unbind removable");
+ debug("unbind removable2");
$("div.mkwsRecords").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
});
});
$("div.mkwsRecords").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
});
});