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

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

Issue 23539003: Turn on Polymer TodoMVC tests on Dart buildbots (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 3 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library todomvc.test.mainpage_test;
6
7 import 'dart:async';
8 import 'dart:html';
9 import 'package:polymer/polymer.dart';
10 import 'package:unittest/unittest.dart';
11 import 'package:unittest/html_config.dart';
12 import '../web/app.dart';
13 import '../web/model.dart';
14
15 /**
16 * This test runs the TodoMVC app and checks the state of the initial page.
17 */
18 // TODO(jmesserly): verify some styles (colors, fonts, relative size) as well.
19 main() {
20 useHtmlConfiguration();
21
22 test('initial state', () {
23 final todoApp = query('todo-app');
24 expect(appModel.todos.length, 0);
25 expect(todoApp.xtag is TodoApp, true, reason: 'TodoApp should bee created');
26
27 final root = todoApp.shadowRoot;
28 final newTodo = root.query('#new-todo');
29 expect(newTodo.placeholder, "What needs to be done?");
30
31 // Wait for setTimeout 0 for focus to activate.
32 Timer.run(expectAsync0(() {
33 expect(document.activeElement, todoApp, reason: 'app should have focus');
34 expect(root.activeElement, newTodo, reason: 'New todo should have focus');
35 expect(root.queryAll('[is=todo-row]').length, 0, reason: 'no items yet');
36 }));
37 });
38 }
OLDNEW
« no previous file with comments | « samples/third_party/todomvc/test/listorder_test.html ('k') | samples/third_party/todomvc/test/mainpage_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698