jsf.js_next_gen 1.0.0-beta-6 → 1.0.0-beta-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/.mocharc.json +9 -0
  2. package/dist/window/jsf-development.js +12 -4
  3. package/dist/window/jsf-development.js.map +1 -1
  4. package/dist/window/jsf.js +1 -1
  5. package/dist/window/jsf.js.br +0 -0
  6. package/dist/window/jsf.js.gz +0 -0
  7. package/dist/window/jsf.js.map +1 -1
  8. package/package.json +6 -5
  9. package/src/main/typescript/impl/AjaxImpl.ts +1 -1
  10. package/src/main/typescript/impl/util/Lang.ts +1 -1
  11. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +14 -3
  12. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +3 -0
  13. package/src/{test/typescript/frameworkBase/LangTest.ts → main/typescript/test/frameworkBase/LangTest.spec.ts} +1 -1
  14. package/src/{test/typescript/frameworkBase/_ext/monadish/DomQueryTest.ts → main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts} +1 -0
  15. package/src/{test/typescript/frameworkBase/_ext/monadish/LangTest.ts → main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts} +0 -0
  16. package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/monadish/MappingProbes.ts +0 -0
  17. package/src/{test/typescript/frameworkBase/_ext/monadish/MappingTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts} +0 -0
  18. package/src/{test/typescript/frameworkBase/_ext/monadish/MonadTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts} +0 -0
  19. package/src/{test/typescript/frameworkBase/_ext/monadish/StreamTest.ts → main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts} +0 -0
  20. package/src/{test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.ts → main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts} +0 -0
  21. package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/StandardInits.ts +4 -3
  22. package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/XmlResponses.ts +0 -0
  23. package/src/{test/typescript/impl/ImplTest.ts → main/typescript/test/impl/ImplTest.spec.ts} +1 -1
  24. package/src/{test/typescript/impl/SeparatorCharsTest.ts → main/typescript/test/impl/SeparatorCharsTest.spec.ts} +0 -0
  25. package/src/{test/typescript → main/typescript/test}/queue/AsynchronousProbe.ts +1 -1
  26. package/src/{test/typescript/queue/AsynchronousQueueTest.ts → main/typescript/test/queue/AsynchronousQueueTest.spec.ts} +2 -2
  27. package/src/{test/typescript/xhrCore/EventTests.ts → main/typescript/test/xhrCore/EventTests.spec.ts} +7 -2
  28. package/src/{test/typescript → main/typescript/test}/xhrCore/FakeWebsocket.ts +0 -0
  29. package/src/{test/typescript/xhrCore/FileUploadTest.ts → main/typescript/test/xhrCore/FileUploadTest.spec.ts} +2 -2
  30. package/src/{test/typescript/xhrCore/RequestParamsTest.ts → main/typescript/test/xhrCore/RequestParamsTest.spec.ts} +2 -2
  31. package/src/{test/typescript/xhrCore/RequestTest.ts → main/typescript/test/xhrCore/RequestTest.spec.ts} +1 -1
  32. package/src/{test/typescript/xhrCore/ResponseTest.ts → main/typescript/test/xhrCore/ResponseTest.spec.ts} +1 -0
  33. package/src/{test/typescript/xhrCore/ShadowDomTest.ts → main/typescript/test/xhrCore/ShadowDomTest.spec.ts} +0 -0
  34. package/src/{test/typescript → main/typescript/test}/xhrCore/WebsocketTest.ts +1 -1
  35. package/src/{test/typescript/xhrCore/XhrFormDataTest.ts → main/typescript/test/xhrCore/XhrFormDataTest.spec.ts} +1 -1
  36. package/src/main/typescript/tsconfig-typedoc.json +2 -1
  37. package/src/main/typescript/tsconfig.json +2 -1
  38. package/target/impl/AjaxImpl.js +1 -1
  39. package/target/impl/util/Lang.js +1 -1
  40. package/target/impl/util/Lang.js.map +1 -1
  41. package/target/impl/xhrCore/ResponseProcessor.js +11 -3
  42. package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
  43. package/target/impl/xhrCore/XhrRequest.js +3 -0
  44. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  45. package/target/test/frameworkBase/LangTest.spec.js +112 -0
  46. package/target/test/frameworkBase/LangTest.spec.js.map +1 -0
  47. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +293 -0
  48. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +1 -0
  49. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +293 -0
  50. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -0
  51. package/target/test/frameworkBase/_ext/monadish/LangTest.js +89 -0
  52. package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +1 -0
  53. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +89 -0
  54. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -0
  55. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +115 -0
  56. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -0
  57. package/target/test/frameworkBase/_ext/monadish/MappingTest.js +39 -0
  58. package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +1 -0
  59. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +39 -0
  60. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -0
  61. package/target/test/frameworkBase/_ext/monadish/MonadTest.js +155 -0
  62. package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +1 -0
  63. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +155 -0
  64. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -0
  65. package/target/test/frameworkBase/_ext/monadish/StreamTest.js +176 -0
  66. package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +1 -0
  67. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +176 -0
  68. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -0
  69. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +1 -0
  70. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +1 -0
  71. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +1 -0
  72. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +1 -0
  73. package/target/test/frameworkBase/_ext/shared/StandardInits.js +264 -0
  74. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -0
  75. package/target/test/frameworkBase/_ext/shared/XmlResponses.js +23 -0
  76. package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -0
  77. package/target/test/impl/ImplTest.spec.js +98 -0
  78. package/target/test/impl/ImplTest.spec.js.map +1 -0
  79. package/target/test/impl/SeparatorCharsTest.spec.js +72 -0
  80. package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -0
  81. package/target/test/queue/AsynchronousProbe.js +99 -0
  82. package/target/test/queue/AsynchronousProbe.js.map +1 -0
  83. package/target/test/queue/AsynchronousQueueTest.spec.js +130 -0
  84. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -0
  85. package/target/test/xhrCore/EventTests.spec.js +161 -0
  86. package/target/test/xhrCore/EventTests.spec.js.map +1 -0
  87. package/target/test/xhrCore/FakeWebsocket.js +25 -0
  88. package/target/test/xhrCore/FakeWebsocket.js.map +1 -0
  89. package/target/test/xhrCore/FileUploadTest.spec.js +166 -0
  90. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -0
  91. package/target/test/xhrCore/RequestParamsTest.spec.js +151 -0
  92. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -0
  93. package/target/test/xhrCore/RequestTest.spec.js +318 -0
  94. package/target/test/xhrCore/RequestTest.spec.js.map +1 -0
  95. package/target/test/xhrCore/ResponseTest.spec.js +257 -0
  96. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -0
  97. package/target/test/xhrCore/ShadowDomTest.spec.js +122 -0
  98. package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -0
  99. package/target/test/xhrCore/WebsocketTest.js +182 -0
  100. package/target/test/xhrCore/WebsocketTest.js.map +1 -0
  101. package/target/test/xhrCore/XhrFormDataTest.spec.js +58 -0
  102. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -0
  103. package/src/test/typescript/dumy.html +0 -10
  104. package/src/test/typescript/tsconfig.json +0 -20
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements. See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to you under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var mocha_1 = require("mocha");
19
+ var mona_dish_1 = require("mona-dish");
20
+ var sinon = require("sinon");
21
+ var XhrFormData_1 = require("../../impl/xhrCore/XhrFormData");
22
+ var chai_1 = require("chai");
23
+ var jsdom = require("jsdom");
24
+ var JSDOM = jsdom.JSDOM;
25
+ (0, mocha_1.describe)('XhrFormData tests', function () {
26
+ beforeEach(function () {
27
+ var _this = this;
28
+ var dom = new JSDOM("\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <title>Title</title>\n </head>\n <body>\n <div id=\"id_1\"></div>\n <div id=\"id_2\" booga=\"blarg\"></div>\n <div id=\"id_3\"></div>\n <div id=\"id_4\"></div>\n </body>\n </html>\n \n ", {
29
+ contentType: "text/html",
30
+ runScripts: "dangerously"
31
+ });
32
+ var window = dom.window;
33
+ global.window = window;
34
+ global.body = window.document.body;
35
+ global.document = window.document;
36
+ global.navigator = {
37
+ language: "en-En"
38
+ };
39
+ this.xhr = sinon.useFakeXMLHttpRequest();
40
+ this.requests = [];
41
+ this.xhr.onCreate = function (xhr) {
42
+ _this.requests.push(xhr);
43
+ };
44
+ global.XMLHttpRequest = this.xhr;
45
+ window.XMLHttpRequest = this.xhr;
46
+ });
47
+ this.afterEach(function () {
48
+ global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
49
+ });
50
+ (0, mocha_1.it)("must have multiple values for a name", function () {
51
+ window.document.body.innerHTML = "<form id=\"page::form\">\n <tobago-select-many-checkbox id=\"page:animals\">\n <label for=\"page:animals\">Checkbox Group</label>\n <label><input type=\"checkbox\" name=\"page:animals\" id=\"page:animals::0\" value=\"Cat\" checked=\"checked\">Cat</label>\n <label><input type=\"checkbox\" name=\"page:animals\" id=\"page:animals::1\" value=\"Dog\">Dog</label>\n <label><input type=\"checkbox\" name=\"page:animals\" id=\"page:animals::2\" value=\"Fox\" checked=\"checked\">Fox</label>\n <label><input type=\"checkbox\" name=\"page:animals\" id=\"page:animals::3\" value=\"Rabbit\">Rabbit</label>\n </tobago-select-many-checkbox>\n <div id=\"page:animalsOutput\">\n <label for=\"page:animalsOutput\">Selected Animals</label>\n <span>Cat, Fox</span>\n </div>\n </form>";
52
+ var xhrFormData = new XhrFormData_1.XhrFormData(mona_dish_1.DQ.byId("page::form"));
53
+ var formData = xhrFormData.toString();
54
+ (0, chai_1.expect)(formData).to.contain("animals=Cat");
55
+ (0, chai_1.expect)(formData).to.contain("animals=Fox");
56
+ });
57
+ });
58
+ //# sourceMappingURL=XhrFormDataTest.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XhrFormDataTest.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,+BAAmC;AACnC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CAAC,SAAS,GAAG,w0BAYzB,CAAC;QAET,IAAM,WAAW,GAAG,IAAI,yBAAW,CAAC,cAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAC3D,IAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;QAExC,IAAA,aAAM,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC3C,IAAA,aAAM,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Title</title>
6
- </head>
7
- <body>
8
-
9
- </body>
10
- </html>
@@ -1,20 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "lib": [
5
- "es5",
6
- "es2015.collection",
7
- "es2015.promise",
8
- "dom"
9
- ],
10
- "sourceMap": true,
11
- "outDir": "../../../target",
12
- "moduleResolution": "node",
13
- "typeRoots": [
14
- "../../node_modules/@types"
15
- ],
16
- "types": [
17
- "node"
18
- ]
19
- }
20
- }