fix(view): remove dynamic components when the parent view is dehydrated

Also adds a bunch of unit tests for affected parts.

Fixes #1201
This commit is contained in:
Tobias Bosch
2015-04-14 18:01:44 -07:00
parent 6ecaa9aebb
commit 213dabdceb
16 changed files with 813 additions and 117 deletions

View File

@ -1,7 +1,7 @@
library test_lib.test_lib;
import 'package:guinness/guinness.dart' as gns;
export 'package:guinness/guinness.dart' hide Expect, expect, NotExpect, beforeEach, it, iit, xit;
export 'package:guinness/guinness.dart' hide Expect, expect, NotExpect, beforeEach, it, iit, xit, SpyObject;
import 'package:unittest/unittest.dart' hide expect;
import 'dart:async';
@ -149,6 +149,13 @@ xit(name, fn) {
_it(gns.xit, name, fn);
}
class SpyObject extends gns.SpyObject {
// Need to take an optional type as this is required by
// the JS SpyObject.
SpyObject([type = null]) {
}
}
String elementText(n) {
hasNodes(n) {
var children = DOM.childNodes(n);