()
| 9 | }); |
| 10 | |
| 11 | function runTest() { |
| 12 | describe('Rendering of released components', function () { |
| 13 | this.timeout(5000); |
| 14 | let fixture; |
| 15 | beforeEach(async () => { |
| 16 | this.timeout(3100); |
| 17 | fixture = await createFixtureIframe('test/fixtures/released.html', 3000); |
| 18 | }); |
| 19 | |
| 20 | it('all components should get loaded', function () { |
| 21 | this.timeout(15000); |
| 22 | return pollForLayout(fixture.win, 12, 10000) |
| 23 | .then(() => { |
| 24 | expect( |
| 25 | fixture.doc.querySelectorAll('.i-amphtml-element') |
| 26 | ).to.have.length(16); |
| 27 | expect( |
| 28 | fixture.doc.querySelectorAll('.i-amphtml-layout') |
| 29 | ).to.have.length(12); |
| 30 | expect( |
| 31 | fixture.doc.querySelectorAll('.i-amphtml-error') |
| 32 | ).to.have.length(0); |
| 33 | checkGlobalScope(fixture.win); |
| 34 | }) |
| 35 | .then(() => { |
| 36 | return expectBodyToBecomeVisible(fixture.win); |
| 37 | }); |
| 38 | }); |
| 39 | |
| 40 | it('sanity for Firefox while we skip above', function () { |
| 41 | this.timeout(15000); |
| 42 | // Test this only in firefox. |
| 43 | if (!navigator.userAgent.match(/Firefox/)) { |
| 44 | return; |
| 45 | } |
| 46 | return pollForLayout(fixture.win, 11, 10000).then(() => { |
| 47 | return expectBodyToBecomeVisible(fixture.win); |
| 48 | }); |
| 49 | }); |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | function checkGlobalScope(win) { |
| 54 | // Checks that we don't leak certain symbols to the global scope. |
nothing calls this directly
no test coverage detected