jsf.js_next_gen 4.1.0-beta.2 → 4.1.0-beta.21

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.
Files changed (413) hide show
  1. package/AI_CONTRIBUTIONS.md +71 -0
  2. package/README.md +254 -78
  3. package/api-extractor.faces.json +38 -0
  4. package/dist/docs/assets/hierarchy.js +1 -1
  5. package/dist/docs/assets/navigation.js +1 -1
  6. package/dist/docs/assets/search.js +1 -1
  7. package/dist/docs/functions/faces.ajax.addOnError.html +2 -2
  8. package/dist/docs/functions/faces.ajax.addOnEvent.html +2 -2
  9. package/dist/docs/functions/faces.ajax.request.html +2 -2
  10. package/dist/docs/functions/faces.ajax.response.html +2 -2
  11. package/dist/docs/functions/faces.getClientWindow.html +2 -2
  12. package/dist/docs/functions/faces.getProjectStage.html +2 -2
  13. package/dist/docs/functions/faces.getViewState.html +1 -1
  14. package/dist/docs/functions/faces.push.close.html +1 -1
  15. package/dist/docs/functions/faces.push.init.html +6 -6
  16. package/dist/docs/functions/faces.push.open.html +1 -1
  17. package/dist/docs/functions/faces.util.chain.html +2 -2
  18. package/dist/docs/functions/myfaces.ab.html +3 -3
  19. package/dist/docs/functions/myfaces.onDomReady.html +1 -1
  20. package/dist/docs/functions/myfaces.reserveNamespace.html +1 -1
  21. package/dist/docs/hierarchy.html +1 -1
  22. package/dist/docs/index.html +292 -71
  23. package/dist/docs/interfaces/faces.AjaxData.html +6 -0
  24. package/dist/docs/interfaces/faces.AjaxError.html +18 -0
  25. package/dist/docs/interfaces/faces.AjaxEvent.html +8 -0
  26. package/dist/docs/interfaces/faces.ajax.RequestContext.html +6 -0
  27. package/dist/docs/interfaces/faces.ajax.RequestOptions.html +10 -0
  28. package/dist/docs/modules/faces.ajax.html +1 -1
  29. package/dist/docs/modules/faces.html +1 -1
  30. package/dist/docs/modules/faces.push.html +1 -1
  31. package/dist/docs/modules/faces.util.html +1 -1
  32. package/dist/docs/modules/myfaces.html +1 -1
  33. package/dist/docs/modules.html +1 -1
  34. package/dist/docs/types/faces.AjaxErrorStatus.html +2 -0
  35. package/dist/docs/types/faces.AjaxEventStatus.html +2 -0
  36. package/dist/docs/types/faces.ProjectStage.html +2 -0
  37. package/dist/docs/types/faces.ajax.OnErrorCallback.html +2 -0
  38. package/dist/docs/types/faces.ajax.OnEventCallback.html +2 -0
  39. package/dist/docs/types/faces.push.OnCloseHandler.html +2 -0
  40. package/dist/docs/types/faces.push.OnErrorHandler.html +2 -0
  41. package/dist/docs/types/faces.push.OnMessageHandler.html +2 -0
  42. package/dist/docs/types/faces.push.OnOpenHandler.html +2 -0
  43. package/dist/docs/variables/faces.contextpath.html +1 -1
  44. package/dist/docs/variables/faces.implversion.html +1 -1
  45. package/dist/docs/variables/faces.separatorchar.html +1 -1
  46. package/dist/docs/variables/faces.specversion.html +1 -1
  47. package/dist/docs/variables/myfaces.oam.html +1 -1
  48. package/dist/window/faces-development.js +1801 -499
  49. package/dist/window/faces-development.js.map +1 -1
  50. package/{target/api/_api.js → dist/window/faces.d.ts} +124 -151
  51. package/dist/window/faces.js +1 -1
  52. package/dist/window/faces.js.LICENSE.txt +0 -17
  53. package/dist/window/faces.js.map +1 -1
  54. package/dist/window/jsf-development.js +1806 -513
  55. package/dist/window/jsf-development.js.map +1 -1
  56. package/{target/src/main/typescript/api/_api.js → dist/window/jsf.d.ts} +125 -153
  57. package/dist/window/jsf.js +1 -1
  58. package/dist/window/jsf.js.LICENSE.txt +0 -17
  59. package/dist/window/jsf.js.map +1 -1
  60. package/package.json +22 -18
  61. package/scripts/build-dts.mjs +239 -0
  62. package/src/main/typescript/@types/definitions/index.d.ts +22 -122
  63. package/{target/test/frameworkBase/_ext/monadish/fixtures/test2.js → src/main/typescript/@types/definitions/modules.d.ts} +18 -2
  64. package/src/main/typescript/api/_api.ts +132 -29
  65. package/{target/test/frameworkBase/_ext/monadish/fixtures/test.js → src/main/typescript/api/_api_ae_stub.d.ts} +6 -2
  66. package/src/main/typescript/api/faces.ts +2 -2
  67. package/src/main/typescript/api/jsf.ts +15 -23
  68. package/src/main/typescript/impl/AjaxImpl.ts +15 -15
  69. package/src/main/typescript/impl/PushImpl.ts +139 -69
  70. package/src/main/typescript/impl/core/Const.ts +2 -2
  71. package/src/main/typescript/impl/i18n/Messages.ts +1 -1
  72. package/src/main/typescript/impl/util/Assertions.ts +1 -2
  73. package/src/main/typescript/impl/util/AsyncRunnable.ts +3 -4
  74. package/src/main/typescript/impl/util/ExtDomQuery.ts +19 -19
  75. package/src/main/typescript/impl/util/FileUtils.ts +30 -14
  76. package/src/main/typescript/impl/util/HiddenInputBuilder.ts +34 -34
  77. package/src/main/typescript/impl/util/Lang.ts +19 -22
  78. package/src/main/typescript/impl/util/XhrQueueController.ts +25 -3
  79. package/src/main/typescript/impl/xhrCore/ErrorData.ts +17 -12
  80. package/src/main/typescript/impl/xhrCore/EventData.ts +8 -7
  81. package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +3 -3
  82. package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +7 -6
  83. package/src/main/typescript/impl/xhrCore/Response.ts +3 -3
  84. package/src/main/typescript/impl/xhrCore/ResponseDataResolver.ts +0 -38
  85. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +17 -15
  86. package/src/main/typescript/impl/xhrCore/XhrFormData.ts +72 -63
  87. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +80 -134
  88. package/src/main/typescript/mona_dish_shim.ts +6 -2
  89. package/src/main/typescript/myfaces/OamSubmit.ts +10 -6
  90. package/src/main/typescript/test/api/JsfPushShimTest.spec.ts +126 -0
  91. package/src/main/typescript/test/api/MyFacesABTest.spec.ts +16 -0
  92. package/src/main/typescript/test/api/PushTypeCompatibility.ts +65 -0
  93. package/src/main/typescript/test/frameworkBase/LangTest.spec.ts +16 -0
  94. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -0
  95. package/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts +16 -0
  96. package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.ts +16 -0
  97. package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.ts +16 -0
  98. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +55 -9
  99. package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +16 -0
  100. package/src/main/typescript/test/impl/AssertionsTest.spec.ts +168 -0
  101. package/src/main/typescript/test/impl/FileUtilsTest.spec.ts +126 -0
  102. package/src/main/typescript/test/impl/ImplTest.spec.ts +75 -1
  103. package/src/main/typescript/test/impl/ResponseDataResolverTest.spec.ts +62 -0
  104. package/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.ts +91 -1
  105. package/src/main/typescript/test/impl/util/ExtLangTest.spec.ts +110 -0
  106. package/src/main/typescript/test/impl/util/HiddenInputBuilderTest.spec.ts +74 -0
  107. package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +61 -1
  108. package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +191 -2
  109. package/src/main/typescript/test/xhrCore/ClientWindow.spec.ts +16 -0
  110. package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +14 -0
  111. package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +21 -5
  112. package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +363 -4
  113. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +218 -4
  114. package/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts +1 -1
  115. package/src/main/typescript/test/xhrCore/WebsocketTest.spec.ts +764 -0
  116. package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +265 -62
  117. package/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.ts +16 -0
  118. package/{target/src/main/typescript/test/xhrCore/FakeWebsocket.js → src/main/typescript/tsconfig.ae.json} +16 -23
  119. package/src/main/typescript/{tsconfig.json → tsconfig.dts.json} +11 -27
  120. package/src/main/typescript/tsconfig.test.json +17 -0
  121. package/tsconfig.api-extractor.json +17 -0
  122. package/.claude/settings.local.json +0 -16
  123. package/.github/workflows/codeql-analysis.yml +0 -83
  124. package/.github/workflows/nodejs.yml +0 -26
  125. package/.mocharc.json +0 -10
  126. package/.nyc_output/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
  127. package/.nyc_output/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
  128. package/.nyc_output/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
  129. package/.nyc_output/processinfo/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
  130. package/.nyc_output/processinfo/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
  131. package/.nyc_output/processinfo/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
  132. package/.nyc_output/processinfo/index.json +0 -1
  133. package/.nycrc +0 -6
  134. package/build.cmd +0 -1
  135. package/build.sh +0 -3
  136. package/mvnw +0 -286
  137. package/mvnw.cmd +0 -161
  138. package/plans for 4.0.1.txt +0 -8
  139. package/remap.ts +0 -51
  140. package/src/main/typescript/test/xhrCore/WebsocketTest.ts +0 -221
  141. package/target/api/_api.js.map +0 -1
  142. package/target/api/faces.js +0 -45
  143. package/target/api/faces.js.map +0 -1
  144. package/target/api/jsf.js +0 -56
  145. package/target/api/jsf.js.map +0 -1
  146. package/target/impl/AjaxImpl.js +0 -748
  147. package/target/impl/AjaxImpl.js.map +0 -1
  148. package/target/impl/PushImpl.js +0 -265
  149. package/target/impl/PushImpl.js.map +0 -1
  150. package/target/impl/core/Const.js +0 -177
  151. package/target/impl/core/Const.js.map +0 -1
  152. package/target/impl/core/ImplTypes.js +0 -38
  153. package/target/impl/core/ImplTypes.js.map +0 -1
  154. package/target/impl/i18n/Messages.js +0 -113
  155. package/target/impl/i18n/Messages.js.map +0 -1
  156. package/target/impl/util/Assertions.js +0 -101
  157. package/target/impl/util/Assertions.js.map +0 -1
  158. package/target/impl/util/AsyncRunnable.js +0 -78
  159. package/target/impl/util/AsyncRunnable.js.map +0 -1
  160. package/target/impl/util/ExtDomQuery.js +0 -306
  161. package/target/impl/util/ExtDomQuery.js.map +0 -1
  162. package/target/impl/util/FileUtils.js +0 -98
  163. package/target/impl/util/FileUtils.js.map +0 -1
  164. package/target/impl/util/HiddenInputBuilder.js +0 -83
  165. package/target/impl/util/HiddenInputBuilder.js.map +0 -1
  166. package/target/impl/util/IListener.js +0 -3
  167. package/target/impl/util/IListener.js.map +0 -1
  168. package/target/impl/util/Lang.js +0 -263
  169. package/target/impl/util/Lang.js.map +0 -1
  170. package/target/impl/util/XhrQueueController.js +0 -92
  171. package/target/impl/util/XhrQueueController.js.map +0 -1
  172. package/target/impl/xhrCore/ErrorData.js +0 -87
  173. package/target/impl/xhrCore/ErrorData.js.map +0 -1
  174. package/target/impl/xhrCore/EventData.js +0 -52
  175. package/target/impl/xhrCore/EventData.js.map +0 -1
  176. package/target/impl/xhrCore/IResponseProcessor.js +0 -3
  177. package/target/impl/xhrCore/IResponseProcessor.js.map +0 -1
  178. package/target/impl/xhrCore/RequestDataResolver.js +0 -186
  179. package/target/impl/xhrCore/RequestDataResolver.js.map +0 -1
  180. package/target/impl/xhrCore/ResonseDataResolver.js +0 -104
  181. package/target/impl/xhrCore/ResonseDataResolver.js.map +0 -1
  182. package/target/impl/xhrCore/Response.js +0 -186
  183. package/target/impl/xhrCore/Response.js.map +0 -1
  184. package/target/impl/xhrCore/ResponseDataResolver.js +0 -104
  185. package/target/impl/xhrCore/ResponseDataResolver.js.map +0 -1
  186. package/target/impl/xhrCore/ResponseProcessor.js +0 -468
  187. package/target/impl/xhrCore/ResponseProcessor.js.map +0 -1
  188. package/target/impl/xhrCore/XhrFormData.js +0 -163
  189. package/target/impl/xhrCore/XhrFormData.js.map +0 -1
  190. package/target/impl/xhrCore/XhrRequest.js +0 -433
  191. package/target/impl/xhrCore/XhrRequest.js.map +0 -1
  192. package/target/mona_dish_shim.js +0 -70
  193. package/target/mona_dish_shim.js.map +0 -1
  194. package/target/myfaces/OamSubmit.js +0 -128
  195. package/target/myfaces/OamSubmit.js.map +0 -1
  196. package/target/src/main/typescript/api/_api.js.map +0 -1
  197. package/target/src/main/typescript/api/faces.js +0 -45
  198. package/target/src/main/typescript/api/faces.js.map +0 -1
  199. package/target/src/main/typescript/api/jsf.js +0 -56
  200. package/target/src/main/typescript/api/jsf.js.map +0 -1
  201. package/target/src/main/typescript/impl/AjaxImpl.js +0 -748
  202. package/target/src/main/typescript/impl/AjaxImpl.js.map +0 -1
  203. package/target/src/main/typescript/impl/PushImpl.js +0 -265
  204. package/target/src/main/typescript/impl/PushImpl.js.map +0 -1
  205. package/target/src/main/typescript/impl/core/Const.js +0 -177
  206. package/target/src/main/typescript/impl/core/Const.js.map +0 -1
  207. package/target/src/main/typescript/impl/core/ImplTypes.js +0 -38
  208. package/target/src/main/typescript/impl/core/ImplTypes.js.map +0 -1
  209. package/target/src/main/typescript/impl/i18n/Messages.js +0 -113
  210. package/target/src/main/typescript/impl/i18n/Messages.js.map +0 -1
  211. package/target/src/main/typescript/impl/util/Assertions.js +0 -101
  212. package/target/src/main/typescript/impl/util/Assertions.js.map +0 -1
  213. package/target/src/main/typescript/impl/util/AsyncRunnable.js +0 -78
  214. package/target/src/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
  215. package/target/src/main/typescript/impl/util/ExtDomQuery.js +0 -306
  216. package/target/src/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
  217. package/target/src/main/typescript/impl/util/FileUtils.js +0 -98
  218. package/target/src/main/typescript/impl/util/FileUtils.js.map +0 -1
  219. package/target/src/main/typescript/impl/util/HiddenInputBuilder.js +0 -83
  220. package/target/src/main/typescript/impl/util/HiddenInputBuilder.js.map +0 -1
  221. package/target/src/main/typescript/impl/util/IListener.js +0 -3
  222. package/target/src/main/typescript/impl/util/IListener.js.map +0 -1
  223. package/target/src/main/typescript/impl/util/Lang.js +0 -263
  224. package/target/src/main/typescript/impl/util/Lang.js.map +0 -1
  225. package/target/src/main/typescript/impl/util/XhrQueueController.js +0 -92
  226. package/target/src/main/typescript/impl/util/XhrQueueController.js.map +0 -1
  227. package/target/src/main/typescript/impl/xhrCore/ErrorData.js +0 -87
  228. package/target/src/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
  229. package/target/src/main/typescript/impl/xhrCore/EventData.js +0 -52
  230. package/target/src/main/typescript/impl/xhrCore/EventData.js.map +0 -1
  231. package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
  232. package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
  233. package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -186
  234. package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
  235. package/target/src/main/typescript/impl/xhrCore/Response.js +0 -186
  236. package/target/src/main/typescript/impl/xhrCore/Response.js.map +0 -1
  237. package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js +0 -104
  238. package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js.map +0 -1
  239. package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -468
  240. package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
  241. package/target/src/main/typescript/impl/xhrCore/XhrFormData.js +0 -163
  242. package/target/src/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
  243. package/target/src/main/typescript/impl/xhrCore/XhrRequest.js +0 -433
  244. package/target/src/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
  245. package/target/src/main/typescript/mona_dish_shim.js +0 -70
  246. package/target/src/main/typescript/mona_dish_shim.js.map +0 -1
  247. package/target/src/main/typescript/myfaces/OamSubmit.js +0 -128
  248. package/target/src/main/typescript/myfaces/OamSubmit.js.map +0 -1
  249. package/target/src/main/typescript/test/api/MyFacesABTest.spec.js +0 -117
  250. package/target/src/main/typescript/test/api/MyFacesABTest.spec.js.map +0 -1
  251. package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js +0 -123
  252. package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js.map +0 -1
  253. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
  254. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
  255. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
  256. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
  257. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
  258. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
  259. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
  260. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
  261. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
  262. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
  263. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -2
  264. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
  265. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
  266. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
  267. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
  268. package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
  269. package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
  270. package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
  271. package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
  272. package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
  273. package/target/src/main/typescript/test/impl/ImplTest.spec.js +0 -225
  274. package/target/src/main/typescript/test/impl/ImplTest.spec.js.map +0 -1
  275. package/target/src/main/typescript/test/impl/ImplTest_23.spec.js +0 -143
  276. package/target/src/main/typescript/test/impl/ImplTest_23.spec.js.map +0 -1
  277. package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js +0 -106
  278. package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js.map +0 -1
  279. package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js +0 -77
  280. package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
  281. package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js +0 -118
  282. package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js.map +0 -1
  283. package/target/src/main/typescript/test/myfaces/OnLoad.spec.js +0 -57
  284. package/target/src/main/typescript/test/myfaces/OnLoad.spec.js.map +0 -1
  285. package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js +0 -60
  286. package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js.map +0 -1
  287. package/target/src/main/typescript/test/queue/AsynchronousProbe.js +0 -93
  288. package/target/src/main/typescript/test/queue/AsynchronousProbe.js.map +0 -1
  289. package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js +0 -133
  290. package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
  291. package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js +0 -101
  292. package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js.map +0 -1
  293. package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js +0 -175
  294. package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
  295. package/target/src/main/typescript/test/xhrCore/EventTests.spec.js +0 -184
  296. package/target/src/main/typescript/test/xhrCore/EventTests.spec.js.map +0 -1
  297. package/target/src/main/typescript/test/xhrCore/FakeWebsocket.js.map +0 -1
  298. package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js +0 -181
  299. package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js.map +0 -1
  300. package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
  301. package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
  302. package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js +0 -199
  303. package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
  304. package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js +0 -567
  305. package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
  306. package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js +0 -845
  307. package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js.map +0 -1
  308. package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js +0 -382
  309. package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js.map +0 -1
  310. package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js +0 -667
  311. package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js.map +0 -1
  312. package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js +0 -367
  313. package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js.map +0 -1
  314. package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js +0 -123
  315. package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
  316. package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
  317. package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
  318. package/target/src/main/typescript/test/xhrCore/WebsocketTest.js +0 -207
  319. package/target/src/main/typescript/test/xhrCore/WebsocketTest.js.map +0 -1
  320. package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js +0 -149
  321. package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
  322. package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js +0 -130
  323. package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
  324. package/target/test/api/MyFacesABTest.spec.js +0 -117
  325. package/target/test/api/MyFacesABTest.spec.js.map +0 -1
  326. package/target/test/frameworkBase/LangTest.spec.js +0 -123
  327. package/target/test/frameworkBase/LangTest.spec.js.map +0 -1
  328. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
  329. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
  330. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
  331. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
  332. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
  333. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
  334. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
  335. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
  336. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
  337. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
  338. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -1
  339. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
  340. package/target/test/frameworkBase/_ext/monadish/fixtures/test.js.map +0 -1
  341. package/target/test/frameworkBase/_ext/monadish/fixtures/test2.js.map +0 -1
  342. package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
  343. package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
  344. package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
  345. package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
  346. package/target/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
  347. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
  348. package/target/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
  349. package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
  350. package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js +0 -16
  351. package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js.map +0 -1
  352. package/target/test/impl/ImplTest.spec.js +0 -225
  353. package/target/test/impl/ImplTest.spec.js.map +0 -1
  354. package/target/test/impl/ImplTest_23.spec.js +0 -143
  355. package/target/test/impl/ImplTest_23.spec.js.map +0 -1
  356. package/target/test/impl/SeparatorCharsTest.spec.js +0 -106
  357. package/target/test/impl/SeparatorCharsTest.spec.js.map +0 -1
  358. package/target/test/impl/util/ExtDomQueryTest.spec.js +0 -77
  359. package/target/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
  360. package/target/test/myfaces/OamSubmit.spec.js +0 -118
  361. package/target/test/myfaces/OamSubmit.spec.js.map +0 -1
  362. package/target/test/myfaces/OnLoad.spec.js +0 -57
  363. package/target/test/myfaces/OnLoad.spec.js.map +0 -1
  364. package/target/test/myfaces/ReserveNamespace.spec.js +0 -60
  365. package/target/test/myfaces/ReserveNamespace.spec.js.map +0 -1
  366. package/target/test/queue/AsynchronousProbe.js +0 -93
  367. package/target/test/queue/AsynchronousProbe.js.map +0 -1
  368. package/target/test/queue/AsynchronousQueueTest.spec.js +0 -133
  369. package/target/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
  370. package/target/test/xhrCore/ClientWindow.spec.js +0 -101
  371. package/target/test/xhrCore/ClientWindow.spec.js.map +0 -1
  372. package/target/test/xhrCore/ErrorChainTest.spec.js +0 -175
  373. package/target/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
  374. package/target/test/xhrCore/EventTests.spec.js +0 -184
  375. package/target/test/xhrCore/EventTests.spec.js.map +0 -1
  376. package/target/test/xhrCore/FakeWebsocket.js +0 -38
  377. package/target/test/xhrCore/FakeWebsocket.js.map +0 -1
  378. package/target/test/xhrCore/FileUploadTest.spec.js +0 -181
  379. package/target/test/xhrCore/FileUploadTest.spec.js.map +0 -1
  380. package/target/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
  381. package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
  382. package/target/test/xhrCore/OamSubmitTest.spec.js +0 -199
  383. package/target/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
  384. package/target/test/xhrCore/RequestParamsTest.spec.js +0 -567
  385. package/target/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
  386. package/target/test/xhrCore/RequestTest.spec.js +0 -845
  387. package/target/test/xhrCore/RequestTest.spec.js.map +0 -1
  388. package/target/test/xhrCore/RequestTest_23.spec.js +0 -382
  389. package/target/test/xhrCore/RequestTest_23.spec.js.map +0 -1
  390. package/target/test/xhrCore/ResponseTest.spec.js +0 -667
  391. package/target/test/xhrCore/ResponseTest.spec.js.map +0 -1
  392. package/target/test/xhrCore/ResponseTest23.spec.js +0 -367
  393. package/target/test/xhrCore/ResponseTest23.spec.js.map +0 -1
  394. package/target/test/xhrCore/ShadowDomTest.spec.js +0 -123
  395. package/target/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
  396. package/target/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
  397. package/target/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
  398. package/target/test/xhrCore/WebsocketTest.js +0 -207
  399. package/target/test/xhrCore/WebsocketTest.js.map +0 -1
  400. package/target/test/xhrCore/XhrFormDataTest.spec.js +0 -149
  401. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
  402. package/target/test/xhrCore/XhrRequestProgress.spec.js +0 -130
  403. package/target/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
  404. package/target/test/xhrCore/fixtures/addedViewHead1.js +0 -17
  405. package/target/test/xhrCore/fixtures/addedViewHead1.js.map +0 -1
  406. package/target/test/xhrCore/fixtures/addedViewHead2.js +0 -17
  407. package/target/test/xhrCore/fixtures/addedViewHead2.js.map +0 -1
  408. package/target/test/xhrCore/fixtures/addedViewHead3.js +0 -17
  409. package/target/test/xhrCore/fixtures/addedViewHead3.js.map +0 -1
  410. package/target/test/xhrCore/fixtures/nonce_script.js +0 -17
  411. package/target/test/xhrCore/fixtures/nonce_script.js.map +0 -1
  412. package/tsconfig.json +0 -9
  413. package/webpack.config.ts +0 -54
@@ -1,667 +0,0 @@
1
- "use strict";
2
- /*! Licensed to the Apache Software Foundation (ASF) under one or more
3
- * contributor license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright ownership.
5
- * The ASF licenses this file to you under the Apache License, Version 2.0
6
- * (the "License"); you may not use this file except in compliance with
7
- * the License. You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- 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 () {
34
- var ownKeys = function(o) {
35
- ownKeys = Object.getOwnPropertyNames || function (o) {
36
- var ar = [];
37
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
- return ar;
39
- };
40
- return ownKeys(o);
41
- };
42
- return function (mod) {
43
- if (mod && mod.__esModule) return mod;
44
- var result = {};
45
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
- __setModuleDefault(result, mod);
47
- return result;
48
- };
49
- })();
50
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
51
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52
- return new (P || (P = Promise))(function (resolve, reject) {
53
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
54
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
55
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
56
- step((generator = generator.apply(thisArg, _arguments || [])).next());
57
- });
58
- };
59
- Object.defineProperty(exports, "__esModule", { value: true });
60
- const mocha_1 = require("mocha");
61
- const StandardInits_1 = require("../frameworkBase/_ext/shared/StandardInits");
62
- const nise = __importStar(require("nise"));
63
- const XmlResponses_1 = require("../frameworkBase/_ext/shared/XmlResponses");
64
- const chai_1 = require("chai");
65
- const mona_dish_1 = require("mona-dish");
66
- const protocolPage = StandardInits_1.StandardInits.protocolPage;
67
- /**
68
- * response test
69
- * the idea is simply to pass in a dom
70
- * the context and a response xml and then check what happens
71
- * we do not need to go through the entire ajax cycle for that.
72
- */
73
- (0, mocha_1.describe)('Tests of the various aspects of the response protocol functionality', function () {
74
- let oldFlatMap = null;
75
- beforeEach(function () {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- let waitForResult = protocolPage();
78
- return waitForResult.then((close) => {
79
- this.xhr = nise.fakeXhr.useFakeXMLHttpRequest();
80
- this.requests = [];
81
- this.respond = (response) => {
82
- let xhrReq = this.requests.shift();
83
- xhrReq.responsetype = "text/xml";
84
- xhrReq.respond(200, { 'Content-Type': 'text/xml' }, response);
85
- return xhrReq;
86
- };
87
- this.xhr.onCreate = (xhr) => {
88
- this.requests.push(xhr);
89
- };
90
- global.XMLHttpRequest = this.xhr;
91
- window.XMLHttpRequest = this.xhr;
92
- oldFlatMap = Array.prototype["flatMap"];
93
- window["Es2019Array"] = mona_dish_1._Es2019Array;
94
- delete Array.prototype["flatMap"];
95
- this.closeIt = () => {
96
- global.XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
97
- Implementation.reset();
98
- close();
99
- };
100
- });
101
- });
102
- });
103
- afterEach(function () {
104
- this.closeIt();
105
- if (oldFlatMap) {
106
- Array.prototype["flatMap"] = oldFlatMap;
107
- oldFlatMap = null;
108
- }
109
- });
110
- it("must have a simple field updated as well as the viewstate", function (done) {
111
- //DQ.byId("cmd_update_insert").click();
112
- mona_dish_1.DQ.byId("cmd_update_insert").click();
113
- this.respond(XmlResponses_1.XmlResponses.UPDATE_INSERT_1);
114
- (0, chai_1.expect)(mona_dish_1.DQ.byId("changesArea")
115
- .html()
116
- .orElse("fail")
117
- .value.indexOf("update succeeded 1") != -1)
118
- .to.be.true;
119
- let pos1 = mona_dish_1.DQ.byId(document.body).html()
120
- .value.indexOf("insert before succeeded should display before test1");
121
- let pos3 = mona_dish_1.DQ.byId(document.body).html()
122
- .value.indexOf("insert after succeeded should display after test1");
123
- let pos2 = mona_dish_1.DQ.byId(document.body).html()
124
- .value.indexOf("update succeeded 1");
125
- (0, chai_1.expect)(pos1 != -1).to.be.true;
126
- (0, chai_1.expect)(pos1 < pos2 && pos2 < pos3).to.be.true;
127
- let pos4 = mona_dish_1.DQ.byId(document.body).html()
128
- .value.indexOf("embedded script at update succeed");
129
- (0, chai_1.expect)(pos4 != -1).to.be.true;
130
- done();
131
- });
132
- it("must have a simple field updated with the second before update rendering path", function (done) {
133
- //DQ.byId("cmd_update_insert").click();
134
- mona_dish_1.DQ.byId("cmd_update_insert").click();
135
- this.respond(XmlResponses_1.XmlResponses.UPDATE_INSERT_2);
136
- (0, chai_1.expect)(mona_dish_1.DQ.byId("changesArea")
137
- .html()
138
- .orElse("fail")
139
- .value.indexOf("update succeeded 2") != -1)
140
- .to.be.true;
141
- let pos1 = mona_dish_1.DQ.byId(document.body).html()
142
- .value.indexOf("insert before succeeded should display before test1");
143
- let pos3 = mona_dish_1.DQ.byId(document.body).html()
144
- .value.indexOf("insert after succeeded should display after test1");
145
- let pos2 = mona_dish_1.DQ.byId(document.body).html()
146
- .value.indexOf("update succeeded 2");
147
- (0, chai_1.expect)(pos1 != -1).to.be.true;
148
- (0, chai_1.expect)(pos1 < pos2 && pos2 < pos3).to.be.true;
149
- let pos4 = mona_dish_1.DQ.byId(document.body).html()
150
- .value.indexOf("embedded script at update succeed");
151
- (0, chai_1.expect)(pos4 != -1).to.be.true;
152
- done();
153
- });
154
- it("must have a full body update", function () {
155
- mona_dish_1.DQ.byId("cmd_replace").click();
156
- this.respond(XmlResponses_1.XmlResponses.BODY_REPLACEMENT);
157
- //basic replacement
158
- let newBody = mona_dish_1.DQ.byId(document.body);
159
- let newContent = newBody.html().value;
160
- //standard replacement successful
161
- (0, chai_1.expect)(newContent.indexOf("<h3>Body replacement test successful</h3>") != -1, "elements must be updated").to.be.true;
162
- //script eval
163
- (0, chai_1.expect)(newContent.indexOf(">hello from embedded script in replacement body<") != -1, "embedded scripts must be executed").to.be.true;
164
- //body attributes
165
- (0, chai_1.expect)(newBody.hasClass("tundra"), "attributes must be updated").to.be.true;
166
- (0, chai_1.expect)(newBody.id.value == "the_id", "id must be updated").to.be.true;
167
- });
168
- it("must have a proper working head replace", function () {
169
- mona_dish_1.DQ.byId("cmd_replace").click();
170
- this.respond(XmlResponses_1.XmlResponses.HEAD_REPLACEMENT);
171
- //basic replacement
172
- let newBody = mona_dish_1.DQ.byId(document.body);
173
- let newContent = newBody.html().value;
174
- //standard replacement successful
175
- //script eval
176
- //modern browsers block head replacement but you still can eval
177
- (0, chai_1.expect)(newContent.indexOf(">hello from embedded script in replacement head") != -1, "embedded scripts must be executed").to.be.true;
178
- });
179
- it("must have a proper workiung root replace", function () {
180
- mona_dish_1.DQ.byId("cmd_replace").click();
181
- this.respond(XmlResponses_1.XmlResponses.VIEW_ROOT_REPLACEMENT);
182
- //basic replacement
183
- let newHead = mona_dish_1.DQ.byId(document.head);
184
- let newBody = mona_dish_1.DQ.byId(document.body);
185
- let newContent = newBody.html().value;
186
- (0, chai_1.expect)(newHead.isPresent(), " head must exist ").to.be.true;
187
- //standard replacement successful
188
- (0, chai_1.expect)(newContent.indexOf("<h3>Body replacement test successful</h3>") != -1, "elements must be updated").to.be.true;
189
- //script eval
190
- (0, chai_1.expect)(newContent.indexOf(">hello from embedded script in replacement body<") != -1, "embedded scripts must be executed").to.be.true;
191
- //body attributes
192
- (0, chai_1.expect)(newBody.hasClass("tundra"), "attributes must be updated").to.be.true;
193
- (0, chai_1.expect)(newBody.id.value == "the_id", "id must be updated").to.be.true;
194
- //standard replacement successful
195
- //script eval
196
- //modern browsers block head replacement but you still can eval
197
- (0, chai_1.expect)(newContent.indexOf(">hello from embedded script in replacement head") != -1, "embedded scripts must be executed").to.be.true;
198
- });
199
- it("must have a viewState update to be performed", function () {
200
- mona_dish_1.DQ.byId("cmd_viewstate").click();
201
- this.respond(XmlResponses_1.XmlResponses.VIEWSTATE_1);
202
- let viewStateElem = mona_dish_1.DQ.byId('jakarta.faces.ViewState');
203
- (0, chai_1.expect)(viewStateElem.inputValue.value == "hello world").to.be.true;
204
- });
205
- it("must have processed a proper delete", function () {
206
- mona_dish_1.DQ.byId("cmd_delete").click();
207
- this.respond(XmlResponses_1.XmlResponses.DELETE_1);
208
- (0, chai_1.expect)(mona_dish_1.DQ.byId("deletable").isAbsent()).to.be.true;
209
- });
210
- it("must have processed a proper eval of a script given in the eval tag", function () {
211
- mona_dish_1.DQ.byId("cmd_eval").click();
212
- this.respond(XmlResponses_1.XmlResponses.EVAL_1);
213
- let resultHTML = mona_dish_1.DQ.byId(document.body).html().value;
214
- (0, chai_1.expect)(resultHTML.indexOf('eval test succeeded') != -1).to.be.true;
215
- });
216
- it("must have updated the viewstates properly", function (done) {
217
- mona_dish_1.DQ.byId("cmd_eval").click();
218
- /*js full submit form, coming from the integration tests*/
219
- window.document.body.innerHTML = `<form id="j_id__v_0" name="j_id__v_0" method="post" action="/IntegrationJSTest/integrationtestsjasmine/test7-eventtest.jsf"
220
- ><span id="updatePanel">hello world</span><a href="#"
221
- onclick="return faces.util.chain(this, event,'return false;', 'return myfaces.ab(\'j_id_1l\',\'updateTrigger\');');"
222
- id="updateTrigger"
223
- name="updateTrigger"
224
- class="updateTrigger">[Press
225
- me for Update]</a><input type="hidden" name="j_id_1l_SUBMIT" value="1">
226
- </form>`;
227
- faces.ajax.request(window.document.getElementById("updateTrigger"), null, {
228
- render: "updatePanel",
229
- execute: "updatePanel updateTrigger"
230
- });
231
- // language=XML
232
- this.respond(`<?xml version="1.0" encoding="UTF-8"?>
233
- <partial-response id="j_id__v_0">
234
- <changes>
235
- <update id="updatePanel"><![CDATA[<span id="updatePanel">hello world</span>]]></update>
236
- <update id="j_id__v_0:jakarta.faces.ViewState:1"><![CDATA[RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD]]></update>
237
- </changes>
238
- </partial-response>`);
239
- setTimeout(() => {
240
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("[name*='jakarta.faces.ViewState']").isPresent()).to.be.true;
241
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("[name*='jakarta.faces.ViewState']").val == "RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD").to.be.true;
242
- done();
243
- }, 100);
244
- });
245
- it("must have updated the viewstates properly with lenient update block", function () {
246
- mona_dish_1.DQ.byId("cmd_eval").click();
247
- /*js full submit form, coming from the integration tests*/
248
- window.document.body.innerHTML = `<form id="j_id__v_0" name="j_id__v_0" method="post" action="/IntegrationJSTest/integrationtestsjasmine/test7-eventtest.jsf"
249
- ><span id="updatePanel">hello world</span><a href="#"
250
- onclick="return faces.util.chain(this, event,'return false;', 'return myfaces.ab(\'j_id_1l\',\'updateTrigger\');');"
251
- id="updateTrigger"
252
- name="updateTrigger"
253
- class="updateTrigger">[Press
254
- me for Update]</a><input type="hidden" name="j_id_1l_SUBMIT" value="1">
255
- </form>`;
256
- faces.ajax.request(window.document.getElementById("updateTrigger"), null, {
257
- render: "updatePanel",
258
- execute: "updatePanel updateTrigger"
259
- });
260
- // language=XML
261
- this.respond(`<?xml version="1.0" encoding="UTF-8"?>
262
- <partial-response id="j_id__v_0">
263
- <changes>
264
- <update id="updatePanel"><![CDATA[<span id="updatePanel">hello world</span>]]></update>
265
- <update id="j_id__v_0:jakarta.faces.ViewState:1"><![CDATA[RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD]]><!--
266
- Some random junk which is sent by the server
267
- --></update>
268
- </changes>
269
- </partial-response>`);
270
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("[name*='jakarta.faces.ViewState']").isAbsent()).to.be.false;
271
- // expect((<HTMLInputElement>document.getElementsByName("jakarta.faces.ViewState")[0]).value == "RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD").to.be.true;
272
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("[name*='jakarta.faces.ViewState']").inputValue.value == "RTUyRDI0NzE4QzAxM0E5RDAwMDAwMDVD").to.be.true;
273
- });
274
- /**
275
- * The body innerHTML is based on a Tobago page. View state and client window id is rendered within a
276
- * jsf-state-container.
277
- * Beside the tobago-out tag, the view state and the client window id must be updated properly.
278
- */
279
- it("must have updated the client window tag properly", function () {
280
- window.document.body.innerHTML = `<tobago-page locale='en' class='container-fluid' id='page'>
281
- <form action='/IntegrationJSTest/integrationtestsjasmine/tobago-jfwid-test.jsf' id='page::form' method='post' accept-charset='UTF-8' data-tobago-context-path=''>
282
- <input type='hidden' name='jakarta.faces.source' id='jakarta.faces.source' disabled='disabled'>
283
- <tobago-focus id='page::lastFocusId'>
284
- <input type='hidden' name='page::lastFocusId' id='page::lastFocusId::field'>
285
- </tobago-focus>
286
- <input type='hidden' name='org.apache.myfaces.tobago.webapp.Secret' id='org.apache.myfaces.tobago.webapp.Secret' value='SLrPlxqLEaR/oYFLSu4wgg=='>
287
- <tobago-in id='page:input' class='tobago-margin-bottom'>
288
- <input type='text' name='page:input' id='page:input::field' class='tobago-in form-control' value='Alice'>
289
- <tobago-behavior event='change' client-id='page:input' field-id='page:input::field' execute='page:input' render='page:output'></tobago-behavior>
290
- </tobago-in>
291
- <div id='page:output' class='tobago-margin-bottom'>
292
- <tobago-out class='form-control-plaintext'></tobago-out>
293
- </div>
294
- <div class='tobago-page-menuStore'></div>
295
- <span id='page::jsf-state-container'>
296
- <input type='hidden' name='jakarta.faces.ViewState' id='j_id__v_0:jakarta.faces.ViewState:1' value='RkExQ0Q1NTYzOTNCNzg0RjAwMDAwMDE4' autocomplete='off'>
297
- <input type='hidden' name='jakarta.faces.RenderKitId' value='tobago'>
298
- <input type='hidden' id='j_id__v_0:jakarta.faces.ClientWindow:1' name='jakarta.faces.ClientWindow' value='5m10kooxi'>
299
- </span>
300
- </form>
301
- </tobago-page>`;
302
- (0, chai_1.expect)(mona_dish_1.DQ.querySelectorAll("#page\\:output tobago-out").textContent() === "").to.be.true;
303
- (0, chai_1.expect)(mona_dish_1.DQ.byId("j_id__v_0:jakarta.faces.ViewState:1").isAbsent()).to.be.false;
304
- (0, chai_1.expect)(mona_dish_1.DQ.byId("j_id__v_0:jakarta.faces.ClientWindow:1").isAbsent()).to.be.false;
305
- faces.ajax.request(window.document.getElementById("page:input"), "change", {
306
- "jakarta.faces.behavior.event": "change",
307
- execute: "page:input",
308
- render: "page:output"
309
- });
310
- this.respond(`<?xml version="1.0" encoding="UTF-8"?>
311
- <partial-response id='j_id__v_0'>
312
- <changes>
313
- <update id='page:output'><![CDATA[
314
- <div id='page:output' class='tobago-margin-bottom'>
315
- <tobago-out class='form-control-plaintext'>Alice</tobago-out>
316
- </div>]]>
317
- </update>
318
- <update id='j_id__v_0:jakarta.faces.ViewState:1'><![CDATA[MDQwQzkxNkU0MTg0RTQxRjAwMDAwMDE3]]>
319
- </update>
320
- <update id='j_id__v_0:jakarta.faces.ClientWindow:1'><![CDATA[5m10kooxg]]>
321
- </update>
322
- </changes>
323
- </partial-response>`);
324
- (0, chai_1.expect)(mona_dish_1.DQ.querySelectorAll("#page\\:output tobago-out").textContent() === "Alice").to.be.true;
325
- (0, chai_1.expect)(mona_dish_1.DQ.byId("j_id__v_0:jakarta.faces.ViewState:1").isAbsent()).to.be.false;
326
- (0, chai_1.expect)(mona_dish_1.DQ.byId("j_id__v_0:jakarta.faces.ClientWindow:1").isAbsent()).to.be.false;
327
- });
328
- it("must handle simple resource responses properly", function (done) {
329
- // we need to fake the response as well to see whether the server has loaded the addedViewHead code and has interpreted it
330
- //(window as any)["test"] = "booga";
331
- mona_dish_1.DQ.byId("cmd_simple_resource").click();
332
- this.respond(XmlResponses_1.XmlResponses.SIMPLE_RESOURCE_RESPONSE);
333
- (0, chai_1.expect)(document.head.innerHTML.indexOf("../../../xhrCore/fixtures/addedViewHead1.js") != -1).to.be.true;
334
- mona_dish_1.DQ.byId(document.body).waitUntilDom(() => mona_dish_1.DQ.byId('resource_area_1').innerHTML === "true")
335
- .then(() => done())
336
- .catch(done);
337
- });
338
- it("only single resources are allowed", function (done) {
339
- // we need to fake the response as well to see whether the server has loaded the addedViewHead code and has interpreted it
340
- //(window as any)["test"] = "booga";
341
- for (let cnt = 0; cnt < 10; cnt++) {
342
- mona_dish_1.DQ.byId("cmd_simple_resource").click();
343
- this.respond(XmlResponses_1.XmlResponses.MULTIPLE_RESOURCE_RESPONSE);
344
- }
345
- (0, chai_1.expect)(document.head.innerHTML.indexOf("../../../xhrCore/fixtures/addedViewHead2.js") != -1).to.be.true;
346
- let addedScriptsCnt = mona_dish_1.DomQuery.byId(document.head).querySelectorAll("script[src='../../../xhrCore/fixtures/addedViewHead2.js']").length;
347
- (0, chai_1.expect)(addedScriptsCnt).to.eq(1);
348
- addedScriptsCnt = mona_dish_1.DomQuery.byId(document.head).querySelectorAll("style[rel='../../../xhrCore/fixtures/addedViewHead2.css']").length;
349
- (0, chai_1.expect)(addedScriptsCnt).to.eq(1);
350
- done();
351
- });
352
- //TODO implement secondary response mockup
353
- it("must handle complex resource responses properly", function (done) {
354
- mona_dish_1.DQ.byId("cmd_complex_resource").click();
355
- this.respond(XmlResponses_1.XmlResponses.MULTIPLE_RESOURCE_RESPONSE);
356
- let headHTML = document.head.innerHTML;
357
- (0, chai_1.expect)(headHTML.indexOf("../../../xhrCore/fixtures/addedViewHead2.js")).not.eq(-1);
358
- (0, chai_1.expect)(headHTML.indexOf("rel=\"../../../xhrCore/fixtures/addedViewHead2.css\"")).not.eq(-1);
359
- mona_dish_1.DQ.byId(document.body).waitUntilDom(() => mona_dish_1.DQ.byId('resource_area_2').innerHTML === "true2")
360
- .then(() => done())
361
- .catch(done);
362
- });
363
- it("embedded scripts must be evaled", function (done) {
364
- mona_dish_1.DQ.byId("cmd_complex_resource2").click();
365
- this.respond(XmlResponses_1.XmlResponses.EMBEDDED_SCRIPTS_RESOURCE_RESPONSE);
366
- // this.respond("debugger; document.getElementById('resource_area_1').innerHTML = 'true3'", {'Content-Type': 'text/javascript'});
367
- let headHTML = document.head.innerHTML;
368
- (0, chai_1.expect)(headHTML.indexOf("../../../xhrCore/fixtures/addedViewHead3.js")).not.eq(-1);
369
- (0, chai_1.expect)(headHTML.indexOf("href=\"../../../xhrCore/fixtures/addedViewHead2.css\"")).not.eq(-1);
370
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("head link[rel='stylesheet'][href='../../../xhrCore/fixtures/addedViewHead2.css']").length).to.eq(1);
371
- setTimeout(() => {
372
- let evalAreaHtml = mona_dish_1.DQ.byId('resource_area_1').innerHTML;
373
- //last one must be the last item, order must be preserved
374
- (0, chai_1.expect)(evalAreaHtml).to.eq("booga");
375
- done();
376
- }, 800);
377
- });
378
- it("head replacement must work (https://issues.apache.org/jira/browse/MYFACES-4498 and TCK Issue 4345IT)", function (done) {
379
- mona_dish_1.DQ.byId("cmd_complex_resource2").click();
380
- this.respond(XmlResponses_1.XmlResponses.HEAD_REPLACE);
381
- let headHTML = document.head.innerHTML;
382
- //failing now, no elements in the html head after respond!!!
383
- (0, chai_1.expect)(headHTML.indexOf("href=\"../../../xhrCore/fixtures/addedViewHead2.css\"")).not.eq(-1);
384
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("head link[rel='stylesheet'][href='../../../xhrCore/fixtures/addedViewHead2.css']").length).to.eq(1);
385
- (0, chai_1.expect)(headHTML.indexOf("../../../xhrCore/fixtures/addedViewHead3.js")).not.eq(-1);
386
- setTimeout(() => {
387
- let evalAreaHtml = mona_dish_1.DQ.byId('resource_area_1').innerHTML;
388
- //last one must be the last item, order must be preserved
389
- (0, chai_1.expect)(evalAreaHtml).to.eq("booga");
390
- done();
391
- }, 800);
392
- });
393
- it("complex head replacement must work", function (done) {
394
- mona_dish_1.DQ.byId("cmd_complex_resource2").click();
395
- this.respond(XmlResponses_1.XmlResponses.HEAD_REPLACE2);
396
- let headHTML = document.head.innerHTML;
397
- //failing now, no elements in the html head after respond!!!
398
- (0, chai_1.expect)(headHTML.indexOf("href=\"../../../xhrCore/fixtures/addedViewHead2.css\"")).not.eq(-1);
399
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("head link[rel='stylesheet'][href='../../../xhrCore/fixtures/addedViewHead2.css']").length).to.eq(1);
400
- let metas = (0, mona_dish_1.DQ$)("head meta");
401
- (0, chai_1.expect)(metas.length).to.eq(5);
402
- (0, chai_1.expect)(metas.get(0).attr("charSet").value == "UTF-8");
403
- (0, chai_1.expect)(metas.get(4).attr("author").value == "Whoever");
404
- (0, chai_1.expect)(headHTML.indexOf("../../../xhrCore/fixtures/addedViewHead3.js")).not.eq(-1);
405
- setTimeout(() => {
406
- let evalAreaHtml = mona_dish_1.DQ.byId('resource_area_1').innerHTML;
407
- //last one must be the last item, order must be preserved
408
- (0, chai_1.expect)(evalAreaHtml).to.eq("booga");
409
- done();
410
- }, 800);
411
- });
412
- const INNER_HTML_MULIT_VIEW = `
413
- <div id="viewroot_1">
414
- <form id="viewroot_1:form1">
415
- <button type="submit" id="viewroot_1:submit_1"></button>
416
- <input type="hidden" id="viewroot_1:form1:jakarta.faces.ViewState:1" name="jakarta.faces.ViewState" value="booga"></input>
417
- </form>
418
- <form id="viewroot_1:form2">
419
- <button type="submit" id="viewroot_1:submit_2"></button>
420
- </form>
421
- </div>
422
-
423
- <div id="viewroot_2">
424
- <form id="viewroot_2:form1">
425
- <button type="submit" id="viewroot_1:submit_2"></button>
426
- </form>
427
- </div>
428
- `;
429
- it("must handle multiple view roots", function (done) {
430
- const RESPONSE_1 = `<?xml version="1.0" encoding="UTF-8"?>
431
- <partial-response id='viewroot_1'>
432
- <changes>
433
- <update id='viewroot_1:jakarta.faces.ViewState:1'><![CDATA[updatedVST]]></update>
434
- </changes>
435
- </partial-response>`;
436
- window.document.body.innerHTML = INNER_HTML_MULIT_VIEW;
437
- faces.ajax.request(window.document.getElementById("viewroot_1:submit_1"), null, {
438
- "javax.faces.behavior.event": "change",
439
- execute: "submit_1",
440
- render: "form1"
441
- });
442
- this.respond(RESPONSE_1);
443
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form2 [name='jakarta.faces.ViewState']").isAbsent()).to.be.true;
444
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form1 [name='jakarta.faces.ViewState']").isPresent()).to.be.true;
445
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form1 [name='jakarta.faces.ViewState']").val).to.be.eq("updatedVST");
446
- done();
447
- });
448
- it("must handle multiple view roots multi forms", function (done) {
449
- const RESPONSE_1 = `<?xml version="1.0" encoding="UTF-8"?>
450
- <partial-response id='viewroot_1'>
451
- <changes>
452
- <update id='viewroot_1:jakarta.faces.ViewState:1'><![CDATA[updatedVST]]></update>
453
- </changes>
454
- </partial-response>`;
455
- window.document.body.innerHTML = INNER_HTML_MULIT_VIEW;
456
- faces.ajax.request(window.document.getElementById("viewroot_1:submit_1"), null, {
457
- "javax.faces.behavior.event": "change",
458
- execute: "submit_1",
459
- render: "viewroot_1:form1 submit_2"
460
- });
461
- this.respond(RESPONSE_1);
462
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form2 [name*='jakarta.faces.ViewState']").isPresent()).to.be.true;
463
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form1 [name*='jakarta.faces.ViewState']").isPresent()).to.be.true;
464
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_2\\:form1\\:form1 [name*='jakarta.faces.ViewState']").isAbsent()).to.be.true;
465
- (0, chai_1.expect)(faces.getViewState((0, mona_dish_1.DQ$)("#viewroot_1\\:form2").getAsElem(0).value).indexOf("jakarta.faces.ViewState=updatedVST") != -1).to.be.true;
466
- (0, chai_1.expect)(faces.getViewState("viewroot_1:form1").indexOf("jakarta.faces.ViewState=updatedVST") != -1).to.be.true;
467
- done();
468
- });
469
- it("must handle multiple view roots with ClientWindow ids", function (done) {
470
- const RESPONSE_1 = `<?xml version="1.0" encoding="UTF-8"?>
471
- <partial-response id='viewroot_1'>
472
- <changes>
473
- <update id='viewroot_1:jakarta.faces.ClientWindow:1'><![CDATA[updatedViewId]]></update>
474
- </changes>
475
- </partial-response>`;
476
- window.document.body.innerHTML = INNER_HTML_MULIT_VIEW;
477
- faces.ajax.request(window.document.getElementById("viewroot_1:submit_1"), null, {
478
- "javax.faces.behavior.event": "change",
479
- execute: "submit_1",
480
- render: "viewroot_1:form1"
481
- });
482
- this.respond(RESPONSE_1);
483
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form2 [name*='jakarta.faces.ClientWindow']").isAbsent()).to.be.true;
484
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form1 [name*='jakarta.faces.ClientWindow']").isPresent()).to.be.true;
485
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form1 [name*='jakarta.faces.ClientWindow']").val).to.be.eq("updatedViewId");
486
- done();
487
- });
488
- it("must handle multiple view roots multi forms with ClientWindow ids", function (done) {
489
- const RESPONSE_1 = `<?xml version="1.0" encoding="UTF-8"?>
490
- <partial-response id='viewroot_1'>
491
- <changes>
492
- <update id='viewroot_1:jakarta.faces.ClientWindow:1'><![CDATA[updatedViewId]]></update>
493
- </changes>
494
- </partial-response>`;
495
- window.document.body.innerHTML = INNER_HTML_MULIT_VIEW;
496
- faces.ajax.request(window.document.getElementById("viewroot_1:submit_1"), null, {
497
- "javax.faces.behavior.event": "change",
498
- execute: "submit_1",
499
- render: "viewroot_1:form1 :submit_2"
500
- });
501
- this.respond(RESPONSE_1);
502
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form2 [name*='jakarta.faces.ClientWindow']").isPresent()).to.be.true;
503
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form1 [name*='jakarta.faces.ClientWindow']").isPresent()).to.be.true;
504
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_2\\:form1\\:form1 [name*='jakarta.faces.ClientWindow']").isAbsent()).to.be.true;
505
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form2 [name*='jakarta.faces.ClientWindow']").val).to.be.eq("updatedViewId");
506
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#viewroot_1\\:form1 [name*='jakarta.faces.ClientWindow']").val).to.be.eq("updatedViewId");
507
- done();
508
- });
509
- const TCK_790_MARKUP = `
510
- <div id="panel1">
511
- <form id="form1" name="form1" method="post"
512
- action="booga"
513
- ><input id="form1:button" name="form1:button" type="submit"
514
- value="submit form1 via ajax">
515
- <input type="hidden" name="jakarta.faces.ViewState"
516
- id="viewroot_1:jakarta.faces.ViewState:1"
517
- value="beforeUpdate">
518
- </form>
519
- </div>
520
- <div id="panel2">
521
- <form id="form2" name="form2" method="post" action="booga2"
522
- ><a href="#" id="form2:link" name="form2:link"></a>
523
- </form>
524
- </div>
525
- <div id="panel3">
526
- <form id="form3" name="form3" method="post" action="booga3"
527
- ><a href="#" id="form3:link" name="form3:link"></a>
528
- </form>
529
- </div>
530
- `;
531
- const TCK_790_NAV_MARKUP = `
532
- <form id="form1x" name="form1" method="post"
533
- action="booga"
534
- ><input id="form1x:button" name="form1x:button" type="submit"
535
- value="submit form1 via ajax">
536
- <input type="hidden" name="jakarta.faces.ViewState"
537
- id="viewroot_1:jakarta.faces.ViewState:1"
538
- value="beforeUpdate">
539
- </form>
540
- `;
541
- /**
542
- * Similar to TCK 790
543
- */
544
- it("must handle a more complex replace with several forms and one issuing form and a viewstate and a viewroot id in response but viewroot is not present in page", function (done) {
545
- document.body.innerHTML = TCK_790_MARKUP;
546
- const RESPONSE_1 = `<partial-response id="viewroot_1">
547
- <changes>
548
- <update id="panel2"><![CDATA[
549
- <div id="panel2">
550
- after update
551
- <form id="form2" name="form2" method="post" action="booga2"
552
- ><a href="#" id="form2:link" name="form2:link"></a>
553
- <input type="hidden" name="form2_SUBMIT" value="1"/></form>
554
- </div>
555
- ]]>
556
- </update>
557
- <update id="panel3"><![CDATA[
558
- <div id="panel3">
559
- after update
560
- <form id="form3" name="form3" method="post" action="booga3"
561
- ><a href="#" id="form3:link" name="form3:link"></a>
562
- </form>
563
- </div>
564
- ]]>
565
- </update>
566
- <update id="viewroot_1:jakarta.faces.ViewState:1"><![CDATA[booga_after_update]]></update>
567
- </changes>
568
- </partial-response>`;
569
- faces.ajax.request(window.document.getElementById("form1:button"), null, {
570
- "javax.faces.behavior.event": "click",
571
- execute: "form1",
572
- render: "form2 form3"
573
- });
574
- this.respond(RESPONSE_1);
575
- // all forms in execute and render must receive the latest viewstate
576
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form1 [name*='jakarta.faces.ViewState']").val).to.eq("booga_after_update");
577
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form2 [name*='jakarta.faces.ViewState']").val).to.eq("booga_after_update");
578
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form2 [name*='jakarta.faces.ViewState']").val).to.eq("booga_after_update");
579
- done();
580
- });
581
- it("must handle a complex navigation response (TCK Spec790)", function (done) {
582
- /*we start from a simple form which triggers a an internal navigation*/
583
- document.body.innerHTML = TCK_790_NAV_MARKUP;
584
- faces.ajax.request(window.document.getElementById("form1x:button"), null, {
585
- "javax.faces.behavior.event": "click",
586
- execute: "@form",
587
- render: ":form1x:button"
588
- });
589
- //TODO xhr stubbing, to check if the viewId is prepended in render!
590
- global["state_1"] = true;
591
- this.respond(`<?xml version="1.0" encoding="UTF-8"?>
592
- <partial-response id="viewroot_1">
593
- <changes>
594
- <update id="jakarta.faces.ViewRoot"><![CDATA[<!DOCTYPE html>
595
- <html xmlns="http://www.w3.org/1999/xhtml">
596
- <head>
597
- <title>Spec 790</title>
598
- <script src="/jakarta.faces.resource/faces.js.xhtml?ln=jakarta.faces;stage=Development"></script>
599
- </head>
600
- <body>
601
- <div id="panel1">
602
- <form id="form1" name="form1" method="post"
603
- action="booga"
604
- ><input id="form1:button" name="form1:button" type="submit"
605
- value="submit form1 via ajax">
606
- </form>
607
- </div>
608
- <div id="panel2">
609
- after update
610
- <form id="form2" name="form2" method="post" action="booga2"
611
- ><a href="#" id="form2:link" name="form2:link"></a>
612
- <input type="hidden" name="form2_SUBMIT" value="1"/></form>
613
- </div>
614
- <div id="panel3">
615
- after update
616
- <form id="form3" name="form3" method="post" action="booga3"
617
- ><a href="#" id="form3:link" name="form3:link"></a>
618
- </form>
619
- </div>
620
- </body>
621
- </html>
622
- ]]>
623
- </update>
624
- <update id="viewroot_1:jakarta.faces.ViewState:1"><![CDATA[booga_after_update]]></update>
625
- </changes>
626
- </partial-response>
627
- `);
628
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form1 [name*='jakarta.faces.ViewState']").val).to.eq("booga_after_update");
629
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form2 [name*='jakarta.faces.ViewState']").val).to.eq("booga_after_update");
630
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form3 [name*='jakarta.faces.ViewState']").val).to.eq("booga_after_update");
631
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form1 [name*='jakarta.faces.ViewState']").id.value.indexOf("viewroot_1:jakarta.faces.ViewState:1") === 0).to.be.true;
632
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form2 [name*='jakarta.faces.ViewState']").id.value.indexOf("viewroot_1:jakarta.faces.ViewState:2") === 0).to.be.true;
633
- (0, chai_1.expect)((0, mona_dish_1.DQ$)("#form3 [name*='jakarta.faces.ViewState']").id.value.indexOf("viewroot_1:jakarta.faces.ViewState:3") === 0).to.be.true;
634
- done();
635
- });
636
- it('must handle a ViewExpired Error correctly, and only once in a listener', function (done) {
637
- document.body.innerHTML = TCK_790_NAV_MARKUP;
638
- const oldErr = console.error;
639
- console.error = () => { };
640
- try {
641
- let errorCalled = 0;
642
- faces.ajax.addOnError((error) => {
643
- (0, chai_1.expect)(error.errorName).to.eq("jakarta.faces.application.ViewExpiredException");
644
- (0, chai_1.expect)(error.errorMessage).to.eq("serverError: View \"/testhmtl.xhtml\" could not be restored.");
645
- (0, chai_1.expect)(error.source.id).to.eq("form1x:button");
646
- errorCalled++;
647
- });
648
- faces.ajax.request(window.document.getElementById("form1x:button"), null, {
649
- "javax.faces.behavior.event": "click",
650
- execute: "@form",
651
- render: ":form1x:button"
652
- });
653
- this.respond(`<?xml version="1.0" encoding="UTF-8"?>
654
- <partial-response><error>
655
- <error-name>jakarta.faces.application.ViewExpiredException</error-name>
656
- <error-message><![CDATA[View "/testhmtl.xhtml" could not be restored.]]></error-message>
657
- </error>
658
- </partial-response>`);
659
- (0, chai_1.expect)(errorCalled).to.eq(1);
660
- }
661
- finally {
662
- console.error = oldErr;
663
- }
664
- done();
665
- });
666
- });
667
- //# sourceMappingURL=ResponseTest.spec.js.map