jsf.js_next_gen 1.0.0-beta-4 → 1.0.0-beta-7
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.
- package/.mocharc.json +9 -0
- package/dist/window/jsf-development.js +1 -1
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/{src/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.ts → dist/window/tmp} +0 -0
- package/package.json +6 -5
- package/src/main/typescript/api/Jsf.ts +1 -1
- package/src/{test/typescript/frameworkBase/LangTest.ts → main/typescript/test/frameworkBase/LangTest.spec.ts} +1 -1
- package/src/{test/typescript/frameworkBase/_ext/monadish/DomQueryTest.ts → main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts} +1 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/LangTest.ts → main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts} +0 -0
- package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/monadish/MappingProbes.ts +0 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/MappingTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts} +0 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/MonadTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts} +0 -0
- package/src/{test/typescript/frameworkBase/_ext/monadish/StreamTest.ts → main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts} +0 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts +0 -0
- package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/StandardInits.ts +4 -3
- package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/XmlResponses.ts +0 -0
- package/src/{test/typescript/impl/ImplTest.ts → main/typescript/test/impl/ImplTest.spec.ts} +1 -1
- package/src/{test/typescript/impl/SeparatorCharsTest.ts → main/typescript/test/impl/SeparatorCharsTest.spec.ts} +0 -0
- package/src/{test/typescript → main/typescript/test}/queue/AsynchronousProbe.ts +1 -1
- package/src/{test/typescript/queue/AsynchronousQueueTest.ts → main/typescript/test/queue/AsynchronousQueueTest.spec.ts} +2 -2
- package/src/{test/typescript/xhrCore/EventTests.ts → main/typescript/test/xhrCore/EventTests.spec.ts} +1 -1
- package/src/{test/typescript → main/typescript/test}/xhrCore/FakeWebsocket.ts +0 -0
- package/src/{test/typescript/xhrCore/FileUploadTest.ts → main/typescript/test/xhrCore/FileUploadTest.spec.ts} +2 -2
- package/src/{test/typescript/xhrCore/RequestParamsTest.ts → main/typescript/test/xhrCore/RequestParamsTest.spec.ts} +2 -2
- package/src/{test/typescript/xhrCore/RequestTest.ts → main/typescript/test/xhrCore/RequestTest.spec.ts} +1 -1
- package/src/{test/typescript/xhrCore/ResponseTest.ts → main/typescript/test/xhrCore/ResponseTest.spec.ts} +0 -0
- package/src/{test/typescript/xhrCore/ShadowDomTest.ts → main/typescript/test/xhrCore/ShadowDomTest.spec.ts} +0 -0
- package/src/{test/typescript → main/typescript/test}/xhrCore/WebsocketTest.ts +1 -1
- package/src/{test/typescript/xhrCore/XhrFormDataTest.ts → main/typescript/test/xhrCore/XhrFormDataTest.spec.ts} +1 -1
- package/src/main/typescript/tsconfig-typedoc.json +2 -1
- package/src/main/typescript/tsconfig.json +2 -1
- package/src/test/resources/jsf-development.js +450 -3672
- package/src/test/resources/jsf.js +1 -1
- package/src/test/resources/jsf.js.br +0 -0
- package/src/test/resources/jsf.js.gz +0 -0
- package/target/api/Jsf.js.map +1 -1
- package/target/test/frameworkBase/LangTest.spec.js +112 -0
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +293 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +293 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.js +89 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +89 -0
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +115 -0
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js +39 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +39 -0
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js +155 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +155 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js +176 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +176 -0
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +1 -0
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +264 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -0
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +23 -0
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -0
- package/target/test/impl/ImplTest.spec.js +98 -0
- package/target/test/impl/ImplTest.spec.js.map +1 -0
- package/target/test/impl/SeparatorCharsTest.spec.js +72 -0
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -0
- package/target/test/queue/AsynchronousProbe.js +99 -0
- package/target/test/queue/AsynchronousProbe.js.map +1 -0
- package/target/test/queue/AsynchronousQueueTest.spec.js +130 -0
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -0
- package/target/test/xhrCore/EventTests.spec.js +155 -0
- package/target/test/xhrCore/EventTests.spec.js.map +1 -0
- package/target/test/xhrCore/FakeWebsocket.js +25 -0
- package/target/test/xhrCore/FakeWebsocket.js.map +1 -0
- package/target/test/xhrCore/FileUploadTest.spec.js +166 -0
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -0
- package/target/test/xhrCore/RequestParamsTest.spec.js +151 -0
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -0
- package/target/test/xhrCore/RequestTest.spec.js +318 -0
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -0
- package/target/test/xhrCore/ResponseTest.spec.js +257 -0
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -0
- package/target/test/xhrCore/ShadowDomTest.spec.js +122 -0
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -0
- package/target/test/xhrCore/WebsocketTest.js +182 -0
- package/target/test/xhrCore/WebsocketTest.js.map +1 -0
- package/target/test/xhrCore/XhrFormDataTest.spec.js +58 -0
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -0
- package/src/test/typescript/dumy.html +0 -10
- 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,uCAA6B;AAC7B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G,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,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
|
-
}
|