OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <!-- Copyright (c) 2014 Google Inc. All rights reserved. --> |
| 3 <html> |
| 4 <head> |
| 5 <meta charset="utf-8"> |
| 6 <title>google-sheet tests</title> |
| 7 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-
scale=1.0, user-scalable=yes"> |
| 8 |
| 9 <script src="../../../platform/platform.js"></script> |
| 10 <link rel="import" href="../../../polymer-test-tools/tools.html"> |
| 11 <script src="../../../polymer-test-tools/htmltest.js"></script> |
| 12 |
| 13 <link rel="import" href="../google-sheets.html"> |
| 14 </head> |
| 15 <body> |
| 16 |
| 17 <google-sheets id="sheet1"></google-sheets> |
| 18 |
| 19 <script> |
| 20 document.addEventListener('polymer-ready', function() { |
| 21 |
| 22 (function() { |
| 23 var sheet = document.querySelector('#sheet1'); |
| 24 var root = sheet.shadowRoot; |
| 25 |
| 26 // Check defaults. |
| 27 assert.lengthOf(sheet.spreadsheets, 0, |
| 28 '.spreadsheets length should default to 0'); |
| 29 assert.lengthOf(sheet.rows, 0, '.rows length should default to 0'); |
| 30 assert.isObject(sheet.sheet, '.sheet should default to {}'); |
| 31 assert.isObject(sheet.tab, '.tab should default to {}'); |
| 32 |
| 33 assert.equal(sheet.key, '', ".key default is not ''"); |
| 34 assert.equal(sheet.gid, 0, '.gid default is not 0'); |
| 35 assert.isFalse(sheet.published, '.published does not default to false'); |
| 36 assert.isNotNull(root.querySelector('google-signin-aware'), |
| 37 'google-signin-aware should be created for non-public sheet'); |
| 38 |
| 39 done(); |
| 40 |
| 41 })(); |
| 42 |
| 43 }); |
| 44 </script> |
| 45 </body> |
| 46 </html> |
OLD | NEW |