|
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> |
6 | | - <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
| 6 | + <script src="../../webcomponentsjs/webcomponents-loader.js"></script> |
7 | 7 | <script src="../../web-component-tester/browser.js"></script> |
8 | 8 | <script src="../../iron-test-helpers/test-helpers.js"></script> |
9 | 9 | <link rel="import" href="../api-console.html"> |
10 | 10 | </head> |
11 | 11 | <body> |
12 | | - <test-fixture id="basic"> |
| 12 | + |
| 13 | + <test-fixture id="Basic"> |
13 | 14 | <template> |
14 | 15 | <api-console></api-console> |
15 | 16 | </template> |
16 | 17 | </test-fixture> |
17 | | - <script> |
18 | | - /* global fixture, assert, flush */ |
19 | | - suite('basic', function() { |
20 | | - var element; |
21 | | - this.timeout(20000); |
22 | 18 |
|
23 | | - setup(function() { |
24 | | - element = fixture('basic'); |
25 | | - }); |
| 19 | + <test-fixture id="NoAttr"> |
| 20 | + <template> |
| 21 | + <api-console no-attribution></api-console> |
| 22 | + </template> |
| 23 | + </test-fixture> |
26 | 24 |
|
| 25 | + <script> |
| 26 | + suite('Attribution', function() { |
27 | 27 | test('Attribution logo is rendered', function(done) { |
| 28 | + const element = fixture('Basic'); |
28 | 29 | flush(function() { |
29 | | - var node = Polymer.dom(element.root).querySelector('.powered-by'); |
| 30 | + const node = element.shadowRoot.querySelector('.powered-by'); |
30 | 31 | assert.ok(node); |
31 | 32 | done(); |
32 | 33 | }); |
33 | 34 | }); |
34 | 35 |
|
35 | 36 | test('Attribution is removed from the DOM', function() { |
| 37 | + const element = fixture('NoAttr'); |
36 | 38 | flush(function() { |
37 | | - element.noAttribution = true; |
38 | | - var node = Polymer.dom(element.root).querySelector('.powered-by'); |
| 39 | + const node = element.shadowRoot.querySelector('.powered-by'); |
39 | 40 | assert.notOk(node); |
40 | 41 | }); |
41 | 42 | }); |
|
0 commit comments