jsf.js_next_gen 1.0.0-beta-19 → 4.0.0-RC-1
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 +2 -1
- package/.nyc_output/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
- package/.nyc_output/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
- package/.nyc_output/processinfo/2303b649-59d9-485c-9228-73b0ec8787a7.json +1 -0
- package/.nyc_output/processinfo/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/.nycrc +2 -1
- package/README.md +81 -24
- package/dist/docs/assets/highlight.css +21 -0
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +34 -2
- package/dist/docs/functions/{jsf.ajax.addOnError.html → faces.ajax.addOnError.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.addOnEvent.html → faces.ajax.addOnEvent.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.request.html → faces.ajax.request.html} +15 -13
- package/dist/docs/functions/{jsf.ajax.response.html → faces.ajax.response.html} +15 -13
- package/dist/docs/functions/{jsf.getClientWindow.html → faces.getClientWindow.html} +17 -14
- package/dist/docs/functions/{jsf.getProjectStage.html → faces.getProjectStage.html} +18 -15
- package/dist/docs/functions/{jsf.getViewState.html → faces.getViewState.html} +18 -15
- package/dist/docs/functions/{jsf.push.close.html → faces.push.close.html} +15 -13
- package/dist/docs/functions/{jsf.push.init.html → faces.push.init.html} +29 -19
- package/dist/docs/functions/{jsf.push.open.html → faces.push.open.html} +15 -13
- package/dist/docs/functions/{jsf.util.chain.html → faces.util.chain.html} +12 -10
- package/dist/docs/functions/myfaces.ab.html +10 -8
- package/dist/docs/index.html +74 -29
- package/dist/docs/modules/{jsf.ajax.html → faces.ajax.html} +18 -16
- package/dist/docs/modules/faces.html +75 -0
- package/dist/docs/modules/{jsf.push.html → faces.push.html} +16 -14
- package/dist/docs/modules/{jsf.util.html → faces.util.html} +12 -10
- package/dist/docs/modules/myfaces.html +8 -6
- package/dist/docs/modules.html +9 -7
- package/dist/docs/variables/faces.contextpath.html +57 -0
- package/dist/docs/variables/{jsf.implversion.html → faces.implversion.html} +17 -14
- package/dist/docs/variables/{jsf.separatorchar.html → faces.separatorchar.html} +18 -15
- package/dist/docs/variables/faces.specversion.html +64 -0
- package/dist/docs/variables/myfaces.oam.html +8 -6
- package/dist/window/faces-development.js +7688 -0
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -0
- package/dist/window/faces.js +3 -0
- package/dist/window/faces.js.LICENSE.txt +87 -0
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -0
- package/dist/window/jsf-development.js +3043 -3018
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +2 -1
- package/dist/window/jsf.js.LICENSE.txt +87 -0
- 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/package.json +12 -12
- package/pom.xml +14 -0
- package/src/main/java/com/example/jsfs_js_ts/DecoratedFacesJS.java +94 -0
- package/src/main/java/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.java +54 -0
- package/src/main/java/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.java +57 -0
- package/src/main/java/com/example/jsfs_js_ts/FacesJSMappingDecorator.java +138 -0
- package/src/main/typescript/@types/definitions/index.d.ts +147 -0
- package/src/main/typescript/api/{Jsf.ts → _api.ts} +61 -49
- package/src/main/typescript/api/faces.ts +44 -0
- package/src/main/typescript/api/jsf.ts +43 -0
- package/src/main/typescript/impl/AjaxImpl.ts +39 -42
- package/src/main/typescript/impl/PushImpl.ts +27 -30
- package/src/main/typescript/impl/core/Const.ts +38 -16
- package/src/main/typescript/impl/core/ImplTypes.ts +1 -1
- package/src/main/typescript/impl/i18n/Messages.ts +2 -2
- package/src/main/typescript/impl/util/Assertions.ts +3 -3
- package/src/main/typescript/impl/util/AsyncQueue.ts +1 -1
- package/src/main/typescript/impl/util/AsyncRunnable.ts +5 -5
- package/src/main/typescript/impl/util/ExtDomQuery.ts +200 -48
- package/src/main/typescript/impl/util/IListener.ts +1 -1
- package/src/main/typescript/impl/util/Lang.ts +25 -25
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +2 -3
- package/src/main/typescript/impl/xhrCore/EventData.ts +4 -3
- package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +19 -11
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +15 -14
- package/src/main/typescript/impl/xhrCore/ResonseDataResolver.ts +15 -11
- package/src/main/typescript/impl/xhrCore/Response.ts +30 -24
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +69 -49
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +9 -7
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +76 -60
- package/src/main/typescript/myfaces/OamSubmit.ts +51 -86
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +277 -65
- package/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts +1 -6
- package/src/main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test.js +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/test2.js +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +78 -33
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +44 -4
- package/src/main/typescript/test/impl/ImplTest.spec.ts +18 -22
- package/src/main/typescript/test/impl/ImplTest_23.spec.ts +129 -0
- package/src/main/typescript/test/impl/SeparatorCharsTest.spec.ts +7 -7
- package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +99 -17
- package/src/main/typescript/test/queue/AsynchronousProbe.ts +1 -1
- package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +4 -4
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +15 -23
- package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +3 -3
- package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +7 -32
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +16 -37
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +17 -16
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +364 -0
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +102 -47
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +362 -0
- package/src/main/typescript/test/xhrCore/ShadowDomTest.spec.ts +6 -9
- package/src/main/typescript/test/xhrCore/WebsocketTest.ts +15 -15
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +3 -3
- package/{target/main/typescript/impl/util/AsyncRunnable.js → src/main/typescript/test/xhrCore/fixtures/addedViewHead1.js} +4 -6
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.css +18 -0
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead2.js +16 -0
- package/src/main/typescript/test/xhrCore/fixtures/addedViewHead3.js +16 -0
- package/src/main/typescript/test/xhrCore/fixtures/nonce_script.js +16 -0
- package/src/main/typescript/tsconfig-typedoc.json +17 -1
- package/src/main/typescript/tsconfig.json +24 -5
- package/src/test/resources/jsf-development.js +1 -1
- package/src/test.html +75 -0
- package/src/tmp/test.html +92 -0
- package/target/api/{Jsf.js → _api.js} +68 -70
- package/target/api/_api.js.map +1 -0
- package/target/api/faces.js +45 -0
- package/target/api/faces.js.map +1 -0
- package/target/api/jsf.js +45 -0
- package/target/api/jsf.js.map +1 -0
- 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/impl/AjaxImpl.js +85 -93
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +63 -64
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/core/Const.js +38 -19
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/core/ImplTypes.js +10 -15
- package/target/impl/core/ImplTypes.js.map +1 -1
- package/target/impl/i18n/Messages.js +5 -6
- package/target/impl/i18n/Messages.js.map +1 -1
- package/target/impl/util/Assertions.js +12 -21
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/AsyncQueue.js +28 -36
- package/target/impl/util/AsyncQueue.js.map +1 -1
- package/target/impl/util/AsyncRunnable.js +1 -1
- package/target/impl/util/ExtDomQuery.js +235 -138
- package/target/impl/util/ExtDomQuery.js.map +1 -1
- package/target/impl/util/Lang.js +43 -50
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +37 -62
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/EventData.js +12 -14
- package/target/impl/xhrCore/EventData.js.map +1 -1
- package/target/impl/xhrCore/RequestDataResolver.js +27 -29
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +25 -23
- package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
- package/target/impl/xhrCore/Response.js +40 -36
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +165 -167
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +75 -103
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +160 -145
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +4 -0
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +4 -0
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +1 -0
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +1 -0
- package/target/myfaces/OamSubmit.js +63 -74
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +78 -0
- package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +7 -0
- package/target/test/frameworkBase/LangTest.spec.js +46 -32
- package/target/test/frameworkBase/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +372 -111
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +46 -32
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +25 -34
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +9 -9
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +32 -37
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +51 -49
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +300 -121
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +199 -18
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +68 -33
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/impl/ImplTest_23.spec.js +133 -0
- package/target/test/impl/ImplTest_23.spec.js.map +1 -0
- package/target/test/impl/SeparatorCharsTest.spec.js +45 -21
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
- package/target/test/myfaces/OamSubmit.spec.js +90 -18
- package/target/test/myfaces/OamSubmit.spec.js.map +1 -1
- package/target/test/queue/AsynchronousProbe.js +24 -30
- package/target/test/queue/AsynchronousProbe.js.map +1 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +63 -71
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +70 -83
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/FakeWebsocket.js +15 -17
- package/target/test/xhrCore/FakeWebsocket.js.map +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +73 -91
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +72 -98
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +107 -120
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/{typescript/xhrCore/RequestTest.js → xhrCore/RequestTest_23.spec.js} +142 -127
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -0
- package/target/test/xhrCore/ResponseTest.spec.js +206 -105
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +312 -0
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -0
- package/target/test/xhrCore/ShadowDomTest.spec.js +56 -66
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
- package/target/test/xhrCore/WebsocketTest.js +87 -97
- package/target/test/xhrCore/WebsocketTest.js.map +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +65 -16
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
- package/target/test-classes/jsf-development.js +452 -3674
- package/target/test-classes/jsf.js +1 -1
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/webpack.config.js +7 -4
- package/webpack.config.js.map +1 -1
- package/webpack.config.ts +23 -4
- package/dist/docs/modules/jsf.html +0 -71
- package/dist/docs/variables/jsf.specversion.html +0 -52
- package/integrationdeploy.cmd +0 -4
- package/integrationsdeploy.sh +0 -5
- package/remap.js +0 -44
- package/remap.js.map +0 -1
- package/src/main/java/com/example/jsfs_js_ts/JsfsJsTsApplication.java +0 -12
- package/src/main/types/typedefs.d.ts +0 -66
- package/target/api/Jsf.js.map +0 -1
- package/target/classes/com/example/jsfs_js_ts/JsfsJsTsApplication.class +0 -0
- package/target/impl/util/ListenerQueue.js +0 -3
- package/target/impl/util/ListenerQueue.js.map +0 -1
- package/target/main/typescript/api/Jsf.js +0 -258
- package/target/main/typescript/api/Jsf.js.map +0 -1
- package/target/main/typescript/impl/AjaxImpl.js +0 -569
- package/target/main/typescript/impl/AjaxImpl.js.map +0 -1
- package/target/main/typescript/impl/PushImpl.js +0 -215
- package/target/main/typescript/impl/PushImpl.js.map +0 -1
- package/target/main/typescript/impl/core/Const.js +0 -135
- package/target/main/typescript/impl/core/Const.js.map +0 -1
- package/target/main/typescript/impl/core/ImplTypes.js +0 -43
- package/target/main/typescript/impl/core/ImplTypes.js.map +0 -1
- package/target/main/typescript/impl/i18n/Messages.js +0 -114
- package/target/main/typescript/impl/i18n/Messages.js.map +0 -1
- package/target/main/typescript/impl/util/Assertions.js +0 -90
- package/target/main/typescript/impl/util/Assertions.js.map +0 -1
- package/target/main/typescript/impl/util/AsyncQueue.js +0 -104
- package/target/main/typescript/impl/util/AsyncQueue.js.map +0 -1
- package/target/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
- package/target/main/typescript/impl/util/ExtDomQuery.js +0 -129
- package/target/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
- package/target/main/typescript/impl/util/Lang.js +0 -215
- package/target/main/typescript/impl/util/Lang.js.map +0 -1
- package/target/main/typescript/impl/util/ListenerQueue.js +0 -3
- package/target/main/typescript/impl/util/ListenerQueue.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ErrorData.js +0 -89
- package/target/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/EventData.js +0 -30
- package/target/main/typescript/impl/xhrCore/EventData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
- package/target/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -143
- package/target/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js +0 -103
- package/target/main/typescript/impl/xhrCore/ResonseDataResolver.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/Response.js +0 -167
- package/target/main/typescript/impl/xhrCore/Response.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -368
- package/target/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/XhrFormData.js +0 -272
- package/target/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
- package/target/main/typescript/impl/xhrCore/XhrRequest.js +0 -281
- package/target/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.js +0 -89
- package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js +0 -39
- package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js +0 -155
- package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js +0 -176
- package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/LangTest.js +0 -112
- package/target/test/typescript/frameworkBase/LangTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js +0 -293
- package/target/test/typescript/frameworkBase/_ext/monadish/DomQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js +0 -89
- package/target/test/typescript/frameworkBase/_ext/monadish/LangTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js +0 -115
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js +0 -39
- package/target/test/typescript/frameworkBase/_ext/monadish/MappingTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js +0 -155
- package/target/test/typescript/frameworkBase/_ext/monadish/MonadTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js +0 -176
- package/target/test/typescript/frameworkBase/_ext/monadish/StreamTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js +0 -1
- package/target/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js +0 -264
- package/target/test/typescript/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
- package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js +0 -23
- package/target/test/typescript/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
- package/target/test/typescript/impl/ImplTest.js +0 -98
- package/target/test/typescript/impl/ImplTest.js.map +0 -1
- package/target/test/typescript/impl/SeparatorCharsTest.js +0 -72
- package/target/test/typescript/impl/SeparatorCharsTest.js.map +0 -1
- package/target/test/typescript/queue/AsynchronousProbe.js +0 -99
- package/target/test/typescript/queue/AsynchronousProbe.js.map +0 -1
- package/target/test/typescript/queue/AsynchronousQueueTest.js +0 -130
- package/target/test/typescript/queue/AsynchronousQueueTest.js.map +0 -1
- package/target/test/typescript/xhrCore/EventTests.js +0 -155
- package/target/test/typescript/xhrCore/EventTests.js.map +0 -1
- package/target/test/typescript/xhrCore/FakeWebsocket.js +0 -25
- package/target/test/typescript/xhrCore/FakeWebsocket.js.map +0 -1
- package/target/test/typescript/xhrCore/FileUploadTest.js +0 -166
- package/target/test/typescript/xhrCore/FileUploadTest.js.map +0 -1
- package/target/test/typescript/xhrCore/RequestParamsTest.js +0 -151
- package/target/test/typescript/xhrCore/RequestParamsTest.js.map +0 -1
- package/target/test/typescript/xhrCore/RequestTest.js.map +0 -1
- package/target/test/typescript/xhrCore/ResponseTest.js +0 -257
- package/target/test/typescript/xhrCore/ResponseTest.js.map +0 -1
- package/target/test/typescript/xhrCore/ShadowDomTest.js +0 -122
- package/target/test/typescript/xhrCore/ShadowDomTest.js.map +0 -1
- package/target/test/typescript/xhrCore/WebsocketTest.js +0 -182
- package/target/test/typescript/xhrCore/WebsocketTest.js.map +0 -1
- package/target/test/typescript/xhrCore/XhrFormDataTest.js +0 -58
- package/target/test/typescript/xhrCore/XhrFormDataTest.js.map +0 -1
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,35 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
35
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
40
36
|
* contributor license agreements. See the NOTICE file distributed with
|
|
41
37
|
* this work for additional information regarding copyright ownership.
|
|
42
38
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -51,49 +47,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
51
47
|
* See the License for the specific language governing permissions and
|
|
52
48
|
* limitations under the License.
|
|
53
49
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
const sinon = __importStar(require("sinon"));
|
|
51
|
+
const AjaxImpl_1 = require("../../impl/AjaxImpl");
|
|
52
|
+
const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
|
|
57
53
|
var protocolPage = StandardInits_1.StandardInits.protocolPage;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
const mona_dish_1 = require("mona-dish");
|
|
55
|
+
const XhrFormData_1 = require("../../impl/xhrCore/XhrFormData");
|
|
56
|
+
const chai_1 = require("chai");
|
|
61
57
|
describe("test for proper request param patterns identical to the old implementation", function () {
|
|
62
|
-
|
|
63
|
-
op: "delete1",
|
|
64
|
-
"javax.faces.source": "cmd_delete",
|
|
65
|
-
"javax.faces.partial.event": "click",
|
|
66
|
-
"javax.faces.partial.ajax": "true",
|
|
67
|
-
"javax.faces.partial.execute": "cmd_delete",
|
|
68
|
-
"form1": "form1",
|
|
69
|
-
"javax.faces.ViewState": "blubbblubblubb"
|
|
70
|
-
};
|
|
71
|
-
var UPDATE_INSERT_2 = {
|
|
58
|
+
const UPDATE_INSERT_2 = {
|
|
72
59
|
"op": "updateinsert2",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"form1": "form1",
|
|
78
|
-
"javax.faces.ViewState": "blubbblubblubb"
|
|
79
|
-
};
|
|
80
|
-
var ERRORS = {
|
|
81
|
-
"op": "errors",
|
|
82
|
-
"javax.faces.partial.event": "click",
|
|
83
|
-
"javax.faces.source": "cmd_error",
|
|
84
|
-
"javax.faces.partial.ajax": "true",
|
|
85
|
-
"javax.faces.partial.execute": "cmd_error",
|
|
60
|
+
"jakarta.faces.partial.event": "click",
|
|
61
|
+
"jakarta.faces.source": "cmd_update_insert2",
|
|
62
|
+
"jakarta.faces.partial.ajax": "true",
|
|
63
|
+
"jakarta.faces.partial.execute": "cmd_update_insert2",
|
|
86
64
|
"form1": "form1",
|
|
87
|
-
"
|
|
65
|
+
"jakarta.faces.ViewState": "blubbblubblubb"
|
|
88
66
|
};
|
|
89
67
|
/**
|
|
90
68
|
* matches two maps for absolute identicality
|
|
91
69
|
*/
|
|
92
|
-
|
|
70
|
+
let matches = (item1, item2) => {
|
|
93
71
|
if (Object.keys(item1).length != Object.keys(item2).length) {
|
|
94
72
|
return false;
|
|
95
73
|
}
|
|
96
|
-
for (
|
|
74
|
+
for (let key in item1) {
|
|
97
75
|
if ((!(key in item2)) || item1[key] != item2[key]) {
|
|
98
76
|
return false;
|
|
99
77
|
}
|
|
@@ -101,27 +79,23 @@ describe("test for proper request param patterns identical to the old implementa
|
|
|
101
79
|
return true;
|
|
102
80
|
};
|
|
103
81
|
beforeEach(function () {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
AjaxImpl_1.Implementation.reset();
|
|
122
|
-
close();
|
|
123
|
-
};
|
|
124
|
-
})];
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
let waitForResult = protocolPage();
|
|
84
|
+
return waitForResult.then((close) => {
|
|
85
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
86
|
+
this.requests = [];
|
|
87
|
+
this.xhr.onCreate = (xhr) => {
|
|
88
|
+
this.requests.push(xhr);
|
|
89
|
+
};
|
|
90
|
+
global.XMLHttpRequest = this.xhr;
|
|
91
|
+
window.XMLHttpRequest = this.xhr;
|
|
92
|
+
this.jsfAjaxResponse = sinon.stub(global.faces.ajax, "response");
|
|
93
|
+
this.closeIt = () => {
|
|
94
|
+
global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
95
|
+
this.jsfAjaxResponse.restore();
|
|
96
|
+
AjaxImpl_1.Implementation.reset();
|
|
97
|
+
close();
|
|
98
|
+
};
|
|
125
99
|
});
|
|
126
100
|
});
|
|
127
101
|
});
|
|
@@ -130,37 +104,37 @@ describe("test for proper request param patterns identical to the old implementa
|
|
|
130
104
|
});
|
|
131
105
|
it("must pass updateinsert2 with proper parameters", function () {
|
|
132
106
|
mona_dish_1.DQ.byId("cmd_update_insert2").click();
|
|
133
|
-
|
|
134
|
-
|
|
107
|
+
let requestBody = this.requests[0].requestBody;
|
|
108
|
+
let formData = new XhrFormData_1.XhrFormData(requestBody);
|
|
135
109
|
(0, chai_1.expect)(matches(formData.value, UPDATE_INSERT_2)).to.be.true;
|
|
136
110
|
});
|
|
137
111
|
it("must handle base64 encoded strings properly as request data", function () {
|
|
138
|
-
|
|
139
|
-
mona_dish_1.DQ.byId("
|
|
112
|
+
let probe = "YWFhYWFhc1Rlc3RpdCDDpGtvNDU5NjczMDA9PSsrNDU5MGV3b3UkJiUmLyQmJQ==";
|
|
113
|
+
mona_dish_1.DQ.byId("jakarta.faces.ViewState").inputValue.value = probe;
|
|
140
114
|
mona_dish_1.DQ.byId("cmd_update_insert2").click();
|
|
141
|
-
|
|
115
|
+
let requestBody = this.requests[0].requestBody;
|
|
142
116
|
//We check if the base64 encoded string matches the original
|
|
143
|
-
|
|
144
|
-
(0, chai_1.expect)(decodeURIComponent(formData.getIf("
|
|
117
|
+
let formData = new XhrFormData_1.XhrFormData(requestBody);
|
|
118
|
+
(0, chai_1.expect)(decodeURIComponent(formData.getIf("jakarta.faces.ViewState").value) == probe).to.be.true;
|
|
145
119
|
});
|
|
146
120
|
it("must handle empty parameters properly", function () {
|
|
147
|
-
|
|
148
|
-
mona_dish_1.DQ.byId("
|
|
121
|
+
let probe = "";
|
|
122
|
+
mona_dish_1.DQ.byId("jakarta.faces.ViewState").inputValue.value = probe;
|
|
149
123
|
mona_dish_1.DQ.byId("cmd_update_insert2").click();
|
|
150
|
-
|
|
124
|
+
let requestBody = this.requests[0].requestBody;
|
|
151
125
|
//We check if the base64 encoded string matches the original
|
|
152
|
-
|
|
153
|
-
(0, chai_1.expect)(decodeURIComponent(formData.getIf("
|
|
126
|
+
let formData = new XhrFormData_1.XhrFormData(requestBody);
|
|
127
|
+
(0, chai_1.expect)(decodeURIComponent(formData.getIf("jakarta.faces.ViewState").value) == probe).to.be.true;
|
|
154
128
|
});
|
|
155
129
|
//KssbpZfCe+0lwDhgMRQ44wRFkaM1o1lbMMUO3lini5YhXWm6
|
|
156
130
|
it("must handle base64 special cases properly (+ in encoding)", function () {
|
|
157
|
-
|
|
158
|
-
mona_dish_1.DQ.byId("
|
|
131
|
+
let probe = "KssbpZfCe+0lwDhgMRQ44wRFkaM1o1lbMMUO3lini5YhXWm6";
|
|
132
|
+
mona_dish_1.DQ.byId("jakarta.faces.ViewState").inputValue.value = probe;
|
|
159
133
|
mona_dish_1.DQ.byId("cmd_update_insert2").click();
|
|
160
|
-
|
|
134
|
+
let requestBody = this.requests[0].requestBody;
|
|
161
135
|
//We check if the base64 encoded string matches the original
|
|
162
|
-
|
|
163
|
-
(0, chai_1.expect)(decodeURIComponent(formData.getIf("
|
|
136
|
+
let formData = new XhrFormData_1.XhrFormData(requestBody);
|
|
137
|
+
(0, chai_1.expect)(decodeURIComponent(formData.getIf("jakarta.faces.ViewState").value) == probe).to.be.true;
|
|
164
138
|
});
|
|
165
139
|
});
|
|
166
140
|
//# sourceMappingURL=RequestParamsTest.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestParamsTest.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestParamsTest.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts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BAAoB,CAAC,CAAC,KAAK,EAAE,CAAC;QACtC,IAAI,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAC/C,4DAA4D;QAC5D,IAAI,QAAQ,GAAG,IAAI,yBAAW,CAAC,WAAW,CAAC,CAAC;QAE5C,IAAA,aAAM,EAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACpG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
3
|
* contributor license agreements. See the NOTICE file distributed with
|
|
4
4
|
* this work for additional information regarding copyright ownership.
|
|
5
5
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -14,6 +14,29 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
17
40
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
41
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
42
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -23,44 +46,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
46
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
47
|
});
|
|
25
48
|
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
const mocha_1 = require("mocha");
|
|
51
|
+
const sinon = __importStar(require("sinon"));
|
|
52
|
+
const chai_1 = require("chai");
|
|
53
|
+
const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
|
|
54
|
+
const mona_dish_1 = require("mona-dish");
|
|
55
|
+
const Const_1 = require("../../impl/core/Const");
|
|
60
56
|
var defaultMyFaces = StandardInits_1.StandardInits.defaultMyFaces;
|
|
61
57
|
var STD_XML = StandardInits_1.StandardInits.STD_XML;
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
let issueStdReq = function (element) {
|
|
59
|
+
faces.ajax.request(element, null, {
|
|
64
60
|
execute: "input_1",
|
|
65
61
|
render: "@form",
|
|
66
62
|
pass1: "pass1",
|
|
@@ -72,27 +68,23 @@ var issueStdReq = function (element) {
|
|
|
72
68
|
*/
|
|
73
69
|
(0, mocha_1.describe)('Tests on the xhr core when it starts to call the request', function () {
|
|
74
70
|
beforeEach(function () {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Implementation.reset();
|
|
93
|
-
close();
|
|
94
|
-
};
|
|
95
|
-
})];
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
let waitForResult = defaultMyFaces();
|
|
73
|
+
return waitForResult.then((close) => {
|
|
74
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
75
|
+
this.requests = [];
|
|
76
|
+
this.xhr.onCreate = (xhr) => {
|
|
77
|
+
this.requests.push(xhr);
|
|
78
|
+
};
|
|
79
|
+
global.XMLHttpRequest = this.xhr;
|
|
80
|
+
window.XMLHttpRequest = this.xhr;
|
|
81
|
+
this.jsfAjaxResponse = sinon.spy(global.faces.ajax, "response");
|
|
82
|
+
this.closeIt = () => {
|
|
83
|
+
global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
84
|
+
this.jsfAjaxResponse.restore();
|
|
85
|
+
Implementation.reset();
|
|
86
|
+
close();
|
|
87
|
+
};
|
|
96
88
|
});
|
|
97
89
|
});
|
|
98
90
|
});
|
|
@@ -100,18 +92,18 @@ var issueStdReq = function (element) {
|
|
|
100
92
|
this.closeIt();
|
|
101
93
|
});
|
|
102
94
|
(0, mocha_1.it)('must have the standard parameters all in', function (done) {
|
|
103
|
-
//issue a standard
|
|
95
|
+
//issue a standard faces.ajax.request upon the standard simple form case and check the passed parameters
|
|
104
96
|
//and whether send was called
|
|
105
|
-
|
|
97
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
106
98
|
try {
|
|
107
|
-
|
|
99
|
+
let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
|
|
108
100
|
issueStdReq(element);
|
|
109
101
|
(0, chai_1.expect)(this.requests.length).to.eq(1);
|
|
110
102
|
(0, chai_1.expect)(this.requests[0].method).to.eq("POST");
|
|
111
103
|
(0, chai_1.expect)(this.requests[0].async).to.be.true;
|
|
112
104
|
(0, chai_1.expect)(send.called).to.be.true;
|
|
113
105
|
(0, chai_1.expect)(send.callCount).to.eq(1);
|
|
114
|
-
//sent params
|
|
106
|
+
//sent params jakarta.faces.ViewState=null&execute=input_1&render=%40form&pass1=pass1&pass2=pass2&jakarta.faces.windowId=null&jakarta.faces.source=input_2&jakarta.faces.partial.ajax=input_2&blarg=blarg&jakarta.faces.partial.execute=input_1%20input_2&jakarta.faces.partial.render=blarg
|
|
115
107
|
}
|
|
116
108
|
finally {
|
|
117
109
|
send.restore();
|
|
@@ -119,17 +111,16 @@ var issueStdReq = function (element) {
|
|
|
119
111
|
done();
|
|
120
112
|
});
|
|
121
113
|
(0, mocha_1.it)('it must have the pass through values properly passed', function (done) {
|
|
122
|
-
|
|
114
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
123
115
|
try {
|
|
124
|
-
|
|
116
|
+
let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
|
|
125
117
|
issueStdReq(element);
|
|
126
118
|
(0, chai_1.expect)(send.called).to.be.true;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
for (
|
|
131
|
-
|
|
132
|
-
var keyVal = val.split("=");
|
|
119
|
+
let argsVal = send.args[0][0];
|
|
120
|
+
let arsArr = argsVal.split("&");
|
|
121
|
+
let resultsMap = {};
|
|
122
|
+
for (let val of arsArr) {
|
|
123
|
+
let keyVal = val.split("=");
|
|
133
124
|
resultsMap[keyVal[0]] = keyVal[1];
|
|
134
125
|
}
|
|
135
126
|
(0, chai_1.expect)(resultsMap["pass1"]).to.eq("pass1");
|
|
@@ -149,9 +140,9 @@ var issueStdReq = function (element) {
|
|
|
149
140
|
done();
|
|
150
141
|
});
|
|
151
142
|
(0, mocha_1.it)('it must have the proper target type', function (done) {
|
|
152
|
-
|
|
143
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
153
144
|
try {
|
|
154
|
-
|
|
145
|
+
let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
|
|
155
146
|
issueStdReq(element);
|
|
156
147
|
(0, chai_1.expect)(this.requests[0].requestHeaders.Accept.indexOf("application/xml") != -1).to.be.true;
|
|
157
148
|
}
|
|
@@ -163,27 +154,24 @@ var issueStdReq = function (element) {
|
|
|
163
154
|
});
|
|
164
155
|
(0, mocha_1.describe)('Tests after core when it hits response', function () {
|
|
165
156
|
beforeEach(function () {
|
|
166
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
close();
|
|
185
|
-
};
|
|
186
|
-
})];
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
let waitForResult = defaultMyFaces();
|
|
159
|
+
return waitForResult.then((close) => {
|
|
160
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
161
|
+
this.requests = [];
|
|
162
|
+
this.xhr.onCreate = (xhr) => {
|
|
163
|
+
this.requests.push(xhr);
|
|
164
|
+
};
|
|
165
|
+
global.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
|
|
166
|
+
// @ts-ignore
|
|
167
|
+
window.XMLHttpRequest = this.xhr = sinon.useFakeXMLHttpRequest();
|
|
168
|
+
this.jsfAjaxResponse = sinon.spy(global.faces.ajax, "response");
|
|
169
|
+
this.closeIt = () => {
|
|
170
|
+
global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
171
|
+
this.jsfAjaxResponse.restore();
|
|
172
|
+
Implementation.reset();
|
|
173
|
+
close();
|
|
174
|
+
};
|
|
187
175
|
});
|
|
188
176
|
});
|
|
189
177
|
});
|
|
@@ -191,24 +179,24 @@ var issueStdReq = function (element) {
|
|
|
191
179
|
this.closeIt();
|
|
192
180
|
});
|
|
193
181
|
(0, mocha_1.it)('must have passed all ajax request phase events', function (done) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
182
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
183
|
+
let globalCnt = 0;
|
|
184
|
+
let localCnt = 0;
|
|
197
185
|
try {
|
|
198
|
-
|
|
199
|
-
|
|
186
|
+
let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
|
|
187
|
+
faces.ajax.addOnEvent(() => {
|
|
200
188
|
globalCnt++;
|
|
201
189
|
});
|
|
202
|
-
|
|
190
|
+
faces.ajax.request(element, null, {
|
|
203
191
|
execute: "input_1",
|
|
204
192
|
render: "@form",
|
|
205
193
|
pass1: "pass1",
|
|
206
194
|
pass2: "pass2",
|
|
207
|
-
onevent:
|
|
195
|
+
onevent: (evt) => {
|
|
208
196
|
localCnt++;
|
|
209
197
|
}
|
|
210
198
|
});
|
|
211
|
-
|
|
199
|
+
let xhrReq = this.requests[0];
|
|
212
200
|
xhrReq.respond(200, { 'Content-Type': 'text/xml' }, STD_XML);
|
|
213
201
|
(0, chai_1.expect)(this.jsfAjaxResponse.callCount).to.eq(1);
|
|
214
202
|
//success ommitted due to fake response
|
|
@@ -224,30 +212,29 @@ var issueStdReq = function (element) {
|
|
|
224
212
|
}
|
|
225
213
|
});
|
|
226
214
|
(0, mocha_1.it)('it must have called request and the pass through values must be properly transferred into the context', function (done) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
var xhrReq = null;
|
|
215
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
216
|
+
let globalCnt = 0;
|
|
217
|
+
let localCnt = 0;
|
|
218
|
+
let xhrReq = null;
|
|
232
219
|
try {
|
|
233
|
-
|
|
234
|
-
|
|
220
|
+
let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
|
|
221
|
+
faces.ajax.addOnEvent(() => {
|
|
235
222
|
globalCnt++;
|
|
236
223
|
});
|
|
237
|
-
|
|
224
|
+
faces.ajax.request(element, null, {
|
|
238
225
|
execute: "input_1",
|
|
239
226
|
render: "@form",
|
|
240
227
|
pass1: "pass1",
|
|
241
228
|
pass2: "pass2",
|
|
242
|
-
onevent:
|
|
229
|
+
onevent: (evt) => {
|
|
243
230
|
localCnt++;
|
|
244
231
|
if (evt.status == Const_1.COMPLETE) {
|
|
245
232
|
(0, chai_1.expect)(!!xhrReq.responseXML).to.be.true;
|
|
246
233
|
}
|
|
247
234
|
if (evt.status == Const_1.SUCCESS) {
|
|
248
|
-
(0, chai_1.expect)(
|
|
249
|
-
(0, chai_1.expect)(
|
|
250
|
-
|
|
235
|
+
(0, chai_1.expect)(this.jsfAjaxResponse.callCount).to.eq(1);
|
|
236
|
+
(0, chai_1.expect)(this.jsfAjaxResponse.firstCall.args[0] instanceof XMLHttpRequest).to.be.true;
|
|
237
|
+
let lastArg = this.jsfAjaxResponse.firstCall.args[1];
|
|
251
238
|
(0, chai_1.expect)(lastArg.onevent != null).to.be.true;
|
|
252
239
|
(0, chai_1.expect)(lastArg.onevent instanceof Function).to.be.true;
|
|
253
240
|
(0, chai_1.expect)(!!lastArg.onError).to.be.false;
|
|
@@ -257,7 +244,7 @@ var issueStdReq = function (element) {
|
|
|
257
244
|
(0, chai_1.expect)(!!lastArg[Const_1.P_AJAX]).to.be.true;
|
|
258
245
|
(0, chai_1.expect)(!!lastArg[Const_1.P_EXECUTE]).to.be.true;
|
|
259
246
|
(0, chai_1.expect)(!!lastArg[Const_1.P_RENDER]).to.be.true;
|
|
260
|
-
(0, chai_1.expect)(
|
|
247
|
+
(0, chai_1.expect)(this.jsfAjaxResponse.firstCall.args.length).to.eq(2);
|
|
261
248
|
(0, chai_1.expect)(globalCnt == 2).to.eq(true); //local before global
|
|
262
249
|
(0, chai_1.expect)(localCnt == 3).to.eq(true);
|
|
263
250
|
done();
|
|
@@ -277,17 +264,17 @@ var issueStdReq = function (element) {
|
|
|
277
264
|
});
|
|
278
265
|
(0, mocha_1.it)('it must have called onError in the error case', function (done) {
|
|
279
266
|
//on hold until it is clear why sinon is not giving me the response XML as expected
|
|
280
|
-
|
|
281
|
-
|
|
267
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
268
|
+
let xhrReq = null;
|
|
282
269
|
try {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
270
|
+
let errorCnt = 0;
|
|
271
|
+
let element = mona_dish_1.DomQuery.byId("input_2").getAsElem(0).value;
|
|
272
|
+
faces.ajax.request(element, null, {
|
|
286
273
|
execute: "input_1",
|
|
287
274
|
render: "@form",
|
|
288
275
|
pass1: "pass1",
|
|
289
276
|
pass2: "pass2",
|
|
290
|
-
onerror:
|
|
277
|
+
onerror: (error) => {
|
|
291
278
|
(0, chai_1.expect)(error.type).to.eq("error");
|
|
292
279
|
(0, chai_1.expect)(!!error.status).to.eq(true);
|
|
293
280
|
(0, chai_1.expect)(!!error.message).to.eq(true);
|
|
@@ -297,7 +284,7 @@ var issueStdReq = function (element) {
|
|
|
297
284
|
(0, chai_1.expect)(!error.responseXML).to.eq(true);
|
|
298
285
|
done();
|
|
299
286
|
},
|
|
300
|
-
onevent:
|
|
287
|
+
onevent: (evt) => {
|
|
301
288
|
if (evt.status == Const_1.COMPLETE) {
|
|
302
289
|
throw Error("This error is wanted, ignore the log");
|
|
303
290
|
}
|