Index: test/data/input/todomvc_listorder_shadowdom_test.html |
diff --git a/test/data/input/todomvc_listorder_shadowdom_test.html b/test/data/input/todomvc_listorder_shadowdom_test.html |
index 1ed1bc5f982a1c1df5b048ca1b407ae34cacbac2..8d8f3c4c4def37b76a18015a09d2d1ff6f3bf2e9 100644 |
--- a/test/data/input/todomvc_listorder_shadowdom_test.html |
+++ b/test/data/input/todomvc_listorder_shadowdom_test.html |
@@ -73,6 +73,7 @@ BSD-style license that can be found in the LICENSE file. |
import 'dart:html'; |
import 'package:unittest/unittest.dart'; |
import 'package:web_ui/web_ui.dart'; |
+import 'package:web_ui/observe/html.dart'; |
import 'example/todomvc/main.dart' as todomvc_main; |
import 'example/todomvc/model.dart'; |
@@ -86,21 +87,22 @@ main() { |
app.todos.add(new Todo('one (unchecked)')); |
app.todos.add(new Todo('two (checked)')..done = true); |
app.todos.add(new Todo('three (unchecked)')); |
- viewModel.showIncomplete = true; |
- viewModel.showDone = true; |
- dispatch(); |
+ locationHash = '#/'; |
- window.setTimeout(() { |
- viewModel.showIncomplete = true; |
- viewModel.showDone = false; |
- dispatch(); |
- window.setTimeout(() { |
- viewModel.showIncomplete = true; |
- viewModel.showDone = true; |
- dispatch(); |
- window.setTimeout(() => window.postMessage('done', '*'), 0); |
- }, 0); |
- }, 0); |
+ deliverChangesSync(); |
+ expect(queryAll('#todo-list x-todo-row').length, 3); |
+ |
+ locationHash = '#/active'; |
+ deliverChangesSync(); |
+ expect(queryAll('#todo-list x-todo-row').length, 2); |
+ |
+ locationHash = '#/completed'; |
+ deliverChangesSync(); |
+ expect(queryAll('#todo-list x-todo-row').length, 1); |
+ |
+ locationHash = '#/'; |
+ deliverChangesSync(); |
+ window.postMessage('done', '*'); |
}, 0); |
} |
</script> |