jsf.js_next_gen 4.0.4-beta.7 → 4.0.4-beta.8
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/dist/window/faces-development.js +139 -143
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +139 -143
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.map +1 -1
- package/package.json +6 -6
- package/src/main/typescript/api/_api.ts +2 -2
- package/src/main/typescript/impl/AjaxImpl.ts +5 -5
- package/src/main/typescript/impl/util/Assertions.ts +1 -1
- package/src/main/typescript/impl/util/Lang.ts +2 -2
- package/src/main/typescript/impl/util/XhrQueueController.ts +1 -1
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +1 -1
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +1 -1
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +5 -5
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +1 -1
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +1 -1
- package/src/main/typescript/myfaces/OamSubmit.ts +1 -1
- package/src/main/typescript/test/api/MyFacesABTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/LangTest.spec.ts +11 -14
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +8 -10
- package/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts +6 -2
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.ts +9 -9
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts +5 -4
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +30 -30
- package/src/main/typescript/test/impl/ImplTest.spec.ts +2 -2
- package/src/main/typescript/test/impl/ImplTest_23.spec.ts +2 -2
- package/src/main/typescript/test/impl/SeparatorCharsTest.spec.ts +2 -2
- package/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.ts +1 -1
- package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +4 -4
- package/src/main/typescript/test/myfaces/OnLoad.spec.ts +1 -1
- package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +4 -4
- package/src/main/typescript/test/xhrCore/ClientWindow.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +4 -4
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.ts +5 -5
- package/src/main/typescript/test/xhrCore/OamSubmitTest.spec.ts +4 -4
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +5 -5
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +10 -10
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +9 -9
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +23 -23
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +25 -25
- package/src/main/typescript/test/xhrCore/ShadowDomTest.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/WebsocketTest.ts +8 -8
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +10 -10
- package/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.ts +3 -3
- package/target/api/_api.js.map +1 -1
- package/target/impl/AjaxImpl.js +5 -5
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/util/XhrQueueController.js +1 -1
- package/target/impl/util/XhrQueueController.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +1 -1
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +2 -2
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +1 -1
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +1 -1
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/myfaces/OamSubmit.js +1 -1
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/test/api/MyFacesABTest.spec.js +1 -1
- package/target/test/api/MyFacesABTest.spec.js.map +1 -1
- package/target/test/frameworkBase/LangTest.spec.js +8 -11
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +3 -5
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +15 -8
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +44 -40
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +1 -1
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/impl/ImplTest_23.spec.js +1 -1
- package/target/test/impl/ImplTest_23.spec.js.map +1 -1
- package/target/test/impl/SeparatorCharsTest.spec.js +2 -2
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
- package/target/test/impl/util/ExtDomQueryTest.spec.js +1 -1
- package/target/test/impl/util/ExtDomQueryTest.spec.js.map +1 -1
- package/target/test/myfaces/OamSubmit.spec.js +4 -4
- package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
- package/target/test/myfaces/OnLoad.spec.js +1 -1
- package/target/test/myfaces/OnLoad.spec.js.map +1 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +1 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/ClientWindow.spec.js.map +1 -1
- package/target/test/xhrCore/ErrorChainTest.spec.js +1 -1
- package/target/test/xhrCore/ErrorChainTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +1 -1
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/NamespacesRequestTest.spec.js +2 -2
- package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/OamSubmitTest.spec.js +1 -1
- package/target/test/xhrCore/OamSubmitTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +2 -2
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +4 -4
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +3 -3
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +3 -2
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
- package/target/test/xhrCore/ShadowDomTest.spec.js +1 -1
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js +1 -1
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/WebsocketTest.js +2 -2
- package/target/test/xhrCore/WebsocketTest.js.map +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
- package/target/test/xhrCore/XhrRequestProgress.spec.js +1 -1
- package/target/test/xhrCore/XhrRequestProgress.spec.js.map +1 -1
- package/dist/main.js +0 -14
- package/remap.js +0 -44
- package/remap.js.map +0 -1
- package/webpack.config.js +0 -54
- package/webpack.config.js.map +0 -1
|
@@ -22,7 +22,7 @@ import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
|
22
22
|
import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
|
|
23
23
|
import {expect} from "chai";
|
|
24
24
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
25
|
-
|
|
25
|
+
const errorChainPage = StandardInits.errorChainPage;
|
|
26
26
|
import {DQ} from "mona-dish";
|
|
27
27
|
import {ErrorData} from "../../impl/xhrCore/ErrorData";
|
|
28
28
|
|
|
@@ -56,11 +56,11 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
56
56
|
this.xhr.onCreate = (xhr) => {
|
|
57
57
|
this.requests.push(xhr);
|
|
58
58
|
};
|
|
59
|
-
(
|
|
59
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
60
60
|
window.XMLHttpRequest = this.xhr;
|
|
61
61
|
|
|
62
62
|
this.closeIt = () => {
|
|
63
|
-
(
|
|
63
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
64
64
|
Implementation.reset();
|
|
65
65
|
close();
|
|
66
66
|
}
|
|
@@ -136,7 +136,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
136
136
|
|
|
137
137
|
it('must have correct source element within the error Data Object', () => {
|
|
138
138
|
const errorData = new ErrorData("form1:button1", "errorName", "errorMessage");
|
|
139
|
-
expect((
|
|
139
|
+
expect((errorData.source as Element).id).to.eq("form1:button1");
|
|
140
140
|
})
|
|
141
141
|
|
|
142
142
|
it('should have correct source id string within the error Data Object if element not existing', () => {
|
|
@@ -20,7 +20,7 @@ import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
|
20
20
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
21
21
|
|
|
22
22
|
import {expect} from "chai";
|
|
23
|
-
|
|
23
|
+
const protocolPage = StandardInits.protocolPage;
|
|
24
24
|
import {DQ} from "mona-dish";
|
|
25
25
|
import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
|
|
26
26
|
|
|
@@ -46,11 +46,11 @@ describe('tests the addOnEvent and addOnError handling', function () {
|
|
|
46
46
|
this.xhr.onCreate = (xhr) => {
|
|
47
47
|
this.requests.push(xhr);
|
|
48
48
|
};
|
|
49
|
-
(
|
|
49
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
50
50
|
window.XMLHttpRequest = this.xhr;
|
|
51
51
|
|
|
52
52
|
this.closeIt = () => {
|
|
53
|
-
(
|
|
53
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
54
54
|
Implementation.reset();
|
|
55
55
|
close();
|
|
56
56
|
}
|
|
@@ -18,7 +18,7 @@ import * as sinon from "sinon";
|
|
|
18
18
|
import {expect} from "chai";
|
|
19
19
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
20
20
|
import {_Es2019Array, DomQuery, DQ} from "mona-dish";
|
|
21
|
-
|
|
21
|
+
const defaultFileForm = StandardInits.defaultFileForm;
|
|
22
22
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
23
23
|
|
|
24
24
|
declare var faces: any;
|
|
@@ -46,14 +46,14 @@ describe('Tests on the xhr core when it starts to call the request', function ()
|
|
|
46
46
|
this.xhr.onCreate = (xhr) => {
|
|
47
47
|
this.requests.push(xhr);
|
|
48
48
|
};
|
|
49
|
-
(
|
|
49
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
50
50
|
window.XMLHttpRequest = this.xhr;
|
|
51
51
|
oldFlatMap =Array.prototype["flatMap"];
|
|
52
52
|
window["Es2019Array"] = _Es2019Array;
|
|
53
53
|
delete Array.prototype["flatMap"];
|
|
54
54
|
|
|
55
55
|
this.closeIt = () => {
|
|
56
|
-
(
|
|
56
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
57
57
|
Implementation.reset();
|
|
58
58
|
close();
|
|
59
59
|
}
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
P_VIEWSTATE,
|
|
28
28
|
P_WINDOW_ID
|
|
29
29
|
} from "../../impl/core/Const";
|
|
30
|
-
|
|
30
|
+
const defaultMyFacesNamespaces = StandardInits.defaultMyFacesNamespaces;
|
|
31
31
|
import {escape} from "querystring";
|
|
32
32
|
import {ExtLang} from "../../impl/util/Lang";
|
|
33
|
-
|
|
33
|
+
const ofAssoc = ExtLang.ofAssoc;
|
|
34
34
|
|
|
35
35
|
declare var faces: any;
|
|
36
36
|
declare var Implementation: any;
|
|
@@ -59,16 +59,16 @@ describe('Namespacing tests', function () {
|
|
|
59
59
|
this.xhr.onCreate = (xhr) => {
|
|
60
60
|
this.requests.push(xhr);
|
|
61
61
|
};
|
|
62
|
-
(
|
|
62
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
63
63
|
window.XMLHttpRequest = this.xhr;
|
|
64
64
|
|
|
65
|
-
this.jsfAjaxResponse = sinon.spy((
|
|
65
|
+
this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
|
|
66
66
|
oldFlatMap =Array.prototype["flatMap"];
|
|
67
67
|
window["Es2019Array"] = _Es2019Array;
|
|
68
68
|
delete Array.prototype["flatMap"];
|
|
69
69
|
|
|
70
70
|
this.closeIt = () => {
|
|
71
|
-
(
|
|
71
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
72
72
|
this.jsfAjaxResponse.restore();
|
|
73
73
|
Implementation.reset();
|
|
74
74
|
close();
|
|
@@ -18,7 +18,7 @@ import {describe} from "mocha";
|
|
|
18
18
|
import * as sinon from "sinon";
|
|
19
19
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
20
20
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
21
|
-
|
|
21
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
22
22
|
import {_Es2019Array, DQ, DQ$} from "mona-dish";
|
|
23
23
|
import {expect} from "chai";
|
|
24
24
|
|
|
@@ -35,16 +35,16 @@ describe('Tests for the MyFaces specifig oam submit', function () {
|
|
|
35
35
|
this.xhr.onCreate = (xhr) => {
|
|
36
36
|
this.requests.push(xhr);
|
|
37
37
|
};
|
|
38
|
-
(
|
|
38
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
39
39
|
window.XMLHttpRequest = this.xhr;
|
|
40
40
|
|
|
41
|
-
this.jsfAjaxResponse = sinon.spy((
|
|
41
|
+
this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
|
|
42
42
|
oldFlatMap =Array.prototype["flatMap"];
|
|
43
43
|
window["Es2019Array"] = _Es2019Array;
|
|
44
44
|
delete Array.prototype["flatMap"];
|
|
45
45
|
|
|
46
46
|
this.closeIt = () => {
|
|
47
|
-
(
|
|
47
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
48
48
|
this.jsfAjaxResponse.restore();
|
|
49
49
|
Implementation.reset();
|
|
50
50
|
close();
|
|
@@ -17,10 +17,10 @@ import * as sinon from "sinon";
|
|
|
17
17
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
18
18
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const protocolPage = StandardInits.protocolPage;
|
|
21
21
|
import {Config, DQ} from "mona-dish";
|
|
22
22
|
import {expect} from "chai";
|
|
23
|
-
|
|
23
|
+
const HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
|
|
24
24
|
import {it} from "mocha";
|
|
25
25
|
import {decodeEncodedValues} from "../../impl/util/FileUtils";
|
|
26
26
|
import {ExtConfig} from "../../impl/util/ExtDomQuery";
|
|
@@ -98,13 +98,13 @@ describe("test for proper request param patterns identical to the old implementa
|
|
|
98
98
|
this.xhr.onCreate = (xhr) => {
|
|
99
99
|
this.requests.push(xhr);
|
|
100
100
|
};
|
|
101
|
-
(
|
|
101
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
102
102
|
window.XMLHttpRequest = this.xhr;
|
|
103
103
|
|
|
104
|
-
this.jsfAjaxResponse = sinon.stub((
|
|
104
|
+
this.jsfAjaxResponse = sinon.stub((global as any).faces.ajax, "response");
|
|
105
105
|
|
|
106
106
|
this.closeIt = () => {
|
|
107
|
-
(
|
|
107
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
108
108
|
this.jsfAjaxResponse.restore();
|
|
109
109
|
Implementation.reset();
|
|
110
110
|
close();
|
|
@@ -29,11 +29,11 @@ import {
|
|
|
29
29
|
P_WINDOW_ID,
|
|
30
30
|
SUCCESS
|
|
31
31
|
} from "../../impl/core/Const";
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
33
|
+
const initVirtualElement = StandardInits.initVirtualElement;
|
|
34
|
+
const STD_XML = StandardInits.STD_XML;
|
|
35
35
|
import exp from "constants";
|
|
36
|
-
|
|
36
|
+
const initCheckboxForm = StandardInits.initCheckboxRadioForm;
|
|
37
37
|
|
|
38
38
|
declare var faces: any;
|
|
39
39
|
declare var Implementation: any;
|
|
@@ -87,16 +87,16 @@ describe('Tests on the xhr core when it starts to call the request', function ()
|
|
|
87
87
|
this.xhr.onCreate = (xhr) => {
|
|
88
88
|
this.requests.push(xhr);
|
|
89
89
|
};
|
|
90
|
-
(
|
|
90
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
91
91
|
window.XMLHttpRequest = this.xhr;
|
|
92
92
|
|
|
93
|
-
this.jsfAjaxResponse = sinon.spy((
|
|
93
|
+
this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
|
|
94
94
|
oldFlatMap =Array.prototype["flatMap"];
|
|
95
95
|
window["Es2019Array"] = _Es2019Array;
|
|
96
96
|
delete Array.prototype["flatMap"];
|
|
97
97
|
|
|
98
98
|
this.closeIt = () => {
|
|
99
|
-
(
|
|
99
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
100
100
|
this.jsfAjaxResponse.restore();
|
|
101
101
|
Implementation.reset();
|
|
102
102
|
close();
|
|
@@ -230,14 +230,14 @@ describe('Tests after core when it hits response', function () {
|
|
|
230
230
|
this.xhr.onCreate = (xhr) => {
|
|
231
231
|
this.requests.push(xhr);
|
|
232
232
|
};
|
|
233
|
-
(
|
|
233
|
+
(global as any).XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
|
|
234
234
|
// @ts-ignore
|
|
235
235
|
window.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest() as XMLHttpRequest;
|
|
236
236
|
|
|
237
|
-
this.jsfAjaxResponse = sinon.spy((
|
|
237
|
+
this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
|
|
238
238
|
|
|
239
239
|
this.closeIt = () => {
|
|
240
|
-
(
|
|
240
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
241
241
|
this.jsfAjaxResponse.restore();
|
|
242
242
|
Implementation.reset();
|
|
243
243
|
close();
|
|
@@ -63,9 +63,9 @@ let {
|
|
|
63
63
|
} = remapNamespacesFor23();
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const STD_XML = StandardInits.STD_XML;
|
|
67
|
+
const defaultMyFaces23 = StandardInits.defaultMyFaces23;
|
|
68
|
+
const HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
|
|
69
69
|
|
|
70
70
|
declare var jsf: any;
|
|
71
71
|
declare var Implementation: any;
|
|
@@ -94,13 +94,13 @@ describe('Tests on the xhr core when it starts to call the request', function ()
|
|
|
94
94
|
this.xhr.onCreate = (xhr) => {
|
|
95
95
|
this.requests.push(xhr);
|
|
96
96
|
};
|
|
97
|
-
(
|
|
97
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
98
98
|
window.XMLHttpRequest = this.xhr;
|
|
99
99
|
|
|
100
|
-
this.jsfAjaxResponse = sinon.spy((
|
|
100
|
+
this.jsfAjaxResponse = sinon.spy((global as any).jsf.ajax, "response");
|
|
101
101
|
|
|
102
102
|
this.closeIt = () => {
|
|
103
|
-
(
|
|
103
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
104
104
|
this.jsfAjaxResponse.restore();
|
|
105
105
|
Implementation.reset();
|
|
106
106
|
close();
|
|
@@ -198,15 +198,15 @@ describe('Tests after core when it hits response', function () {
|
|
|
198
198
|
this.xhr.onCreate = (xhr) => {
|
|
199
199
|
this.requests.push(xhr);
|
|
200
200
|
};
|
|
201
|
-
(
|
|
201
|
+
(global as any).XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
|
|
202
202
|
|
|
203
203
|
// @ts-ignore
|
|
204
204
|
window.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest() as XMLHttpRequest;
|
|
205
205
|
|
|
206
|
-
this.jsfAjaxResponse = sinon.spy((
|
|
206
|
+
this.jsfAjaxResponse = sinon.spy((global as any).jsf.ajax, "response");
|
|
207
207
|
|
|
208
208
|
this.closeIt = () => {
|
|
209
|
-
(
|
|
209
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
210
210
|
this.jsfAjaxResponse.restore();
|
|
211
211
|
Implementation.reset();
|
|
212
212
|
close();
|
|
@@ -22,7 +22,7 @@ import * as sinon from "sinon";
|
|
|
22
22
|
import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
|
|
23
23
|
import {expect} from "chai";
|
|
24
24
|
import {_Es2019Array, DomQuery, DQ, DQ$} from "mona-dish";
|
|
25
|
-
|
|
25
|
+
const protocolPage = StandardInits.protocolPage;
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
declare var faces: any;
|
|
@@ -53,14 +53,14 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
53
53
|
this.xhr.onCreate = (xhr) => {
|
|
54
54
|
this.requests.push(xhr);
|
|
55
55
|
};
|
|
56
|
-
(
|
|
56
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
57
57
|
window.XMLHttpRequest = this.xhr;
|
|
58
58
|
oldFlatMap =Array.prototype["flatMap"];
|
|
59
59
|
window["Es2019Array"] = _Es2019Array;
|
|
60
60
|
delete Array.prototype["flatMap"];
|
|
61
61
|
|
|
62
62
|
this.closeIt = () => {
|
|
63
|
-
(
|
|
63
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
64
64
|
Implementation.reset();
|
|
65
65
|
close();
|
|
66
66
|
}
|
|
@@ -86,19 +86,19 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
86
86
|
.value.indexOf("update succeeded 1") != -1)
|
|
87
87
|
.to.be.true;
|
|
88
88
|
|
|
89
|
-
let pos1 = (
|
|
90
|
-
.value).indexOf("insert before succeeded should display before test1");
|
|
91
|
-
let pos3 = (
|
|
92
|
-
.value).indexOf("insert after succeeded should display after test1");
|
|
93
|
-
let pos2 = (
|
|
94
|
-
.value).indexOf("update succeeded 1");
|
|
89
|
+
let pos1 = (DQ.byId(document.body).html()
|
|
90
|
+
.value as string).indexOf("insert before succeeded should display before test1");
|
|
91
|
+
let pos3 = (DQ.byId(document.body).html()
|
|
92
|
+
.value as string).indexOf("insert after succeeded should display after test1");
|
|
93
|
+
let pos2 = (DQ.byId(document.body).html()
|
|
94
|
+
.value as string).indexOf("update succeeded 1");
|
|
95
95
|
|
|
96
96
|
expect(pos1 != -1).to.be.true;
|
|
97
97
|
|
|
98
98
|
expect(pos1 < pos2 && pos2 < pos3).to.be.true;
|
|
99
99
|
|
|
100
|
-
let pos4 = (
|
|
101
|
-
.value).indexOf("embedded script at update succeed");
|
|
100
|
+
let pos4 = (DQ.byId(document.body).html()
|
|
101
|
+
.value as string).indexOf("embedded script at update succeed");
|
|
102
102
|
|
|
103
103
|
expect(pos4 != -1).to.be.true;
|
|
104
104
|
|
|
@@ -117,19 +117,19 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
117
117
|
.value.indexOf("update succeeded 2") != -1)
|
|
118
118
|
.to.be.true;
|
|
119
119
|
|
|
120
|
-
let pos1 = (
|
|
121
|
-
.value).indexOf("insert before succeeded should display before test1");
|
|
122
|
-
let pos3 = (
|
|
123
|
-
.value).indexOf("insert after succeeded should display after test1");
|
|
124
|
-
let pos2 = (
|
|
125
|
-
.value).indexOf("update succeeded 2");
|
|
120
|
+
let pos1 = (DQ.byId(document.body).html()
|
|
121
|
+
.value as string).indexOf("insert before succeeded should display before test1");
|
|
122
|
+
let pos3 = (DQ.byId(document.body).html()
|
|
123
|
+
.value as string).indexOf("insert after succeeded should display after test1");
|
|
124
|
+
let pos2 = (DQ.byId(document.body).html()
|
|
125
|
+
.value as string).indexOf("update succeeded 2");
|
|
126
126
|
|
|
127
127
|
expect(pos1 != -1).to.be.true;
|
|
128
128
|
|
|
129
129
|
expect(pos1 < pos2 && pos2 < pos3).to.be.true;
|
|
130
130
|
|
|
131
|
-
let pos4 = (
|
|
132
|
-
.value).indexOf("embedded script at update succeed");
|
|
131
|
+
let pos4 = (DQ.byId(document.body).html()
|
|
132
|
+
.value as string).indexOf("embedded script at update succeed");
|
|
133
133
|
|
|
134
134
|
expect(pos4 != -1).to.be.true;
|
|
135
135
|
|
|
@@ -142,7 +142,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
142
142
|
|
|
143
143
|
//basic replacement
|
|
144
144
|
let newBody = DQ.byId(document.body);
|
|
145
|
-
let newContent =
|
|
145
|
+
let newContent = newBody.html().value as string;
|
|
146
146
|
//standard replacement successful
|
|
147
147
|
expect(newContent.indexOf("<h3>Body replacement test successful</h3>") != -1,
|
|
148
148
|
"elements must be updated").to.be.true;
|
|
@@ -165,7 +165,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
165
165
|
|
|
166
166
|
//basic replacement
|
|
167
167
|
let newBody = DQ.byId(document.body);
|
|
168
|
-
let newContent =
|
|
168
|
+
let newContent = newBody.html().value as string;
|
|
169
169
|
|
|
170
170
|
//standard replacement successful
|
|
171
171
|
//script eval
|
|
@@ -182,7 +182,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
182
182
|
//basic replacement
|
|
183
183
|
let newHead = DQ.byId(document.head);
|
|
184
184
|
let newBody = DQ.byId(document.body);
|
|
185
|
-
let newContent =
|
|
185
|
+
let newContent = newBody.html().value as string;
|
|
186
186
|
|
|
187
187
|
expect(newHead.isPresent(), " head must exist ").to.be.true;
|
|
188
188
|
|
|
@@ -227,7 +227,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
227
227
|
DQ.byId("cmd_eval").click();
|
|
228
228
|
this.respond(XmlResponses.EVAL_1);
|
|
229
229
|
|
|
230
|
-
let resultHTML: string =
|
|
230
|
+
let resultHTML: string = DQ.byId(document.body).html().value as string;
|
|
231
231
|
expect(resultHTML.indexOf('eval test succeeded') != -1).to.be.true;
|
|
232
232
|
|
|
233
233
|
});
|
|
@@ -21,11 +21,11 @@ import * as sinon from "sinon";
|
|
|
21
21
|
|
|
22
22
|
import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
|
|
23
23
|
import {expect} from "chai";
|
|
24
|
-
|
|
24
|
+
const protocolPage = StandardInits.protocolPage;
|
|
25
25
|
import {DQ, DQ$} from "mona-dish";
|
|
26
26
|
import {$nsp} from "../../impl/core/Const";
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const STD_XML = StandardInits.STD_XML;
|
|
28
|
+
const HTML_PREFIX_EMBEDDED_BODY = StandardInits.HTML_PREFIX_EMBEDDED_BODY;
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
declare var jsf: any;
|
|
@@ -57,11 +57,11 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
57
57
|
this.xhr.onCreate = (xhr) => {
|
|
58
58
|
this.requests.push(xhr);
|
|
59
59
|
};
|
|
60
|
-
(
|
|
60
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
61
61
|
window.XMLHttpRequest = this.xhr;
|
|
62
62
|
|
|
63
63
|
this.closeIt = () => {
|
|
64
|
-
(
|
|
64
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
65
65
|
Implementation.reset();
|
|
66
66
|
close();
|
|
67
67
|
}
|
|
@@ -83,19 +83,19 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
83
83
|
.value.indexOf("update succeeded 1") != -1)
|
|
84
84
|
.to.be.true;
|
|
85
85
|
|
|
86
|
-
let pos1 = (
|
|
87
|
-
.value).indexOf("insert before succeeded should display before test1");
|
|
88
|
-
let pos3 = (
|
|
89
|
-
.value).indexOf("insert after succeeded should display after test1");
|
|
90
|
-
let pos2 = (
|
|
91
|
-
.value).indexOf("update succeeded 1");
|
|
86
|
+
let pos1 = (DQ.byId(document.body).html()
|
|
87
|
+
.value as string).indexOf("insert before succeeded should display before test1");
|
|
88
|
+
let pos3 = (DQ.byId(document.body).html()
|
|
89
|
+
.value as string).indexOf("insert after succeeded should display after test1");
|
|
90
|
+
let pos2 = (DQ.byId(document.body).html()
|
|
91
|
+
.value as string).indexOf("update succeeded 1");
|
|
92
92
|
|
|
93
93
|
expect(pos1 != -1).to.be.true;
|
|
94
94
|
|
|
95
95
|
expect(pos1 < pos2 && pos2 < pos3).to.be.true;
|
|
96
96
|
|
|
97
|
-
let pos4 = (
|
|
98
|
-
.value).indexOf("embedded script at update succeed");
|
|
97
|
+
let pos4 = (DQ.byId(document.body).html()
|
|
98
|
+
.value as string).indexOf("embedded script at update succeed");
|
|
99
99
|
|
|
100
100
|
expect(pos4 != -1).to.be.true;
|
|
101
101
|
|
|
@@ -114,19 +114,19 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
114
114
|
.value.indexOf("update succeeded 2") != -1)
|
|
115
115
|
.to.be.true;
|
|
116
116
|
|
|
117
|
-
let pos1 = (
|
|
118
|
-
.value).indexOf("insert before succeeded should display before test1");
|
|
119
|
-
let pos3 = (
|
|
120
|
-
.value).indexOf("insert after succeeded should display after test1");
|
|
121
|
-
let pos2 = (
|
|
122
|
-
.value).indexOf("update succeeded 2");
|
|
117
|
+
let pos1 = (DQ.byId(document.body).html()
|
|
118
|
+
.value as string).indexOf("insert before succeeded should display before test1");
|
|
119
|
+
let pos3 = (DQ.byId(document.body).html()
|
|
120
|
+
.value as string).indexOf("insert after succeeded should display after test1");
|
|
121
|
+
let pos2 = (DQ.byId(document.body).html()
|
|
122
|
+
.value as string).indexOf("update succeeded 2");
|
|
123
123
|
|
|
124
124
|
expect(pos1 != -1).to.be.true;
|
|
125
125
|
|
|
126
126
|
expect(pos1 < pos2 && pos2 < pos3).to.be.true;
|
|
127
127
|
|
|
128
|
-
let pos4 = (
|
|
129
|
-
.value).indexOf("embedded script at update succeed");
|
|
128
|
+
let pos4 = (DQ.byId(document.body).html()
|
|
129
|
+
.value as string).indexOf("embedded script at update succeed");
|
|
130
130
|
|
|
131
131
|
expect(pos4 != -1).to.be.true;
|
|
132
132
|
|
|
@@ -139,7 +139,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
139
139
|
|
|
140
140
|
//basic replacement
|
|
141
141
|
let newBody = DQ.byId(document.body);
|
|
142
|
-
let newContent =
|
|
142
|
+
let newContent = newBody.html().value as string;
|
|
143
143
|
//standard replacement successful
|
|
144
144
|
expect(newContent.indexOf("<h3>Body replacement test successful</h3>") != -1,
|
|
145
145
|
"elements must be updated").to.be.true;
|
|
@@ -161,7 +161,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
161
161
|
|
|
162
162
|
//basic replacement
|
|
163
163
|
let newBody = DQ.byId(document.body);
|
|
164
|
-
let newContent =
|
|
164
|
+
let newContent = newBody.html().value as string;
|
|
165
165
|
|
|
166
166
|
//standard replacement successful
|
|
167
167
|
//script eval
|
|
@@ -178,7 +178,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
178
178
|
//basic replacement
|
|
179
179
|
let newHead = DQ.byId(document.head);
|
|
180
180
|
let newBody = DQ.byId(document.body);
|
|
181
|
-
let newContent =
|
|
181
|
+
let newContent = newBody.html().value as string;
|
|
182
182
|
|
|
183
183
|
expect(newHead.isPresent(), " head must exist ").to.be.true;
|
|
184
184
|
|
|
@@ -223,7 +223,7 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
223
223
|
DQ.byId("cmd_eval").click();
|
|
224
224
|
this.respond(XmlResponses.EVAL_1);
|
|
225
225
|
|
|
226
|
-
let resultHTML: string =
|
|
226
|
+
let resultHTML: string = DQ.byId(document.body).html().value as string;
|
|
227
227
|
expect(resultHTML.indexOf('eval test succeeded') != -1).to.be.true;
|
|
228
228
|
|
|
229
229
|
});
|
|
@@ -23,7 +23,7 @@ import * as sinon from "sinon";
|
|
|
23
23
|
import {XmlResponses} from "../frameworkBase/_ext/shared/XmlResponses";
|
|
24
24
|
import {expect} from "chai";
|
|
25
25
|
import {DomQuery} from "mona-dish";
|
|
26
|
-
|
|
26
|
+
const shadowDomMyFaces = StandardInits.shadowDomMyFaces;
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
sinon.reset();
|
|
@@ -50,11 +50,11 @@ describe('shadow dom testsuite', () => {
|
|
|
50
50
|
this.xhr.onCreate = (xhr) => {
|
|
51
51
|
this.requests.push(xhr);
|
|
52
52
|
};
|
|
53
|
-
(
|
|
53
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
54
54
|
window.XMLHttpRequest = this.xhr;
|
|
55
55
|
|
|
56
56
|
this.closeIt = () => {
|
|
57
|
-
(
|
|
57
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
58
58
|
Implementation.reset();
|
|
59
59
|
close();
|
|
60
60
|
}
|
|
@@ -19,7 +19,7 @@ import {expect} from "chai";
|
|
|
19
19
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
20
20
|
import {_Es2019Array, DomQuery} from "mona-dish";
|
|
21
21
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
22
|
-
|
|
22
|
+
const defaultFileForm = StandardInits.tobagoFileForm;
|
|
23
23
|
|
|
24
24
|
declare var faces: any;
|
|
25
25
|
|
|
@@ -46,14 +46,14 @@ describe('Tests on the xhr core when it starts to call the request', function ()
|
|
|
46
46
|
this.xhr.onCreate = (xhr) => {
|
|
47
47
|
this.requests.push(xhr);
|
|
48
48
|
};
|
|
49
|
-
(
|
|
49
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
50
50
|
window.XMLHttpRequest = this.xhr;
|
|
51
51
|
oldFlatMap =Array.prototype["flatMap"];
|
|
52
52
|
window["Es2019Array"] = _Es2019Array;
|
|
53
53
|
delete Array.prototype["flatMap"];
|
|
54
54
|
|
|
55
55
|
this.closeIt = () => {
|
|
56
|
-
(
|
|
56
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
57
57
|
Implementation.reset();
|
|
58
58
|
close();
|
|
59
59
|
if(oldFlatMap) {
|
|
@@ -20,10 +20,10 @@ import {Implementation} from "../../impl/AjaxImpl";
|
|
|
20
20
|
|
|
21
21
|
import {expect} from "chai";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
24
24
|
import {_Es2019Array, Lang} from "mona-dish";
|
|
25
25
|
import {FakeWebsocket} from "./FakeWebsocket";
|
|
26
|
-
|
|
26
|
+
const assertType = Lang.assertType;
|
|
27
27
|
|
|
28
28
|
declare var faces: any;
|
|
29
29
|
|
|
@@ -40,27 +40,27 @@ describe('Tests the jsf websocket client side api on high level (generic test wi
|
|
|
40
40
|
this.xhr.onCreate = (xhr) => {
|
|
41
41
|
this.requests.push(xhr);
|
|
42
42
|
};
|
|
43
|
-
(
|
|
43
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
44
44
|
window.XMLHttpRequest = this.xhr;
|
|
45
45
|
|
|
46
|
-
this.jsfAjaxResponse = sinon.stub((
|
|
46
|
+
this.jsfAjaxResponse = sinon.stub((global as any).faces.ajax, "response");
|
|
47
47
|
|
|
48
48
|
this.fakeWebsocket = new FakeWebsocket();
|
|
49
49
|
this.socket = sinon.stub(window, 'WebSocket').returns(this.fakeWebsocket);
|
|
50
|
-
(
|
|
50
|
+
(global as any).WebSocket = this.socket;
|
|
51
51
|
|
|
52
|
-
this.pushImpl = (
|
|
52
|
+
this.pushImpl = (global as any).PushImpl;
|
|
53
53
|
this.initSpy = sinon.spy(this.pushImpl, "init");
|
|
54
54
|
oldFlatMap =Array.prototype["flatMap"];
|
|
55
55
|
window["Es2019Array"] = _Es2019Array;
|
|
56
56
|
delete Array.prototype["flatMap"];
|
|
57
57
|
|
|
58
58
|
this.closeIt = () => {
|
|
59
|
-
(
|
|
59
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
60
60
|
this.jsfAjaxResponse.restore();
|
|
61
61
|
this.socket.restore();
|
|
62
62
|
this.initSpy.restore();
|
|
63
|
-
delete (
|
|
63
|
+
delete (global as any).WebSocket;
|
|
64
64
|
Implementation.reset();
|
|
65
65
|
close();
|
|
66
66
|
}
|