| 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="sheet" key="0Anye-JMjUkZZdDBkMVluMEhZMmFGeHpYdDJJV1FBRWc" |
| 18 published></google-sheets> |
| 19 |
| 20 <script> |
| 21 document.addEventListener('polymer-ready', function() { |
| 22 |
| 23 var sheet = document.querySelector('#sheet'); |
| 24 var root = sheet.shadowRoot; |
| 25 |
| 26 assert.isTrue(sheet.published); |
| 27 assert.isNull(root.querySelector('google-signin-aware'), |
| 28 'google-signin-aware should not be created for a published sheet'); |
| 29 |
| 30 sheet.addEventListener('google-sheet-data', function(e) { |
| 31 |
| 32 if (e.detail.type === 'tab') { |
| 33 assert.equal(this.tab.title, 'Locations', |
| 34 'Published spreadsheet title is not correct.'); |
| 35 assert.isNotNull(this.tab.updated, '.tab.updated was not set'); |
| 36 assert.isTrue(this.tab.authors.length > 0, '.tab.authors was 0'); |
| 37 } else if (e.detail.type === 'rows') { |
| 38 assert.lengthOf(this.spreadsheets, 0, |
| 39 '.spreadsheets length should be 0 since spreadsheet key was given'); |
| 40 assert.isTrue(this.rows.length > 0, '.rows was not populated'); |
| 41 } |
| 42 |
| 43 assert.equal(this.$.cellrowsajax.url, '', |
| 44 '#cellrowsajax should not be invoked for a public spreadsheet'); |
| 45 |
| 46 done(); |
| 47 }); |
| 48 }); |
| 49 </script> |
| 50 </body> |
| 51 </html> |
| OLD | NEW |