jsf.js_next_gen 1.0.0-beta-20 → 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 +78 -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 +71 -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 +3011 -2963
- 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 +12 -15
- 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 -1
- 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 +75 -30
- 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 -6
- package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +15 -24
- 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 +23 -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 +32 -20
- 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 -134
- 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 -32
- 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 +277 -124
- 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 +45 -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 +22 -20
- package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -1
- package/target/test/myfaces/OamSubmit.spec.js +35 -42
- 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 +40 -71
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +47 -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 +50 -91
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +49 -98
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +84 -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 +183 -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 +33 -66
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -1
- package/target/test/xhrCore/WebsocketTest.js +64 -97
- package/target/test/xhrCore/WebsocketTest.js.map +1 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +42 -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,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
|
|
@@ -46,84 +46,49 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
46
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
50
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
51
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
52
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
53
|
-
function step(op) {
|
|
54
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
55
|
-
while (_) try {
|
|
56
|
-
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;
|
|
57
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
58
|
-
switch (op[0]) {
|
|
59
|
-
case 0: case 1: t = op; break;
|
|
60
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
61
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
62
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
63
|
-
default:
|
|
64
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
65
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
66
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
67
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
68
|
-
if (t[2]) _.ops.pop();
|
|
69
|
-
_.trys.pop(); continue;
|
|
70
|
-
}
|
|
71
|
-
op = body.call(thisArg, _);
|
|
72
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
73
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
50
|
+
const mocha_1 = require("mocha");
|
|
51
|
+
const sinon = __importStar(require("sinon"));
|
|
52
|
+
const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
|
|
53
|
+
const AjaxImpl_1 = require("../../impl/AjaxImpl");
|
|
54
|
+
const chai_1 = require("chai");
|
|
82
55
|
var protocolPage = StandardInits_1.StandardInits.protocolPage;
|
|
83
|
-
|
|
84
|
-
|
|
56
|
+
const mona_dish_1 = require("mona-dish");
|
|
57
|
+
const XmlResponses_1 = require("../frameworkBase/_ext/shared/XmlResponses");
|
|
85
58
|
(0, mocha_1.describe)('tests the addOnEvent and addOnError handling', function () {
|
|
59
|
+
// noinspection DuplicatedCode
|
|
86
60
|
beforeEach(function () {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
AjaxImpl_1.Implementation.reset();
|
|
109
|
-
close();
|
|
110
|
-
};
|
|
111
|
-
})];
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
let waitForResult = protocolPage();
|
|
63
|
+
return waitForResult.then((close) => {
|
|
64
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
65
|
+
this.requests = [];
|
|
66
|
+
this.respond = (response) => {
|
|
67
|
+
let xhrReq = this.requests.shift();
|
|
68
|
+
xhrReq.responsetype = "text/xml";
|
|
69
|
+
xhrReq.respond(200, { 'Content-Type': 'text/xml' }, response);
|
|
70
|
+
return xhrReq;
|
|
71
|
+
};
|
|
72
|
+
this.xhr.onCreate = (xhr) => {
|
|
73
|
+
this.requests.push(xhr);
|
|
74
|
+
};
|
|
75
|
+
global.XMLHttpRequest = this.xhr;
|
|
76
|
+
window.XMLHttpRequest = this.xhr;
|
|
77
|
+
this.closeIt = () => {
|
|
78
|
+
global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
79
|
+
AjaxImpl_1.Implementation.reset();
|
|
80
|
+
close();
|
|
81
|
+
};
|
|
112
82
|
});
|
|
113
83
|
});
|
|
114
84
|
});
|
|
115
85
|
afterEach(function () {
|
|
116
86
|
this.closeIt();
|
|
117
87
|
});
|
|
118
|
-
var allowedStati = {
|
|
119
|
-
"begin": true,
|
|
120
|
-
"complete": true,
|
|
121
|
-
"success": true,
|
|
122
|
-
};
|
|
123
88
|
it("must have a global add on event call with all three phases passed", function () {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
89
|
+
let onEventCalled1 = 0;
|
|
90
|
+
let onEventCalled2 = 0;
|
|
91
|
+
faces.ajax.addOnEvent((data) => {
|
|
127
92
|
onEventCalled1++;
|
|
128
93
|
if (onEventCalled1 == 1 && data.status != "begin") {
|
|
129
94
|
throw ("Wrong status");
|
|
@@ -135,29 +100,29 @@ var XmlResponses_1 = require("../frameworkBase/_ext/shared/XmlResponses");
|
|
|
135
100
|
throw ("Wrong status");
|
|
136
101
|
}
|
|
137
102
|
});
|
|
138
|
-
|
|
103
|
+
faces.ajax.addOnEvent(() => {
|
|
139
104
|
onEventCalled2++;
|
|
140
105
|
});
|
|
141
|
-
|
|
106
|
+
mona_dish_1.DQ.byId("cmd_update_insert").click();
|
|
142
107
|
this.respond(XmlResponses_1.XmlResponses.UPDATE_INSERT_1);
|
|
143
108
|
(0, chai_1.expect)(onEventCalled1).to.eq(3);
|
|
144
109
|
(0, chai_1.expect)(onEventCalled2).to.eq(3);
|
|
145
110
|
});
|
|
146
111
|
it("must have onError called in case of error", function () {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
112
|
+
let onErrorCalled1 = 0;
|
|
113
|
+
let onErrorCalled2 = 0;
|
|
114
|
+
let errorTitle = '';
|
|
115
|
+
let errorMessage = '';
|
|
116
|
+
faces.ajax.addOnError((data) => {
|
|
152
117
|
errorTitle = data.errorName;
|
|
153
118
|
errorMessage = data.errorMessage;
|
|
154
119
|
onErrorCalled1++;
|
|
155
120
|
});
|
|
156
|
-
|
|
121
|
+
faces.ajax.addOnError(() => {
|
|
157
122
|
onErrorCalled2++;
|
|
158
123
|
});
|
|
159
124
|
//cmd_error_component
|
|
160
|
-
|
|
125
|
+
mona_dish_1.DQ.byId("cmd_error_component").click();
|
|
161
126
|
this.respond(XmlResponses_1.XmlResponses.ERROR_2);
|
|
162
127
|
(0, chai_1.expect)(onErrorCalled1).to.eq(1);
|
|
163
128
|
(0, chai_1.expect)(onErrorCalled2).to.eq(1);
|
|
@@ -165,19 +130,18 @@ var XmlResponses_1 = require("../frameworkBase/_ext/shared/XmlResponses");
|
|
|
165
130
|
(0, chai_1.expect)(errorMessage).to.eq('Error2 Text');
|
|
166
131
|
});
|
|
167
132
|
it("must have an id set if there is an emitting element", function () {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
var assertSourceExists = function (data) {
|
|
133
|
+
let onEventCalled2 = 0;
|
|
134
|
+
let assertSourceExists = (data) => {
|
|
171
135
|
var _a;
|
|
172
136
|
(0, chai_1.expect)(!!((_a = data === null || data === void 0 ? void 0 : data.source) === null || _a === void 0 ? void 0 : _a.id)).to.be.true;
|
|
173
137
|
};
|
|
174
|
-
|
|
138
|
+
faces.ajax.addOnEvent((data) => {
|
|
175
139
|
assertSourceExists(data);
|
|
176
140
|
});
|
|
177
|
-
|
|
141
|
+
faces.ajax.addOnEvent(() => {
|
|
178
142
|
onEventCalled2++;
|
|
179
143
|
});
|
|
180
|
-
|
|
144
|
+
mona_dish_1.DQ.byId("cmd_update_insert").click();
|
|
181
145
|
this.respond(XmlResponses_1.XmlResponses.UPDATE_INSERT_1);
|
|
182
146
|
});
|
|
183
147
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTests.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/EventTests.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"EventTests.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/EventTests.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA+B;AAC/B,6CAA+B;AAC/B,8EAAyE;AACzE,kDAAmD;AAEnD,+BAA4B;AAC5B,IAAO,YAAY,GAAG,6BAAa,CAAC,YAAY,CAAC;AACjD,yCAA6B;AAC7B,4EAAuE;AAIvE,IAAA,gBAAQ,EAAC,8CAA8C,EAAE;IAErD,8BAA8B;IAC9B,UAAU,CAAC;;YACP,IAAI,aAAa,GAAG,YAAY,EAAE,CAAC;YACnC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;gBAEhC,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;gBACzC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;gBAEnB,IAAI,CAAC,OAAO,GAAG,CAAC,QAAgB,EAAkB,EAAE;oBAChD,IAAI,MAAM,GAAI,IAAI,CAAC,QAAuB,CAAC,KAAK,EAAE,CAAC;oBACnD,MAAM,CAAC,YAAY,GAAG,UAAU,CAAC;oBACjC,MAAM,CAAC,OAAO,CAAC,GAA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AAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAChC,IAAA,aAAM,EAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;QACnC,IAAA,aAAM,EAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE;QACtD,IAAI,cAAc,GAAG,CAAC,CAAC;QAEvB,IAAI,kBAAkB,GAAG,CAAC,IAAS,EAAE,EAAE;;YACnC,IAAA,aAAM,EAAC,CAAC,CAAC,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,0CAAE,EAAE,CAAA,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC1C,CAAC,CAAA;QAED,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAS,EAAE,EAAE;YAChC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE;YACvB,cAAc,EAAE,CAAC;QAErB,CAAC,CAAC,CAAC;QACH,cAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,KAAK,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,2BAAY,CAAC,eAAe,CAAC,CAAC;IAE/C,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FakeWebsocket = void 0;
|
|
4
|
-
|
|
4
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
5
5
|
* contributor license agreements. See the NOTICE file distributed with
|
|
6
6
|
* this work for additional information regarding copyright ownership.
|
|
7
7
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -16,25 +16,23 @@ exports.FakeWebsocket = void 0;
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.onopen();
|
|
19
|
+
class FakeWebsocket {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.onopen = () => { };
|
|
22
|
+
this.onmessage = () => { };
|
|
23
|
+
this.onclose = () => { };
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
this.onopen();
|
|
27
26
|
}, 10);
|
|
28
27
|
}
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
28
|
+
send() {
|
|
29
|
+
}
|
|
30
|
+
_respond(response) {
|
|
32
31
|
this.onmessage(response);
|
|
33
|
-
}
|
|
34
|
-
|
|
32
|
+
}
|
|
33
|
+
close() {
|
|
35
34
|
this.onclose();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}());
|
|
35
|
+
}
|
|
36
|
+
}
|
|
39
37
|
exports.FakeWebsocket = FakeWebsocket;
|
|
40
38
|
//# sourceMappingURL=FakeWebsocket.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FakeWebsocket.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/FakeWebsocket.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH
|
|
1
|
+
{"version":3,"file":"FakeWebsocket.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/FakeWebsocket.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAa,aAAa;IAMtB;QAJA,WAAM,GAAa,GAAG,EAAE,GAAE,CAAC,CAAA;QAC3B,cAAS,GAAa,GAAG,EAAE,GAAE,CAAC,CAAA;QAC9B,YAAO,GAAa,GAAG,EAAE,GAAE,CAAC,CAAA;QAGxB,UAAU,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,EAAE,CAAC;QAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IACX,CAAC;IAGD,IAAI;IACJ,CAAC;IAED,QAAQ,CAAC,QAAa;QAClB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED,KAAK;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;CACJ;AAvBD,sCAuBC"}
|
|
@@ -31,35 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
41
|
-
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;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
|
|
35
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
63
36
|
* contributor license agreements. See the NOTICE file distributed with
|
|
64
37
|
* this work for additional information regarding copyright ownership.
|
|
65
38
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -74,51 +47,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
74
47
|
* See the License for the specific language governing permissions and
|
|
75
48
|
* limitations under the License.
|
|
76
49
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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");
|
|
82
55
|
var defaultFileForm = StandardInits_1.StandardInits.defaultFileForm;
|
|
83
|
-
|
|
84
|
-
var issueStdReq = function (element) {
|
|
85
|
-
jsf.ajax.request(element, null, {
|
|
86
|
-
execute: "input_1",
|
|
87
|
-
render: "@form",
|
|
88
|
-
pass1: "pass1",
|
|
89
|
-
pass2: "pass2"
|
|
90
|
-
});
|
|
91
|
-
};
|
|
56
|
+
const AjaxImpl_1 = require("../../impl/AjaxImpl");
|
|
92
57
|
/**
|
|
93
58
|
* specialized tests testing the xhr core behavior when it hits the xmlHttpRequest object
|
|
94
59
|
*/
|
|
95
60
|
(0, mocha_1.describe)('Tests on the xhr core when it starts to call the request', function () {
|
|
96
61
|
beforeEach(function () {
|
|
97
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
AjaxImpl_1.Implementation.reset();
|
|
119
|
-
close();
|
|
120
|
-
};
|
|
121
|
-
})];
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
let waitForResult = defaultFileForm();
|
|
64
|
+
return waitForResult.then((close) => {
|
|
65
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
66
|
+
this.requests = [];
|
|
67
|
+
this.respond = (response) => {
|
|
68
|
+
let xhrReq = this.requests.shift();
|
|
69
|
+
xhrReq.responsetype = "text/xml";
|
|
70
|
+
xhrReq.respond(200, { 'Content-Type': 'text/xml' }, response);
|
|
71
|
+
return xhrReq;
|
|
72
|
+
};
|
|
73
|
+
this.xhr.onCreate = (xhr) => {
|
|
74
|
+
this.requests.push(xhr);
|
|
75
|
+
};
|
|
76
|
+
global.XMLHttpRequest = this.xhr;
|
|
77
|
+
window.XMLHttpRequest = this.xhr;
|
|
78
|
+
this.closeIt = () => {
|
|
79
|
+
global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
80
|
+
AjaxImpl_1.Implementation.reset();
|
|
81
|
+
close();
|
|
82
|
+
};
|
|
122
83
|
});
|
|
123
84
|
});
|
|
124
85
|
});
|
|
@@ -126,18 +87,17 @@ var issueStdReq = function (element) {
|
|
|
126
87
|
this.closeIt();
|
|
127
88
|
});
|
|
128
89
|
(0, mocha_1.it)('must have sent a form multipart request', function (done) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
var POST = "POST";
|
|
90
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
91
|
+
const CONTENT_TYPE = "Content-Type";
|
|
92
|
+
const POST = "POST";
|
|
133
93
|
try {
|
|
134
|
-
|
|
135
|
-
button.addEventListener("click",
|
|
136
|
-
|
|
94
|
+
let button = mona_dish_1.DomQuery.byId("input_1");
|
|
95
|
+
button.addEventListener("click", (event) => {
|
|
96
|
+
faces.ajax.request(event.target, event, { render: '@all', execute: '@form' });
|
|
137
97
|
}).click();
|
|
138
98
|
//this.resonse("ok");
|
|
139
99
|
(0, chai_1.expect)(this.requests.length).to.eq(1);
|
|
140
|
-
|
|
100
|
+
let request = this.requests[0];
|
|
141
101
|
(0, chai_1.expect)(request.method).to.eq(POST);
|
|
142
102
|
(0, chai_1.expect)(request.async).to.be.true;
|
|
143
103
|
(0, chai_1.expect)(send.called).to.be.true;
|
|
@@ -151,18 +111,17 @@ var issueStdReq = function (element) {
|
|
|
151
111
|
done();
|
|
152
112
|
});
|
|
153
113
|
(0, mocha_1.it)('must have sent a multipart request with a dedicated execute', function (done) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var POST = "POST";
|
|
114
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
115
|
+
const CONTENT_TYPE = "Content-Type";
|
|
116
|
+
const POST = "POST";
|
|
158
117
|
try {
|
|
159
|
-
|
|
160
|
-
button.addEventListener("click",
|
|
161
|
-
|
|
118
|
+
let button = mona_dish_1.DomQuery.byId("input_1");
|
|
119
|
+
button.addEventListener("click", (event) => {
|
|
120
|
+
faces.ajax.request(event.target, event, { render: '@all', execute: 'input_1 fíleupload' });
|
|
162
121
|
}).click();
|
|
163
122
|
//this.resonse("ok");
|
|
164
123
|
(0, chai_1.expect)(this.requests.length).to.eq(1);
|
|
165
|
-
|
|
124
|
+
let request = this.requests[0];
|
|
166
125
|
(0, chai_1.expect)(request.method).to.eq(POST);
|
|
167
126
|
(0, chai_1.expect)(request.async).to.be.true;
|
|
168
127
|
(0, chai_1.expect)(send.called).to.be.true;
|
|
@@ -177,17 +136,17 @@ var issueStdReq = function (element) {
|
|
|
177
136
|
done();
|
|
178
137
|
});
|
|
179
138
|
(0, mocha_1.it)('must have sent a single part request with a dedicated execute', function (done) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
139
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
140
|
+
const CONTENT_TYPE = "Content-Type";
|
|
141
|
+
const MULTIPART_FORM = "multipart/form-data";
|
|
142
|
+
const POST = "POST";
|
|
184
143
|
try {
|
|
185
|
-
|
|
186
|
-
button.addEventListener("click",
|
|
187
|
-
|
|
144
|
+
let button = mona_dish_1.DomQuery.byId("input_1");
|
|
145
|
+
button.addEventListener("click", (event) => {
|
|
146
|
+
faces.ajax.request(event.target, event, { render: '@all', execute: 'input_1 fileupload' });
|
|
188
147
|
}).click();
|
|
189
148
|
(0, chai_1.expect)(this.requests.length).to.eq(1);
|
|
190
|
-
|
|
149
|
+
let request = this.requests[0];
|
|
191
150
|
(0, chai_1.expect)(request.method).to.eq(POST);
|
|
192
151
|
(0, chai_1.expect)(request.async).to.be.true;
|
|
193
152
|
(0, chai_1.expect)(send.called).to.be.true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadTest.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/FileUploadTest.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileUploadTest.spec.js","sourceRoot":"","sources":["../../../src/main/typescript/test/xhrCore/FileUploadTest.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