|
17 | 17 | <script src="../../web-component-tester/browser.js"></script> |
18 | 18 | <script src="../../iron-test-helpers/test-helpers.js"></script> |
19 | 19 | <script src="../../iron-test-helpers/mock-interactions.js"></script> |
20 | | - <link rel="import" href="../../raml-js-parser/raml-js-parser.html"> |
21 | | - <link rel="import" href="../../raml-json-enhance/raml-json-enhance.html"> |
| 20 | + <link rel="import" href="../../fetch-polyfill/fetch-polyfill.html"> |
22 | 21 | <link rel="import" href="../api-console-request.html"> |
23 | 22 | </head> |
24 | 23 |
|
25 | 24 | <body> |
26 | | - <test-fixture id="parser"> |
27 | | - <template> |
28 | | - <raml-js-parser json></raml-js-parser> |
29 | | - </template> |
30 | | - </test-fixture> |
31 | | - <test-fixture id="enhancer"> |
32 | | - <template> |
33 | | - <raml-json-enhance></raml-json-enhance> |
34 | | - </template> |
35 | | - </test-fixture> |
36 | 25 | <test-fixture id="basic"> |
37 | 26 | <template> |
38 | 27 | <api-console-request></api-console-request> |
|
55 | 44 | </test-fixture> |
56 | 45 | <script> |
57 | 46 | /* global fixture, assert, TestHelpers */ |
58 | | - suite('basic', function() { |
| 47 | + suite('basic api-console-request', function() { |
59 | 48 | var element; |
60 | 49 |
|
61 | 50 | setup(function() { |
|
77 | 66 |
|
78 | 67 | suite('Response handling', function() { |
79 | 68 | var element; |
80 | | - var response = new Response('test', { |
81 | | - statusCode: 200, |
82 | | - headers: { |
83 | | - 'content-type': 'x-test' |
84 | | - } |
85 | | - }); |
| 69 | + var response; |
86 | 70 |
|
87 | 71 | setup(function() { |
88 | 72 | element = fixture('basic'); |
89 | | - element.response = response; |
| 73 | + element.response = new Response('test', { |
| 74 | + statusCode: 200, |
| 75 | + headers: { |
| 76 | + 'content-type': 'x-test' |
| 77 | + } |
| 78 | + }); |
90 | 79 | TestHelpers.forceXIfStamp(element); |
91 | 80 | }); |
92 | 81 |
|
|
179 | 168 | test('Encodes URL for proxy', function() { |
180 | 169 | element.proxyEncodeUrl = true; |
181 | 170 | element._appendProxy(event); |
182 | | - assert.equal(event.detail.url, 'https://domain.com/http%3A%2F%2Ftest.domain.com%2F%3Fparam%3Dvalue'); |
| 171 | + assert.equal(event.detail.url, |
| 172 | + 'https://domain.com/http%3A%2F%2Ftest.domain.com%2F%3Fparam%3Dvalue'); |
183 | 173 | }); |
184 | 174 | }); |
185 | 175 |
|
|
0 commit comments