Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: samples/third_party/todomvc/test/listorder_test.dart

Issue 27274002: Fixing bots after Polymer element integration (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library todomvc.test.listorder_test; 5 library todomvc.test.listorder_test;
6 6
7 import 'dart:async';
7 import 'dart:html'; 8 import 'dart:html';
8 import 'package:polymer/polymer.dart'; 9 import 'package:polymer/polymer.dart';
9 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
10 import 'package:unittest/html_config.dart'; 11 import 'package:unittest/html_config.dart';
11 import '../web/model.dart'; 12 import '../web/model.dart';
12 13
13 /** 14 /**
14 * This test runs the TodoMVC app, adds a few elements, marks some as done, and 15 * This test runs the TodoMVC app, adds a few elements, marks some as done, and
15 * switches from back and forth between "Active" and "All". This will make some 16 * switches from back and forth between "Active" and "All". This will make some
16 * nodes to be hidden and readded to the page. 17 * nodes to be hidden and readded to the page.
17 */ 18 */
18 main() { 19 main() {
19 useHtmlConfiguration(); 20 useHtmlConfiguration();
20 21
21 final root = query('todo-app').shadowRoot; 22 final root = query('todo-app').shadowRoot;
22 23
24 setUp(() => new Future.delayed(Duration.ZERO));
25
23 test('programmatically add items to model', () { 26 test('programmatically add items to model', () {
24 appModel.todos.addAll([ 27 appModel.todos.addAll([
25 new Todo('one (unchecked)'), 28 new Todo('one (unchecked)'),
26 new Todo('two (checked)')..done = true, 29 new Todo('two (checked)')..done = true,
27 new Todo('three (unchecked)') 30 new Todo('three (unchecked)')
28 ]); 31 ]);
29 performMicrotaskCheckpoint(); 32 performMicrotaskCheckpoint();
30 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3); 33 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3);
31 34
32 // TODO(jmesserly): HTML Imports breaks relative hash links when the 35 // TODO(jmesserly): HTML Imports breaks relative hash links when the
(...skipping 15 matching lines...) Expand all
48 performMicrotaskCheckpoint(); 51 performMicrotaskCheckpoint();
49 expect(root.queryAll('#todo-list li[is=todo-row]').length, 1); 52 expect(root.queryAll('#todo-list li[is=todo-row]').length, 1);
50 }); 53 });
51 54
52 test('navigate back to #/', () { 55 test('navigate back to #/', () {
53 windowLocation.hash = '#/'; 56 windowLocation.hash = '#/';
54 performMicrotaskCheckpoint(); 57 performMicrotaskCheckpoint();
55 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3); 58 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3);
56 }); 59 });
57 } 60 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/build/polyfill_injector_test.dart ('k') | samples/third_party/todomvc/test/mainpage_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698