jsf.js_next_gen 4.0.4-beta.6 → 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/docs/functions/myfaces.ab.html +8 -3
- package/dist/window/faces-development.js +157 -147
- 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 +157 -147
- 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/@types/definitions/index.d.ts +1 -1
- package/src/main/typescript/api/_api.ts +31 -15
- 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 +2 -2
- 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 +117 -0
- 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 +5 -5
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +4 -4
- 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 +24 -24
- 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 +17 -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 +2 -2
- 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 +117 -0
- package/target/test/api/MyFacesABTest.spec.js.map +1 -0
- 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 +2 -2
- package/target/test/xhrCore/ErrorChainTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +2 -2
- 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 +2 -2
- 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/webpack.config.ts +2 -2
- package/faulty_response.html +0 -167
- package/pom.xml +0 -68
- package/remap.js +0 -43
- package/remap.js.map +0 -1
- package/target/classes/application.properties +0 -1
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +0 -4
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +0 -4
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +0 -1
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +0 -1
- package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +0 -76
- package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +0 -7
- package/target/test-classes/.gz +0 -0
- package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
- package/target/test-classes/fileuploadtest.html +0 -24
- package/target/test-classes/jsf-development.js +0 -3559
- package/target/test-classes/jsf-development.js.br +0 -0
- package/target/test-classes/jsf-development.js.gz +0 -0
- package/target/test-classes/jsf-development.js.map +0 -1
- package/target/test-classes/jsf.js +0 -3
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/webpack.config.js +0 -54
- package/webpack.config.js.map +0 -1
|
@@ -512,19 +512,19 @@ function triggerRequestChain(event) {
|
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
export function standardInit(scope: any, initFunc: (boolean) => Promise<() => void> = defaultHtml): Promise<any> {
|
|
515
|
-
(
|
|
515
|
+
(global as any).navigator = {
|
|
516
516
|
language: "en-En"
|
|
517
517
|
};
|
|
518
518
|
return initFunc(false).then((closeFunc: Function) => {
|
|
519
|
-
(
|
|
519
|
+
(scope as any).currentTest.closeIt = () => {
|
|
520
520
|
closeFunc();
|
|
521
|
-
delete (
|
|
521
|
+
delete (global as any).navigator;
|
|
522
522
|
}
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
export function standardClose(scope: any) {
|
|
527
|
-
(
|
|
527
|
+
(scope as any).currentTest.closeIt();
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
export function defaultHtml(withJsf = true): Promise<() => void> {
|
|
@@ -564,7 +564,7 @@ function triggerRequestChain(event) {
|
|
|
564
564
|
|
|
565
565
|
export function shadowDomMyFaces(withJsf = true): Promise<() => void> {
|
|
566
566
|
return <Promise<() => void>>init(HTML_SHADOW, withJsf).then((close) => {
|
|
567
|
-
let shadow = DomQuery.byId(
|
|
567
|
+
let shadow = DomQuery.byId(window.document as any).byId("shadowDomArea").attachShadow();
|
|
568
568
|
shadow.innerHtml = `
|
|
569
569
|
<input type="button" id="input_3" name="input_3" value="input_3_val" ></input>
|
|
570
570
|
<div id="shadowContent">before update</div>
|
|
@@ -605,28 +605,28 @@ function triggerRequestChain(event) {
|
|
|
605
605
|
* @param Implementation
|
|
606
606
|
*/
|
|
607
607
|
let applyJsfToGlobals = function (data, Implementation, PushImpl) {
|
|
608
|
-
(
|
|
609
|
-
(
|
|
610
|
-
(
|
|
611
|
-
(
|
|
612
|
-
(
|
|
613
|
-
(
|
|
608
|
+
(global as any).faces = data.faces;
|
|
609
|
+
(global as any).myfaces = data.myfaces;
|
|
610
|
+
(global as any).window.faces = data.faces;
|
|
611
|
+
(global as any).window.myfaces = data.myfaces;
|
|
612
|
+
(global as any).Implementation = Implementation.Implementation;
|
|
613
|
+
(global as any).PushImpl = PushImpl.PushImpl;
|
|
614
614
|
//bypass a bug on windows jsdom, domparser not an auto global but on window only
|
|
615
|
-
(
|
|
616
|
-
(
|
|
615
|
+
(global as any).DOMParser = (global as any)?.DOMParser ?? window.DOMParser;
|
|
616
|
+
(global as any).document = (global as any)?.document ?? window.document;
|
|
617
617
|
};
|
|
618
618
|
|
|
619
619
|
let applyJsfToGlobals23 = function (data, Implementation, PushImpl) {
|
|
620
|
-
(
|
|
621
|
-
(
|
|
622
|
-
(
|
|
623
|
-
(
|
|
624
|
-
(
|
|
625
|
-
(
|
|
626
|
-
(
|
|
620
|
+
(global as any).jsf = data.jsf;
|
|
621
|
+
(global as any).myfaces = data.myfaces;
|
|
622
|
+
(global as any).window.jsf = data.jsf;
|
|
623
|
+
(global as any).window.myfaces = data.myfaces;
|
|
624
|
+
(global as any).Implementation = Implementation.Implementation;
|
|
625
|
+
(global as any).window.Implementation = Implementation.Implementation;
|
|
626
|
+
(global as any).PushImpl = PushImpl.PushImpl;
|
|
627
627
|
//bypass a bug on windows jsdom, domparser not an auto global but on window only
|
|
628
|
-
(
|
|
629
|
-
(
|
|
628
|
+
(global as any).DOMParser = (global as any)?.DOMParser ?? window.DOMParser;
|
|
629
|
+
(global as any).document = (global as any)?.document ?? window.document;
|
|
630
630
|
};
|
|
631
631
|
|
|
632
632
|
|
|
@@ -670,14 +670,14 @@ function triggerRequestChain(event) {
|
|
|
670
670
|
* lets clean up some old data which might interfere
|
|
671
671
|
*/
|
|
672
672
|
let resetGlobals = function () {
|
|
673
|
-
(
|
|
674
|
-
(
|
|
675
|
-
|
|
676
|
-
((
|
|
677
|
-
((
|
|
678
|
-
delete (
|
|
679
|
-
((
|
|
680
|
-
delete (
|
|
673
|
+
(global as any)?.Implementation?.reset();
|
|
674
|
+
(global as any)?.PushImpl?.reset();
|
|
675
|
+
|
|
676
|
+
((global as any).faces) ? delete (global as any).faces : null;
|
|
677
|
+
((global as any).jsf) ? delete (global as any).jsf : null;
|
|
678
|
+
delete (global as any).myfaces;
|
|
679
|
+
((global as any).Implementation) ? delete (global as any).Implementation : null;
|
|
680
|
+
delete (global as any).PushImpl;
|
|
681
681
|
};
|
|
682
682
|
|
|
683
683
|
/**
|
|
@@ -21,7 +21,7 @@ import * as sinon from 'sinon';
|
|
|
21
21
|
|
|
22
22
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
23
23
|
import {CTX_PARAM_REQ_PASS_THR, P_EXECUTE, P_RENDER} from "../../impl/core/Const";
|
|
24
|
-
|
|
24
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
25
25
|
import {_Es2019Array} from "mona-dish";
|
|
26
26
|
|
|
27
27
|
|
|
@@ -77,7 +77,7 @@ describe('faces.ajax.request test suite', () => {
|
|
|
77
77
|
|
|
78
78
|
expect(addRequestToQueue.called).to.be.true;
|
|
79
79
|
expect(addRequestToQueue.callCount).to.eq(1);
|
|
80
|
-
const context = (
|
|
80
|
+
const context = (addRequestToQueue.args[0][2] as Config);
|
|
81
81
|
|
|
82
82
|
expect(context.getIf(CTX_PARAM_REQ_PASS_THR, P_RENDER).value).eq("@all");
|
|
83
83
|
//Execute issuing form due to @form and always the issuing element
|
|
@@ -21,7 +21,7 @@ import * as sinon from 'sinon';
|
|
|
21
21
|
|
|
22
22
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
23
23
|
import {CTX_PARAM_REQ_PASS_THR, P_EXECUTE, P_RENDER} from "../../impl/core/Const";
|
|
24
|
-
|
|
24
|
+
const defaultMyFaces23 = StandardInits.defaultMyFaces23;
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
sinon.reset();
|
|
@@ -58,7 +58,7 @@ describe('javax.ajax.request test suite', () => {
|
|
|
58
58
|
|
|
59
59
|
expect(addRequestToQueue.called).to.be.true;
|
|
60
60
|
expect(addRequestToQueue.callCount).to.eq(1);
|
|
61
|
-
const context = (
|
|
61
|
+
const context = (addRequestToQueue.args[0][2] as Config);
|
|
62
62
|
|
|
63
63
|
expect(context.getIf(CTX_PARAM_REQ_PASS_THR, P_RENDER).value).eq("@all");
|
|
64
64
|
//Execute issuing form due to @form and always the issuing element
|
|
@@ -18,8 +18,8 @@ import {describe, it} from 'mocha';
|
|
|
18
18
|
import {expect} from 'chai';
|
|
19
19
|
import * as sinon from 'sinon';
|
|
20
20
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
22
|
+
const defaultSeparatorChar = StandardInits.defaultSeparatorChar;
|
|
23
23
|
|
|
24
24
|
sinon.reset();
|
|
25
25
|
|
|
@@ -19,7 +19,7 @@ import {expect} from 'chai';
|
|
|
19
19
|
|
|
20
20
|
import {ExtDomQuery} from "../../../impl/util/ExtDomQuery";
|
|
21
21
|
import {StandardInits} from "../../frameworkBase/_ext/shared/StandardInits";
|
|
22
|
-
|
|
22
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
23
23
|
import Sinon from "sinon";
|
|
24
24
|
|
|
25
25
|
declare var faces: any;
|
|
@@ -18,12 +18,12 @@ import {describe, it} from "mocha";
|
|
|
18
18
|
|
|
19
19
|
import {expect} from "chai";
|
|
20
20
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
21
|
-
|
|
21
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
22
22
|
import {oam} from "../../myfaces/OamSubmit";
|
|
23
|
-
|
|
23
|
+
const setHiddenInput = oam.setHiddenInput;
|
|
24
24
|
import {DomQuery} from "mona-dish";
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const clearHiddenInput = oam.clearHiddenInput;
|
|
26
|
+
const submitForm = oam.submitForm;
|
|
27
27
|
import Sinon, {spy} from "sinon";
|
|
28
28
|
|
|
29
29
|
|
|
@@ -18,7 +18,7 @@ import {describe, it} from "mocha";
|
|
|
18
18
|
|
|
19
19
|
import {expect} from "chai";
|
|
20
20
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
21
|
-
|
|
21
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -21,7 +21,7 @@ import {ProbeClass} from "./AsynchronousProbe";
|
|
|
21
21
|
|
|
22
22
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
23
23
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
24
|
-
|
|
24
|
+
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
25
25
|
import {XhrQueueController} from "../../impl/util/XhrQueueController";
|
|
26
26
|
|
|
27
27
|
describe('Asynchronous Queue tests', () => {
|
|
@@ -38,13 +38,13 @@ describe('Asynchronous Queue tests', () => {
|
|
|
38
38
|
this.xhr.onCreate = (xhr) => {
|
|
39
39
|
this.requests.push(xhr);
|
|
40
40
|
};
|
|
41
|
-
(
|
|
41
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
42
42
|
window.XMLHttpRequest = this.xhr;
|
|
43
43
|
|
|
44
|
-
this.jsfAjaxResponse = sinon.stub((
|
|
44
|
+
this.jsfAjaxResponse = sinon.stub((global as any).faces.ajax, "response");
|
|
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();
|
|
@@ -21,13 +21,13 @@ describe('adds a getClientWindowTests', function () {
|
|
|
21
21
|
this.xhr.onCreate = (xhr) => {
|
|
22
22
|
this.requests.push(xhr);
|
|
23
23
|
};
|
|
24
|
-
(
|
|
24
|
+
(global as any).XMLHttpRequest = this.xhr;
|
|
25
25
|
window.XMLHttpRequest = this.xhr;
|
|
26
26
|
|
|
27
|
-
this.jsfAjaxResponse = sinon.spy((
|
|
27
|
+
this.jsfAjaxResponse = sinon.spy((global as any).faces.ajax, "response");
|
|
28
28
|
|
|
29
29
|
this.closeIt = () => {
|
|
30
|
-
(
|
|
30
|
+
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
31
31
|
this.jsfAjaxResponse.restore();
|
|
32
32
|
Implementation.reset();
|
|
33
33
|
close();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* contributor license agreements. See the NOTICE file distributed with
|
|
3
3
|
* this work for additional information regarding copyright ownership.
|
|
4
4
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
5
|
-
* (the "License"); you may not use this file
|
|
5
|
+
* (the "License"); you may not use this file except in compliance with
|
|
6
6
|
* the License. You may obtain a copy of the License at
|
|
7
7
|
*
|
|
8
8
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -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
|
}
|
|
@@ -111,7 +111,7 @@ describe('tests the addOnEvent and addOnError handling', function () {
|
|
|
111
111
|
expect(onErrorCalled1).to.eq(1);
|
|
112
112
|
expect(onErrorCalled2).to.eq(1);
|
|
113
113
|
expect(errorTitle).to.eq('Erro21');
|
|
114
|
-
expect(errorMessage).to.eq('Error2 Text');
|
|
114
|
+
expect(errorMessage).to.eq('serverError: Error2 Text');
|
|
115
115
|
} finally {
|
|
116
116
|
console.error = oldErr;
|
|
117
117
|
}
|
|
@@ -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();
|