| Index: samples/third_party/todomvc/test/listorder_test.dart
|
| diff --git a/samples/third_party/todomvc/test/listorder_test.dart b/samples/third_party/todomvc/test/listorder_test.dart
|
| index f0599436ad28a0ae3890e07ac2fe0c79e52fa160..914f4adc48b791d89876bfe425dc1484699f703f 100644
|
| --- a/samples/third_party/todomvc/test/listorder_test.dart
|
| +++ b/samples/third_party/todomvc/test/listorder_test.dart
|
| @@ -9,9 +9,7 @@ import 'dart:html';
|
| import 'package:polymer/polymer.dart';
|
| import 'package:unittest/unittest.dart';
|
| import 'package:unittest/html_config.dart';
|
| -import '../web/elements/td_model.dart';
|
| -import '../web/elements/td_todos.dart';
|
| -import 'utils.dart';
|
| +import '../web/model.dart';
|
|
|
| /**
|
| * This test runs the TodoMVC app, adds a few elements, marks some as done, and
|
| @@ -23,23 +21,20 @@ main() {
|
| useHtmlConfiguration();
|
|
|
| ShadowRoot root;
|
| - TodoModel model;
|
|
|
| setUp(() => Polymer.onReady.then((_) {
|
| - root = querySelector('td-todos').shadowRoot;
|
| - model = querySelector('td-model');
|
| - return onPropertyInit(model, 'items');
|
| + root = querySelector('todo-app').shadowRoot;
|
| }));
|
|
|
| test('programmatically add items to model', () {
|
| - model.items.addAll([
|
| + appModel.todos.addAll([
|
| new Todo('one (unchecked)'),
|
| - new Todo('two (checked)')..completed = true,
|
| + new Todo('two (checked)')..done = true,
|
| new Todo('three (unchecked)')
|
| ]);
|
| Observable.dirtyCheck();
|
| return window.animationFrame.then((_) {
|
| - expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 3);
|
| + expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 3);
|
|
|
| // TODO(jmesserly): HTML Imports breaks relative hash links when the
|
| // component is at a different path from the main HTML document. For now
|
| @@ -53,21 +48,21 @@ main() {
|
| test('navigate to #/active', () {
|
| windowLocation.hash = '#/active';
|
| return window.animationFrame.then((_) {
|
| - expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 2);
|
| + expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 2);
|
| });
|
| });
|
|
|
| test('navigate to #/completed', () {
|
| windowLocation.hash = '#/completed';
|
| return window.animationFrame.then((_) {
|
| - expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 1);
|
| + expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 1);
|
| });
|
| });
|
|
|
| test('navigate back to #/', () {
|
| windowLocation.hash = '#/';
|
| return window.animationFrame.then((_) {
|
| - expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 3);
|
| + expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 3);
|
| });
|
| });
|
| }
|
|
|