@sap_oss/wdio-qmate-service 3.8.0 → 3.10.0

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 (526) hide show
  1. package/.eslintrc.yml +4 -4
  2. package/.prettierrc.json +7 -7
  3. package/CLAUDE.md +10 -10
  4. package/CONTRIBUTING.md +1 -1
  5. package/README.md +6 -2
  6. package/lib/reuse/authenticator/authConfig.js +3 -3
  7. package/lib/reuse/authenticator/authConfig.js.map +1 -1
  8. package/lib/reuse/authenticator/authHandler.js +0 -2
  9. package/lib/reuse/authenticator/authHandler.js.map +1 -1
  10. package/lib/reuse/authenticator/basicUrlAuthenticator.js.map +1 -1
  11. package/lib/reuse/authenticator/customAuthenticator.js +1 -3
  12. package/lib/reuse/authenticator/customAuthenticator.js.map +1 -1
  13. package/lib/reuse/authenticator/formAuthenticator.js +1 -3
  14. package/lib/reuse/authenticator/formAuthenticator.js.map +1 -1
  15. package/lib/reuse/helper/clientsideUI5scripts.js +15 -19
  16. package/lib/reuse/helper/clientsideUI5scripts.js.map +1 -1
  17. package/lib/reuse/helper/dateTimeFormatParser.js +8 -2
  18. package/lib/reuse/helper/dateTimeFormatParser.js.map +1 -1
  19. package/lib/reuse/helper/elementHighlight.js +2 -6
  20. package/lib/reuse/helper/elementHighlight.js.map +1 -1
  21. package/lib/reuse/helper/errorHandler.js +2 -9
  22. package/lib/reuse/helper/errorHandler.js.map +1 -1
  23. package/lib/reuse/helper/jsDocGen.js +1 -1
  24. package/lib/reuse/helper/jsDocGen.js.map +1 -1
  25. package/lib/reuse/helper/tableHelper.js +3 -0
  26. package/lib/reuse/helper/tableHelper.js.map +1 -1
  27. package/lib/reuse/helper/timeHelper.js +3 -7
  28. package/lib/reuse/helper/timeHelper.js.map +1 -1
  29. package/lib/reuse/helper/verboseLogger.js.map +1 -1
  30. package/lib/reuse/index.js +0 -17
  31. package/lib/reuse/index.js.map +1 -1
  32. package/lib/reuse/modules/common/constants/date.constants.js +0 -2
  33. package/lib/reuse/modules/common/constants/date.constants.js.map +1 -1
  34. package/lib/reuse/modules/common/navigation.js.map +1 -1
  35. package/lib/reuse/modules/flp/userSettings.d.ts +2 -0
  36. package/lib/reuse/modules/flp/userSettings.js +6 -1
  37. package/lib/reuse/modules/flp/userSettings.js.map +1 -1
  38. package/lib/reuse/modules/nonUi5/NonUi5.js.map +1 -1
  39. package/lib/reuse/modules/nonUi5/session.js.map +1 -1
  40. package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
  41. package/lib/reuse/modules/ui5/assertion.d.ts +1 -0
  42. package/lib/reuse/modules/ui5/assertion.js +11 -4
  43. package/lib/reuse/modules/ui5/assertion.js.map +1 -1
  44. package/lib/reuse/modules/ui5/control.js.map +1 -1
  45. package/lib/reuse/modules/ui5/date.js +15 -15
  46. package/lib/reuse/modules/ui5/date.js.map +1 -1
  47. package/lib/reuse/modules/ui5/element.d.ts +2 -2
  48. package/lib/reuse/modules/ui5/element.js +7 -4
  49. package/lib/reuse/modules/ui5/element.js.map +1 -1
  50. package/lib/reuse/modules/ui5/session.d.ts +4 -2
  51. package/lib/reuse/modules/ui5/session.js +32 -4
  52. package/lib/reuse/modules/ui5/session.js.map +1 -1
  53. package/lib/reuse/modules/ui5/table.js +25 -9
  54. package/lib/reuse/modules/ui5/table.js.map +1 -1
  55. package/lib/reuse/modules/ui5/userInteraction.d.ts +1 -1
  56. package/lib/reuse/modules/ui5/userInteraction.js +46 -59
  57. package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
  58. package/lib/reuse/modules/util/constants/formatter.constants.js +0 -2
  59. package/lib/reuse/modules/util/constants/formatter.constants.js.map +1 -1
  60. package/lib/reuse/modules/util/file.d.ts +7 -4
  61. package/lib/reuse/modules/util/file.js +34 -7
  62. package/lib/reuse/modules/util/file.js.map +1 -1
  63. package/lib/reuse/modules/util/formatter.js +7 -3
  64. package/lib/reuse/modules/util/formatter.js.map +1 -1
  65. package/lib/reuse/modules/util/function.js +1 -5
  66. package/lib/reuse/modules/util/function.js.map +1 -1
  67. package/lib/scripts/clientsideUI5scripts.js +22 -29
  68. package/lib/scripts/clientsideUI5scripts.js.map +1 -1
  69. package/lib/scripts/dataExchange/dataExchange.js.map +1 -1
  70. package/lib/scripts/dataExchange/dataExchangeUtil.js +3 -13
  71. package/lib/scripts/dataExchange/dataExchangeUtil.js.map +1 -1
  72. package/lib/scripts/hooks/before.js +0 -1
  73. package/lib/scripts/hooks/before.js.map +1 -1
  74. package/lib/scripts/hooks/onComplete.js +2 -3
  75. package/lib/scripts/hooks/onComplete.js.map +1 -1
  76. package/lib/scripts/hooks/utils/addLocatorCommands.js.map +1 -1
  77. package/lib/scripts/hooks/utils/browserLog.js.map +1 -1
  78. package/lib/scripts/hooks/utils/cycle.js +3 -9
  79. package/lib/scripts/hooks/utils/cycle.js.map +1 -1
  80. package/lib/scripts/hooks/utils/dataExchangeCommands.js +1 -2
  81. package/lib/scripts/hooks/utils/dataExchangeCommands.js.map +1 -1
  82. package/lib/scripts/hooks/utils/isBrowserDefined.js.map +1 -1
  83. package/lib/scripts/locators/qmateLocator.js +30 -53
  84. package/lib/scripts/locators/qmateLocator.js.map +1 -1
  85. package/lib/scripts/locators/qmateLocatorSrc/comparators/DomPropertiesComparator.js +2 -2
  86. package/lib/scripts/locators/qmateLocatorSrc/comparators/DomPropertiesComparator.js.map +1 -1
  87. package/lib/scripts/locators/qmateLocatorSrc/constants/IgnoredMetadataList.d.ts +1 -0
  88. package/lib/scripts/locators/qmateLocatorSrc/constants/IgnoredMetadataList.js +10 -0
  89. package/lib/scripts/locators/qmateLocatorSrc/constants/IgnoredMetadataList.js.map +1 -0
  90. package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.d.ts +2 -3
  91. package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.js +18 -22
  92. package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.js.map +1 -1
  93. package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.js +3 -2
  94. package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.js.map +1 -1
  95. package/lib/scripts/locators/uiveri5Locator.js +1 -1
  96. package/lib/scripts/locators/uiveri5Locator.js.map +1 -1
  97. package/lib/scripts/stats/createUsage.js +1 -1
  98. package/lib/scripts/stats/createUsage.js.map +1 -1
  99. package/lib/scripts/stats/getOperatingSystem.js.map +1 -1
  100. package/lib/scripts/stats/getUserId.js +1 -1
  101. package/lib/scripts/stats/stats.js +9 -9
  102. package/lib/scripts/stats/stats.js.map +1 -1
  103. package/lib/scripts/stats/updateUsage.js +1 -1
  104. package/mkdocs.yml +18 -18
  105. package/package.json +18 -26
  106. package/packages/qcrypt/dist/classes/Decrypter.d.ts +38 -38
  107. package/packages/qcrypt/dist/classes/Decrypter.js +150 -153
  108. package/packages/qcrypt/dist/classes/Encrypter.d.ts +46 -46
  109. package/packages/qcrypt/dist/classes/Encrypter.js +144 -144
  110. package/packages/qcrypt/dist/classes/KeyGenerator.d.ts +16 -16
  111. package/packages/qcrypt/dist/classes/KeyGenerator.js +45 -43
  112. package/packages/qcrypt/dist/classes/helper/ErrorHandler.d.ts +8 -8
  113. package/packages/qcrypt/dist/classes/helper/ErrorHandler.js +48 -50
  114. package/packages/qcrypt/dist/classes/helper/Util.d.ts +67 -67
  115. package/packages/qcrypt/dist/classes/helper/Util.js +113 -114
  116. package/packages/qcrypt/dist/index.js +5 -3
  117. package/packages/qcrypt/dist/types/common.d.ts +13 -13
  118. package/reuseApi.json +8 -468
  119. package/test/.eslintrc.yml +1 -1
  120. package/test/authenticator/staticLogin/configCustom.js +1 -3
  121. package/test/authenticator/staticLogin/configCustomViaConfig.js +1 -3
  122. package/test/authenticator/staticLogin/configFiori.js +1 -3
  123. package/test/authenticator/staticLogin/configPlain.js +1 -4
  124. package/test/authenticator/staticLogin/configSapCloud.js +1 -3
  125. package/test/authenticator/staticLogin/html/custom.html +4 -4
  126. package/test/authenticator/staticLogin/html/fiori.html +4 -4
  127. package/test/authenticator/staticLogin/html/home.html +2 -2
  128. package/test/authenticator/staticLogin/html/sapCloud.html +4 -4
  129. package/test/authenticator/staticLogin/specs/custom.spec.js +1 -5
  130. package/test/authenticator/staticLogin/specs/plain.spec.js +0 -5
  131. package/test/authenticator/staticLogin/staticServerConfig.js +13 -10
  132. package/test/authenticator/systemLogin/configCustom.js +3 -5
  133. package/test/authenticator/systemLogin/configFiori.js +2 -5
  134. package/test/authenticator/systemLogin/configPlain.js +3 -5
  135. package/test/authenticator/systemLogin/configSapCloud.js +3 -5
  136. package/test/authenticator/systemLogin/specs/custom.spec.js +3 -5
  137. package/test/authenticator/systemLogin/specs/fiori.spec.js +3 -4
  138. package/test/authenticator/systemLogin/specs/plain.spec.js +3 -5
  139. package/test/authenticator/systemLogin/specs/sapCloud.spec.js +3 -5
  140. package/test/core/dataExchange/config.export.js +11 -18
  141. package/test/core/dataExchange/config.import.js +7 -12
  142. package/test/core/dataExchange/config.js +9 -11
  143. package/test/core/dataExchange/config.parallel.group.js +53 -61
  144. package/test/core/dataExchange/config.parallel.js +53 -58
  145. package/test/core/dataExchange/data/another/folder/data/anotherFolder/purchase-orders/Limit-Purchase-Order.json +1 -1
  146. package/test/core/dataExchange/data/another/folder/data/anotherFolder/purchase-orders/ServicePurchaseOrder.2Items.json +1 -1
  147. package/test/core/dataExchange/data/another/folder/data/anotherFolder/purchaseRequisition_HI.json +1 -1
  148. package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/LimitPurchaseOrder.json +1 -1
  149. package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/PurchaseOrderItems.json +1 -1
  150. package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/PurchaseOrderWithScheduline.json +1 -1
  151. package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/ServiceAndMaterialPurchaseOrder.json +1 -1
  152. package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/ServicePurchaseOrder.json +1 -1
  153. package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/ServicePurchaseOrder2Items.json +1 -1
  154. package/test/core/dataExchange/data/my/folder/data/qs9/data.json +1 -1
  155. package/test/core/dataExchange/data/my/folder/data/qs9/purchaseRequisition.json +1 -1
  156. package/test/core/dataExchange/data/my/folder/data/qs9/supplierInvoice.json +1 -1
  157. package/test/core/dataExchange/data/my/folder/data/qs9/webUser.json +1 -1
  158. package/test/core/dataExchange/data/ui/moreDataFolder/anotherUser.json +1 -1
  159. package/test/core/dataExchange/data/ui/user.json +1 -1
  160. package/test/core/dataExchange/data/ui/webUser.json +1 -1
  161. package/test/core/dataExchange/specs/export.fast.spec.js +11 -16
  162. package/test/core/dataExchange/specs/export.slow.spec.js +13 -18
  163. package/test/core/dataExchange/specs/export.spec.js +13 -23
  164. package/test/core/dataExchange/specs/import.spec.js +6 -23
  165. package/test/core/dataExchange/specs/importExport.spec.js +47 -62
  166. package/test/core/dataExchange/utils.js +11 -15
  167. package/test/core/functional/README.md +8 -5
  168. package/test/core/functional/chaining/chaining.test.js +46 -49
  169. package/test/core/functional/chaining/test.conf.js +1 -4
  170. package/test/core/functional/locators/ancestorProperties.test.js +49 -59
  171. package/test/core/functional/locators/childProperties.test.js +30 -36
  172. package/test/core/functional/locators/descendantProperties.test.js +50 -57
  173. package/test/core/functional/locators/domProperties.test.js +25 -29
  174. package/test/core/functional/locators/elementProperties.test.js +30 -29
  175. package/test/core/functional/locators/mixedProperties.test.js +317 -108
  176. package/test/core/functional/locators/parentProperties.test.js +18 -22
  177. package/test/core/functional/locators/siblingProperties.test.js +66 -75
  178. package/test/core/functional/locators/utils.js +1 -1
  179. package/test/core/functional/nativeBrowser/runInBrowser.test.js +84 -58
  180. package/test/core/functional/nativeBrowser/test.conf.js +1 -3
  181. package/test/core/functional/nonUi5/basic.test.js +3 -3
  182. package/test/core/functional/nonUi5/getWithDomElement.test.js +0 -2
  183. package/test/core/functional/nonUi5/getWithDomElements.test.js +2 -3
  184. package/test/core/functional/nonUi5/test.conf.js +1 -4
  185. package/test/core/functional/ui5Properties/countries.json +1 -1
  186. package/test/core/functional/ui5Properties/getAggregations.test.js +19 -27
  187. package/test/core/functional/ui5Properties/getAssociations.test.js +3 -3
  188. package/test/core/functional/ui5Properties/getBindingInfos.test.js +17 -17
  189. package/test/core/functional/ui5Properties/getProperties.test.js +25 -33
  190. package/test/core/functional/ui5Properties/test.conf.js +1 -6
  191. package/test/core/functional/uiveri5/sample.test.js +1 -2
  192. package/test/core/functional/uiveri5/test.conf.js +1 -3
  193. package/test/core/testIntegration/config.js +1 -1
  194. package/test/core/testIntegration/configMultiCombo.js +1 -1
  195. package/test/core/testIntegration/configTable.js +1 -1
  196. package/test/core/testIntegration/filters1.spec.js +908 -870
  197. package/test/core/testIntegration/multicombobox.spec.js +64 -60
  198. package/test/core/testIntegration/table.spec.js +35 -33
  199. package/test/helper/configurations/base.conf.js +6 -3
  200. package/test/helper/configurations/chrome.headless.conf.js +1 -1
  201. package/test/helper/sleeper.js +1 -1
  202. package/test/reuse/common/assertion/expectDefined.spec.js +1 -2
  203. package/test/reuse/common/assertion/expectEqual.spec.js +36 -26
  204. package/test/reuse/common/assertion/expectFalse.spec.js +1 -1
  205. package/test/reuse/common/assertion/expectTrue.spec.js +1 -1
  206. package/test/reuse/common/assertion/expectUndefined.spec.js +1 -2
  207. package/test/reuse/common/assertion/expectUnequal.spec.js +24 -13
  208. package/test/reuse/common/assertion/expectUrlToBe.spec.js +3 -6
  209. package/test/reuse/common/assertion/test.assertion.conf.js +39 -35
  210. package/test/reuse/common/date/calculate.spec.js +36 -36
  211. package/test/reuse/common/date/calculateWithTime.spec.js +88 -88
  212. package/test/reuse/common/date/getNextMonth.spec.js +3 -3
  213. package/test/reuse/common/date/getNextYear.spec.js +2 -2
  214. package/test/reuse/common/date/getPreviousMonth.spec.js +2 -2
  215. package/test/reuse/common/date/getPreviousYear.spec.js +2 -2
  216. package/test/reuse/common/date/getSpecific.spec.js +2 -2
  217. package/test/reuse/common/date/getToday.spec.js +2 -2
  218. package/test/reuse/common/date/getTomorrow.spec.js +2 -2
  219. package/test/reuse/common/date/test.date.conf.js +1 -1
  220. package/test/reuse/common/navigation/navigateToUrlAndRetry.spec.js +2 -6
  221. package/test/reuse/common/navigation/test.navigation.conf.js +14 -12
  222. package/test/reuse/common/userInteraction/clearAndFillActive.spec.js +1 -3
  223. package/test/reuse/common/userInteraction/clearAndFillActiveAndRetry.spec.js +2 -6
  224. package/test/reuse/common/userInteraction/fillActive.spec.js +2 -6
  225. package/test/reuse/common/userInteraction/fillActiveAndRetry.spec.js +2 -6
  226. package/test/reuse/common/userInteraction/pressKey.spec.js +6 -30
  227. package/test/reuse/common/userInteraction/test.userInteraction.conf.js +36 -38
  228. package/test/reuse/flp/userLocks/data/data.json +1 -1
  229. package/test/reuse/flp/userLocks/deleteExistingLockEntries.spec.js +0 -3
  230. package/test/reuse/flp/userLocks/getNumberOfLockEntries.spec.js +0 -2
  231. package/test/reuse/flp/userLocks/test.userLocks.conf.js +1 -4
  232. package/test/reuse/flp/userSettings/data/data.json +1 -1
  233. package/test/reuse/flp/userSettings/getDateFormatFromUserSettings.spec.js +0 -2
  234. package/test/reuse/flp/userSettings/getLanguageFromUserSettings.spec.js +0 -1
  235. package/test/reuse/flp/userSettings/getTimeFormatFromUserSettings.spec.js +0 -3
  236. package/test/reuse/flp/userSettings/getTimeZoneFromUserSettings.spec.js +0 -2
  237. package/test/reuse/flp/userSettings/setDateFormatFromUserSettings.spec.js +0 -2
  238. package/test/reuse/flp/userSettings/setLanguageFromUserSettings.spec.js +0 -2
  239. package/test/reuse/flp/userSettings/setNumberFormatFromUserSettings.spec.js +1 -3
  240. package/test/reuse/flp/userSettings/setS4UserSettings.spec.js +0 -2
  241. package/test/reuse/flp/userSettings/setTimeFormatFromUserSettings.spec.js +0 -3
  242. package/test/reuse/flp/userSettings/setTimeZoneFromUserSettings.spec.js +0 -2
  243. package/test/reuse/flp/userSettings/test.userSettings.apply.conf.js +1 -3
  244. package/test/reuse/helper/elementHighlight/test.elementHighlight.conf.js +2 -4
  245. package/test/reuse/nonUi5/assertion/expectAttributeToBe.spec.js +4 -11
  246. package/test/reuse/nonUi5/assertion/expectAttributeToContain.spec.js +3 -10
  247. package/test/reuse/nonUi5/assertion/expectCssPropertyValueToBe.spec.js +2 -4
  248. package/test/reuse/nonUi5/assertion/expectToBeNotVisible.spec.js +3 -5
  249. package/test/reuse/nonUi5/assertion/expectToBeVisible.spec.js +2 -2
  250. package/test/reuse/nonUi5/assertion/test.assertion.conf.js +39 -35
  251. package/test/reuse/nonUi5/assertion/test.assertion.sauceLabs.conf.js +40 -42
  252. package/test/reuse/nonUi5/element/getAttributeValue.spec.js +3 -9
  253. package/test/reuse/nonUi5/element/getByChild.spec.js +4 -8
  254. package/test/reuse/nonUi5/element/getByClass.spec.js +2 -7
  255. package/test/reuse/nonUi5/element/getByCss.spec.js +6 -11
  256. package/test/reuse/nonUi5/element/getByCssContainingText.spec.js +2 -6
  257. package/test/reuse/nonUi5/element/getById.spec.js +3 -10
  258. package/test/reuse/nonUi5/element/getByName.spec.js +2 -5
  259. package/test/reuse/nonUi5/element/getByParent.spec.js +5 -15
  260. package/test/reuse/nonUi5/element/getByXPath.spec.js +2 -5
  261. package/test/reuse/nonUi5/element/getCssPropertyValue.spec.js +1 -4
  262. package/test/reuse/nonUi5/element/getValue.spec.js +3 -6
  263. package/test/reuse/nonUi5/element/highlight.spec.js +0 -2
  264. package/test/reuse/nonUi5/element/isPresent.spec.js +1 -3
  265. package/test/reuse/nonUi5/element/isPresentByCss.spec.js +1 -1
  266. package/test/reuse/nonUi5/element/isPresentByXPath.spec.js +0 -1
  267. package/test/reuse/nonUi5/element/setInnerHTML.spec.js +2 -5
  268. package/test/reuse/nonUi5/element/test.element.conf.js +18 -15
  269. package/test/reuse/nonUi5/element/waitForAll.spec.js +2 -5
  270. package/test/reuse/nonUi5/element/waitToBeClickable.spec.js +2 -5
  271. package/test/reuse/nonUi5/element/waitToBePresent.spec.js +2 -3
  272. package/test/reuse/nonUi5/element/waitToBeVisible.spec.js +3 -8
  273. package/test/reuse/nonUi5/navigation/test.navigation.conf.js +1 -3
  274. package/test/reuse/nonUi5/userInteraction/checkAttributeAndValue.spec.js +13 -17
  275. package/test/reuse/nonUi5/userInteraction/clear.spec.js +3 -5
  276. package/test/reuse/nonUi5/userInteraction/clearAndFill.spec.js +1 -1
  277. package/test/reuse/nonUi5/userInteraction/clearAndFillAndRetry.spec.js +1 -3
  278. package/test/reuse/nonUi5/userInteraction/clearAndRetry.spec.js +1 -3
  279. package/test/reuse/nonUi5/userInteraction/click.spec.js +1 -3
  280. package/test/reuse/nonUi5/userInteraction/clickAndRetry.spec.js +2 -6
  281. package/test/reuse/nonUi5/userInteraction/clickElementInSvg.spec.js +1 -3
  282. package/test/reuse/nonUi5/userInteraction/doubleClick.spec.js +1 -1
  283. package/test/reuse/nonUi5/userInteraction/dragAndDrop.spec.js +2 -2
  284. package/test/reuse/nonUi5/userInteraction/fillAndRetry.spec.js +1 -3
  285. package/test/reuse/nonUi5/userInteraction/selectAll.spec.js +2 -2
  286. package/test/reuse/nonUi5/userInteraction/test.userInteraction.conf.js +1 -1
  287. package/test/reuse/nonUi5/userInteraction/test.userInteraction.sauceLabs.conf.js +43 -39
  288. package/test/reuse/service/odata/test.odata.conf.js +4 -7
  289. package/test/reuse/service/rest/db.json +1 -1
  290. package/test/reuse/service/rest/delete.spec.js +3 -10
  291. package/test/reuse/service/rest/get.spec.js +2 -9
  292. package/test/reuse/service/rest/init.spec.js +0 -2
  293. package/test/reuse/service/rest/patch.spec.js +5 -12
  294. package/test/reuse/service/rest/post.spec.js +6 -17
  295. package/test/reuse/service/rest/put.spec.js +10 -17
  296. package/test/reuse/service/rest/rest-server.js +5 -5
  297. package/test/reuse/service/rest/test.rest.conf.js +4 -11
  298. package/test/reuse/ui5/assertion/expectAttributeToBe.spec.js +77 -42
  299. package/test/reuse/ui5/assertion/expectAttributeToContain.spec.js +48 -18
  300. package/test/reuse/ui5/assertion/expectBindingContextPathToBe.spec.js +41 -42
  301. package/test/reuse/ui5/assertion/expectBindingPathToBe.spec.js +58 -64
  302. package/test/reuse/ui5/assertion/expectCssPropertyValueToBe.spec.js +1 -2
  303. package/test/reuse/ui5/assertion/expectMessageToastTextToBe.spec.js +7 -11
  304. package/test/reuse/ui5/assertion/expectTextToBe.spec.js +13 -13
  305. package/test/reuse/ui5/assertion/expectToBeEnabled.spec.js +2 -6
  306. package/test/reuse/ui5/assertion/expectToBeNotEnabled.spec.js +17 -20
  307. package/test/reuse/ui5/assertion/expectToBeNotVisible.spec.js +13 -14
  308. package/test/reuse/ui5/assertion/expectToBeVisible.spec.js +15 -20
  309. package/test/reuse/ui5/assertion/expectToBeVisibleInViewport.spec.js +11 -15
  310. package/test/reuse/ui5/assertion/expectValidationError.spec.js +14 -16
  311. package/test/reuse/ui5/assertion/expectValidationSuccess.spec.js +14 -16
  312. package/test/reuse/ui5/assertion/expectValueToBe.spec.js +14 -17
  313. package/test/reuse/ui5/assertion/expectValueToBeDefined.spec.js +6 -9
  314. package/test/reuse/ui5/assertion/test.assertion.sauceLab.conf.js +3 -3
  315. package/test/reuse/ui5/confirmationDialog/clickButton.spec.js +24 -28
  316. package/test/reuse/ui5/confirmationDialog/clickCancel.spec.js +24 -25
  317. package/test/reuse/ui5/confirmationDialog/clickCreate.spec.js +1 -1
  318. package/test/reuse/ui5/confirmationDialog/clickDelete.spec.js +25 -28
  319. package/test/reuse/ui5/confirmationDialog/clickNo.spec.js +21 -29
  320. package/test/reuse/ui5/confirmationDialog/clickOk.spec.js +19 -22
  321. package/test/reuse/ui5/confirmationDialog/clickRevokeApproval.spec.js +1 -1
  322. package/test/reuse/ui5/confirmationDialog/clickYes.spec.js +17 -25
  323. package/test/reuse/ui5/confirmationDialog/test.confirmationDialog.conf.js +1 -1
  324. package/test/reuse/ui5/confirmationDialog/test.confirmationDialog.sauceLab.conf.js +4 -4
  325. package/test/reuse/ui5/control/execute.spec.js +37 -25
  326. package/test/reuse/ui5/control/focus.spec.js +29 -29
  327. package/test/reuse/ui5/control/getAggregationProperty.spec.js +25 -21
  328. package/test/reuse/ui5/control/getAssociationProperty.spec.js +13 -15
  329. package/test/reuse/ui5/control/getBindingContextPathProperty.spec.js +12 -10
  330. package/test/reuse/ui5/control/getProperty.spec.js +12 -10
  331. package/test/reuse/ui5/control/getPropertyBinding.spec.js +12 -10
  332. package/test/reuse/ui5/control/test.control.sauceLab.conf.js +3 -4
  333. package/test/reuse/ui5/date/fillRange.spec.js +7 -10
  334. package/test/reuse/ui5/date/pick.spec.js +31 -34
  335. package/test/reuse/ui5/date/pickRange.spec.js +31 -25
  336. package/test/reuse/ui5/date/pickWithTime.spec.js +8 -10
  337. package/test/reuse/ui5/date/test.date.conf.js +3 -8
  338. package/test/reuse/ui5/date/test.date.sauceLab.conf.js +4 -9
  339. package/test/reuse/ui5/element/getBindingValue.spec.js +17 -23
  340. package/test/reuse/ui5/element/getByChild.spec.js +52 -52
  341. package/test/reuse/ui5/element/getByParent.spec.js +65 -61
  342. package/test/reuse/ui5/element/getByText.spec.js +10 -14
  343. package/test/reuse/ui5/element/getCssPropertyValue.spec.js +1 -1
  344. package/test/reuse/ui5/element/getDisplayed.spec.js +23 -26
  345. package/test/reuse/ui5/element/getId.spec.js +15 -18
  346. package/test/reuse/ui5/element/getPropertyValue.spec.js +19 -23
  347. package/test/reuse/ui5/element/highlight.spec.js +9 -12
  348. package/test/reuse/ui5/element/isVisible.spec.js +12 -12
  349. package/test/reuse/ui5/element/test.element.sauceLab.conf.js +3 -5
  350. package/test/reuse/ui5/element/waitForAll.spec.js +10 -15
  351. package/test/reuse/ui5/errorDialog/clickClose.spec.js +6 -9
  352. package/test/reuse/ui5/errorDialog/expectToBeVisible.spec.js +7 -11
  353. package/test/reuse/ui5/errorDialog/test.errorDialog.conf.js +2 -5
  354. package/test/reuse/ui5/errorDialog/test.errorDialog.sauceLab.conf.js +4 -9
  355. package/test/reuse/ui5/mockserver_qunit/Component.js +3 -8
  356. package/test/reuse/ui5/mockserver_qunit/controller/App.controller.js +12 -18
  357. package/test/reuse/ui5/mockserver_qunit/controller/BaseController.js +3 -10
  358. package/test/reuse/ui5/mockserver_qunit/controller/Home.controller.js +6 -11
  359. package/test/reuse/ui5/mockserver_qunit/controller/NotFound.controller.js +6 -11
  360. package/test/reuse/ui5/mockserver_qunit/controller/employee/Employee.controller.js +10 -16
  361. package/test/reuse/ui5/mockserver_qunit/controller/employee/EmployeeList.controller.js +4 -9
  362. package/test/reuse/ui5/mockserver_qunit/controller/employee/Resume.controller.js +39 -36
  363. package/test/reuse/ui5/mockserver_qunit/controller/employee/overview/EmployeeOverview.controller.js +2 -7
  364. package/test/reuse/ui5/mockserver_qunit/controller/employee/overview/EmployeeOverviewContent.controller.js +66 -79
  365. package/test/reuse/ui5/mockserver_qunit/index.html +19 -18
  366. package/test/reuse/ui5/mockserver_qunit/initMockServer.js +13 -13
  367. package/test/reuse/ui5/mockserver_qunit/localService/mockdata/Employees.json +153 -153
  368. package/test/reuse/ui5/mockserver_qunit/localService/mockdata/Resumes.json +63 -63
  369. package/test/reuse/ui5/mockserver_qunit/localService/mockserver.js +124 -128
  370. package/test/reuse/ui5/mockserver_qunit/localService/mockserverLoadAllData.js +7 -13
  371. package/test/reuse/ui5/mockserver_qunit/manifest.json +169 -167
  372. package/test/reuse/ui5/mockserver_qunit/test/flpSandboxMockServer.html +58 -56
  373. package/test/reuse/ui5/mockserver_qunit/test/flpSandboxMockServerAllData.html +65 -61
  374. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/config.js +60 -66
  375. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/qunitExecution/specs/runQUnitTests.spec.js +3 -4
  376. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testDisplayNotFound/data/setup.json +8 -10
  377. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testDisplayNotFound/specs/testDisplayNotFound.spec.js +16 -18
  378. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/mock/Employees.json +203 -203
  379. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/mock/Resumes.json +113 -113
  380. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/setup.json +8 -10
  381. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/testShowEmployeeList.json +1 -1
  382. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/specs/testShowEmployeeList.spec.js +24 -26
  383. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/utils/constants.js +2 -2
  384. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/utils/mockDataMapper.js +5 -6
  385. package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/utils/mockHelper.js +37 -52
  386. package/test/reuse/ui5/mockserver_qunit/test/unit/allTests.js +2 -4
  387. package/test/reuse/ui5/mockserver_qunit/test/unit/unitTests.qunit.html +28 -31
  388. package/test/reuse/ui5/mockserver_qunit/test/unit/utils/Conversions.js +13 -10
  389. package/test/reuse/ui5/navigation/expectUnsupportedNavigationPopup.spec.js +12 -13
  390. package/test/reuse/ui5/navigation/navigateToApplicationWithQueryParams.spec.js +1 -1
  391. package/test/reuse/ui5/navigation/navigateToApplicationWithQueryParamsAndRetry.spec.js +1 -1
  392. package/test/reuse/ui5/navigation/navigateToSystemAndApplication.spec.js +1 -2
  393. package/test/reuse/ui5/navigation/navigateToSystemAndApplicationAndRetry.spec.js +2 -4
  394. package/test/reuse/ui5/navigation/test.navigation.conf.js +2 -7
  395. package/test/reuse/ui5/navigation/test.navigation.sauceLab.conf.js +4 -4
  396. package/test/reuse/ui5/navigation/test.navigation.static.sauceLab.conf.js +4 -4
  397. package/test/reuse/ui5/navigationBar/clickUserIcon.spec.js +5 -10
  398. package/test/reuse/ui5/navigationBar/expectPageTitle.spec.js +2 -3
  399. package/test/reuse/ui5/navigationBar/expectShellHeader.spec.js +2 -3
  400. package/test/reuse/ui5/navigationBar/test.navigationBar.conf.js +2 -8
  401. package/test/reuse/ui5/navigationBar/test.navigationBar.sauceLab.conf.js +4 -10
  402. package/test/reuse/ui5/session/login.spec.js +9 -11
  403. package/test/reuse/ui5/session/loginFiori.spec.js +5 -7
  404. package/test/reuse/ui5/session/loginSapCloud.spec.js +6 -8
  405. package/test/reuse/ui5/session/logout.spec.js +2 -3
  406. package/test/reuse/ui5/session/switchUser.spec.js +1 -1
  407. package/test/reuse/ui5/session/test.session.conf.js +1 -7
  408. package/test/reuse/ui5/session/test.session.sauceLab.conf.js +4 -12
  409. package/test/reuse/ui5/table/clickSettingsButton.spec.js +12 -18
  410. package/test/reuse/ui5/table/getAllColumnValuesByName.spec.js +1 -4
  411. package/test/reuse/ui5/table/getSelectorForRowByIndex.spec.js +11 -14
  412. package/test/reuse/ui5/table/getSelectorsForRowsByValues.spec.js +6 -9
  413. package/test/reuse/ui5/table/getTotalNumberOfRowsByValues.spec.js +1 -3
  414. package/test/reuse/ui5/table/openItemByIndex.spec.js +23 -29
  415. package/test/reuse/ui5/table/openItemByValues.spec.js +27 -38
  416. package/test/reuse/ui5/table/selectRowByValues.spec.js +7 -7
  417. package/test/reuse/ui5/table/sortColumnAscending.spec.js +17 -25
  418. package/test/reuse/ui5/table/sortColumnDescending.spec.js +13 -19
  419. package/test/reuse/ui5/table/test.table.sauceLab.conf.js +4 -8
  420. package/test/reuse/ui5/table/test.table.sauceLab.tunnel.conf.js +4 -8
  421. package/test/reuse/ui5/userInteraction/clear.spec.js +14 -18
  422. package/test/reuse/ui5/userInteraction/clearAndFill.spec.js +28 -29
  423. package/test/reuse/ui5/userInteraction/clearAndFillAndRetry.spec.js +4 -12
  424. package/test/reuse/ui5/userInteraction/clearAndFillSmartFieldInput.spec.js +20 -19
  425. package/test/reuse/ui5/userInteraction/clearAndFillSmartFieldInputAndRetry.spec.js +5 -7
  426. package/test/reuse/ui5/userInteraction/clearAndRetry.spec.js +11 -16
  427. package/test/reuse/ui5/userInteraction/click.spec.js +90 -29
  428. package/test/reuse/ui5/userInteraction/clickAndRetry.spec.js +1 -3
  429. package/test/reuse/ui5/userInteraction/clickSelectArrow.spec.js +29 -30
  430. package/test/reuse/ui5/userInteraction/clickSelectArrowAndRetry.spec.js +1 -3
  431. package/test/reuse/ui5/userInteraction/doubleClick.spec.js +18 -22
  432. package/test/reuse/ui5/userInteraction/dragAndDrop.spec.js +8 -10
  433. package/test/reuse/ui5/userInteraction/fill.spec.js +20 -22
  434. package/test/reuse/ui5/userInteraction/fillAndRetry.spec.js +2 -6
  435. package/test/reuse/ui5/userInteraction/mouseOverElement.spec.js +2 -5
  436. package/test/reuse/ui5/userInteraction/openF4Help.spec.js +8 -12
  437. package/test/reuse/ui5/userInteraction/openValueHelp.spec.js +11 -12
  438. package/test/reuse/ui5/userInteraction/rightClick.spec.js +17 -20
  439. package/test/reuse/ui5/userInteraction/scrollToElement.spec.js +38 -38
  440. package/test/reuse/ui5/userInteraction/searchFor.spec.js +3 -12
  441. package/test/reuse/ui5/userInteraction/selectBox.spec.js +36 -36
  442. package/test/reuse/ui5/userInteraction/selectCombobox.spec.js +16 -24
  443. package/test/reuse/ui5/userInteraction/selectMultiComboBox.spec.js +22 -31
  444. package/test/reuse/util/browser/back.spec.js +10 -11
  445. package/test/reuse/util/browser/clearBrowser.spec.js +1 -1
  446. package/test/reuse/util/browser/executeScript.spec.js +14 -16
  447. package/test/reuse/util/browser/getBaseUrl.spec.js +1 -1
  448. package/test/reuse/util/browser/getBrowserName.spec.js +1 -3
  449. package/test/reuse/util/browser/getCurrentUrl.spec.js +9 -9
  450. package/test/reuse/util/browser/getCurrentWindow.spec.js +1 -1
  451. package/test/reuse/util/browser/getUI5Version.spec.js +8 -8
  452. package/test/reuse/util/browser/log.spec.js +1 -3
  453. package/test/reuse/util/browser/logCurrentUrl.spec.js +1 -1
  454. package/test/reuse/util/browser/refresh.spec.js +14 -16
  455. package/test/reuse/util/browser/reloadSession.spec.js +1 -1
  456. package/test/reuse/util/browser/setBaseUrl.spec.js +2 -2
  457. package/test/reuse/util/browser/switchToDefaultContent.spec.js +28 -29
  458. package/test/reuse/util/browser/switchToWindow.spec.js +2 -3
  459. package/test/reuse/util/browser/test.browserCmndLineArgs.conf.js +1 -3
  460. package/test/reuse/util/browser/waitUntil.spec.js +8 -16
  461. package/test/reuse/util/component/loadEntryPoint.spec.js +2 -3
  462. package/test/reuse/util/component/storeEntryPoint.spec.js +6 -10
  463. package/test/reuse/util/component/test.component.conf.js +1 -4
  464. package/test/reuse/util/console/console.spec.js +1 -3
  465. package/test/reuse/util/console/test.console.conf.js +2 -4
  466. package/test/reuse/util/data/customSourceData/getSecureData.secure.json +1 -1
  467. package/test/reuse/util/data/customSourceData/test.json +1 -1
  468. package/test/reuse/util/data/data/test.json +1 -1
  469. package/test/reuse/util/data/getData.spec.js +3 -7
  470. package/test/reuse/util/data/test.data.conf.js +1 -5
  471. package/test/reuse/util/data/test.data.privacy.conf.js +1 -7
  472. package/test/reuse/util/file/getAttributeValuesFromJson.spec.js +1 -1
  473. package/test/reuse/util/file/getFileNamesByExtensions.spec.js +0 -1
  474. package/test/reuse/util/file/pdfParser.spec.js +76 -80
  475. package/test/reuse/util/file/test.file.conf.js +2 -1
  476. package/test/reuse/util/file/testFiles/test1.json +26 -77
  477. package/test/reuse/util/file/upload.spec.js +24 -29
  478. package/test/reuse/util/formatter/addRemoveLeadingZeros.spec.js +1 -2
  479. package/test/reuse/util/formatter/formatDate.spec.js +2 -2
  480. package/test/reuse/util/formatter/formatDateWithTime.spec.js +6 -2
  481. package/test/reuse/util/formatter/sliceStringAfter.spec.js +1 -1
  482. package/test/reuse/util/formatter/sliceStringAt.spec.js +1 -1
  483. package/test/reuse/util/formatter/stringifyJSON.spec.js +4 -4
  484. package/test/reuse/util/formatter/test.formatter.conf.js +2 -2
  485. package/test/reuse/util/system/system.spec.js +1 -3
  486. package/test/reuse/util/system/test.system.conf.js +3 -5
  487. package/test/reuse/util/userSettings/data/data.json +1 -1
  488. package/test/reuse/util/userSettings/getDateFormatFromUserSettings.spec.js +0 -2
  489. package/test/reuse/util/userSettings/getLanguageFromUserSettings.spec.js +0 -1
  490. package/test/reuse/util/userSettings/getTimeFormatFromUserSettings.spec.js +0 -3
  491. package/test/reuse/util/userSettings/getTimeZoneFromUserSettings.spec.js +0 -2
  492. package/test/reuse/util/userSettings/setDateFormatFromUserSettings.spec.js +0 -2
  493. package/test/reuse/util/userSettings/setLanguageFromUserSettings.spec.js +0 -2
  494. package/test/reuse/util/userSettings/setNumberFormatFromUserSettings.spec.js +1 -3
  495. package/test/reuse/util/userSettings/setS4UserSettings.spec.js +0 -2
  496. package/test/reuse/util/userSettings/setTimeFormatFromUserSettings.spec.js +0 -3
  497. package/test/reuse/util/userSettings/setTimeZoneFromUserSettings.spec.js +0 -2
  498. package/test/reuse/util/userSettings/test.userSettings.apply.conf.js +1 -3
  499. package/test/unit/stats/getUserId.error.spec.ts +3 -1
  500. package/test/unit/stats/getUserId.spec.ts +10 -10
  501. package/test/unit/vitest.config.ts +2 -2
  502. package/test/watchMode/config.js +1 -3
  503. package/test/watchMode/navigateToUrlAndClick.spec.js +7 -7
  504. package/tsconfig.json +1 -4
  505. package/lib/reuse/modules/mobile/Mobile.d.ts +0 -16
  506. package/lib/reuse/modules/mobile/Mobile.js +0 -23
  507. package/lib/reuse/modules/mobile/Mobile.js.map +0 -1
  508. package/lib/reuse/modules/mobile/android.d.ts +0 -32
  509. package/lib/reuse/modules/mobile/android.js +0 -85
  510. package/lib/reuse/modules/mobile/android.js.map +0 -1
  511. package/lib/reuse/modules/mobile/device.d.ts +0 -173
  512. package/lib/reuse/modules/mobile/device.js +0 -403
  513. package/lib/reuse/modules/mobile/device.js.map +0 -1
  514. package/lib/reuse/modules/mobile/element.d.ts +0 -95
  515. package/lib/reuse/modules/mobile/element.js +0 -185
  516. package/lib/reuse/modules/mobile/element.js.map +0 -1
  517. package/lib/reuse/modules/mobile/gestures.d.ts +0 -42
  518. package/lib/reuse/modules/mobile/gestures.js +0 -86
  519. package/lib/reuse/modules/mobile/gestures.js.map +0 -1
  520. package/lib/reuse/modules/mobile/ios.d.ts +0 -10
  521. package/lib/reuse/modules/mobile/ios.js +0 -19
  522. package/lib/reuse/modules/mobile/ios.js.map +0 -1
  523. package/lib/reuse/modules/mobile/userInteraction.d.ts +0 -94
  524. package/lib/reuse/modules/mobile/userInteraction.js +0 -210
  525. package/lib/reuse/modules/mobile/userInteraction.js.map +0 -1
  526. package/test/helper/configurations/mobile.conf.js +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"getOperatingSystem.js","sourceRoot":"","sources":["../../../src/scripts/stats/getOperatingSystem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wDAEC;AAED,8DAEC;AAED,8DAEC;AAZD,uCAAyB;AAEzB,SAAgB,sBAAsB;IAClC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC;AAED,SAAgB,yBAAyB;IACrC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;AACxB,CAAC;AAED,SAAgB,yBAAyB;IACrC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;AACxB,CAAC"}
1
+ {"version":3,"file":"getOperatingSystem.js","sourceRoot":"","sources":["../../../src/scripts/stats/getOperatingSystem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wDAEC;AAED,8DAEC;AAED,8DAEC;AAZD,uCAAyB;AAEzB,SAAgB,sBAAsB;IACpC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;AACnB,CAAC;AAED,SAAgB,yBAAyB;IACvC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;AACtB,CAAC;AAED,SAAgB,yBAAyB;IACvC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;AACtB,CAAC"}
@@ -88,7 +88,7 @@ function saveUserIdToStore(userId) {
88
88
  }
89
89
  let localStorageInstance = null;
90
90
  function getLocalStorage() {
91
- localStorageInstance ??= new node_localstorage_1.LocalStorage(path_1.default.join(os.homedir(), '.qmate-userId'));
91
+ localStorageInstance ??= new node_localstorage_1.LocalStorage(path_1.default.join(os.homedir(), ".qmate-userId"));
92
92
  return localStorageInstance;
93
93
  }
94
94
  async function fetchNewUserIdFromServer() {
@@ -16,15 +16,15 @@ async function sendUsageRequests(specCounter) {
16
16
  return null;
17
17
  }
18
18
  const usageData = {
19
- "userId": user,
20
- "version": (0, getVersion_1.getVersion)(),
21
- "osType": (0, getOperatingSystem_1.getOperatingSystemType)(),
22
- "osRelease": (0, getOperatingSystem_1.getOperatingSystemRelease)(),
23
- "osVersion": (0, getOperatingSystem_1.getOperatingSystemVersion)(),
24
- "environment": (0, getEnvironment_1.getEnvironmentVariables)(),
25
- "configHash": (0, getConfigurationInformation_1.getConfigurationHash)(),
26
- "repoHash": (0, getRepositoryInformation_1.getCwdGitRemoteUrlHash)(),
27
- "specCounter": specCounter,
19
+ userId: user,
20
+ version: (0, getVersion_1.getVersion)(),
21
+ osType: (0, getOperatingSystem_1.getOperatingSystemType)(),
22
+ osRelease: (0, getOperatingSystem_1.getOperatingSystemRelease)(),
23
+ osVersion: (0, getOperatingSystem_1.getOperatingSystemVersion)(),
24
+ environment: (0, getEnvironment_1.getEnvironmentVariables)(),
25
+ configHash: (0, getConfigurationInformation_1.getConfigurationHash)(),
26
+ repoHash: (0, getRepositoryInformation_1.getCwdGitRemoteUrlHash)(),
27
+ specCounter: specCounter
28
28
  };
29
29
  const usageId = await (0, createUsage_1.createUsage)(usageData);
30
30
  if (usageId === null) {
@@ -1 +1 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/scripts/stats/stats.ts"],"names":[],"mappings":";;AASA,8CAuBC;AAED,kDAMC;AAxCD,+CAA4C;AAC5C,+EAAqE;AACrE,qDAA2D;AAC3D,6DAAoH;AACpH,yEAAoE;AACpE,2CAAwC;AACxC,6CAA0C;AAC1C,+CAAiD;AAE1C,KAAK,UAAU,iBAAiB,CAAC,WAAmB;IACzD,MAAM,IAAI,GAAG,MAAM,IAAA,qBAAS,GAAE,CAAC;IAC/B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GAAG;QAChB,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,IAAA,uBAAU,GAAE;QACvB,QAAQ,EAAE,IAAA,2CAAsB,GAAE;QAClC,WAAW,EAAE,IAAA,8CAAyB,GAAE;QACxC,WAAW,EAAE,IAAA,8CAAyB,GAAE;QACxC,aAAa,EAAE,IAAA,wCAAuB,GAAE;QACxC,YAAY,EAAE,IAAA,kDAAoB,GAAE;QACpC,UAAU,EAAE,IAAA,iDAAsB,GAAE;QACpC,aAAa,EAAE,WAAW;KAC3B,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAW,EAAC,SAAS,CAAC,CAAC;IAC7C,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAEM,KAAK,UAAU,mBAAmB,CAAC,OAAe,EAAE,MAAc;IACvE,MAAM,SAAS,GAAG;QAChB,MAAM;KACP,CAAA;IAED,KAAK,IAAA,8BAAgB,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC"}
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/scripts/stats/stats.ts"],"names":[],"mappings":";;AASA,8CAuBC;AAED,kDAMC;AAxCD,+CAA4C;AAC5C,+EAAqE;AACrE,qDAA2D;AAC3D,6DAAoH;AACpH,yEAAoE;AACpE,2CAAwC;AACxC,6CAA0C;AAC1C,+CAAiD;AAE1C,KAAK,UAAU,iBAAiB,CAAC,WAAmB;IACzD,MAAM,IAAI,GAAG,MAAM,IAAA,qBAAS,GAAE,CAAC;IAC/B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GAAG;QAChB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAA,uBAAU,GAAE;QACrB,MAAM,EAAE,IAAA,2CAAsB,GAAE;QAChC,SAAS,EAAE,IAAA,8CAAyB,GAAE;QACtC,SAAS,EAAE,IAAA,8CAAyB,GAAE;QACtC,WAAW,EAAE,IAAA,wCAAuB,GAAE;QACtC,UAAU,EAAE,IAAA,kDAAoB,GAAE;QAClC,QAAQ,EAAE,IAAA,iDAAsB,GAAE;QAClC,WAAW,EAAE,WAAW;KACzB,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAW,EAAC,SAAS,CAAC,CAAC;IAC7C,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAEM,KAAK,UAAU,mBAAmB,CAAC,OAAe,EAAE,MAAc;IACvE,MAAM,SAAS,GAAG;QAChB,MAAM;KACP,CAAC;IAEF,KAAK,IAAA,8BAAgB,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC"}
@@ -9,7 +9,7 @@ async function updateQmateUsage(id, usageData) {
9
9
  const response = await (0, undici_1.fetch)(urlUsage, {
10
10
  method: "PUT",
11
11
  headers: {
12
- "Content-Type": "application/json",
12
+ "Content-Type": "application/json"
13
13
  },
14
14
  body: JSON.stringify(usageData),
15
15
  dispatcher: new undici_1.Agent({})
package/mkdocs.yml CHANGED
@@ -4,26 +4,26 @@ nav:
4
4
  - About: index.md
5
5
  - ☰ Reuse API: doc.md
6
6
  - Getting Started:
7
- - Setup: sections/gettingStarted/setup.md
8
- - Config: sections/gettingStarted/config.md
9
- - Spec: sections/gettingStarted/spec.md
10
- - Execution: sections/gettingStarted/execution.md
7
+ - Setup: sections/gettingStarted/setup.md
8
+ - Config: sections/gettingStarted/config.md
9
+ - Spec: sections/gettingStarted/spec.md
10
+ - Execution: sections/gettingStarted/execution.md
11
11
  - Features:
12
- - Config: sections/features/config.md
13
- - Selectors: sections/features/selectors.md
12
+ - Config: sections/features/config.md
13
+ - Selectors: sections/features/selectors.md
14
14
  - Best Practices:
15
- - Selectors: sections/bestPractices/selectors.md
16
- - Authentication: sections/bestPractices/authentication.md
17
- - Data Handling: sections/bestPractices/dataHandling.md
18
- - Support:
19
- - Issues & Feature Requests: sections/support/bugReporting.md
20
- - Troubleshooting: sections/support/troubleshooting.md
21
- - Known Issues & Limitations: sections/support/knownIssuesAndLimitations.md
15
+ - Selectors: sections/bestPractices/selectors.md
16
+ - Authentication: sections/bestPractices/authentication.md
17
+ - Data Handling: sections/bestPractices/dataHandling.md
18
+ - Support:
19
+ - Issues & Feature Requests: sections/support/bugReporting.md
20
+ - Troubleshooting: sections/support/troubleshooting.md
21
+ - Known Issues & Limitations: sections/support/knownIssuesAndLimitations.md
22
22
  - Contact: sections/contact.md
23
23
  theme:
24
- name: 'material'
24
+ name: "material"
25
25
  features:
26
- - content.code.annotate
26
+ - content.code.annotate
27
27
  - content.tabs.link
28
28
  - navigation.top
29
29
  palette:
@@ -32,7 +32,7 @@ theme:
32
32
  icon: material/weather-night
33
33
  name: Switch to dark mode
34
34
  - scheme: slate
35
- toggle:
35
+ toggle:
36
36
  icon: material/weather-sunny
37
37
  name: Switch to light mode
38
38
  extra_css:
@@ -44,7 +44,7 @@ markdown_extensions:
44
44
  - pymdownx.inlinehilite
45
45
  - pymdownx.superfences
46
46
  - pymdownx.tabbed:
47
- alternate_style: true
47
+ alternate_style: true
48
48
  - pymdownx.snippets
49
49
  - pymdownx.superfences
50
50
  - pymdownx.tabbed:
@@ -63,4 +63,4 @@ site_dir: docs-gen
63
63
  repo_url: https://github.com/SAP/wdio-qmate-service
64
64
  site_url: https://sap.github.io/wdio-qmate-service
65
65
  edit_uri: edit/main/documentation/
66
- copyright: © Copyright 2022, SAP SE & Qmate Service Contributors
66
+ copyright: © Copyright 2022, SAP SE & Qmate Service Contributors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap_oss/wdio-qmate-service",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "author": "SAP SE",
5
5
  "types": "./@types/**.d.ts",
6
6
  "main": "./lib/index.js",
@@ -9,10 +9,6 @@
9
9
  "name": "Benjamin Warth",
10
10
  "email": "benjamin.warth@sap.com"
11
11
  },
12
- {
13
- "name": "Georgios Treska",
14
- "email": "georgios.treska@sap.com"
15
- },
16
12
  {
17
13
  "name": "Tomas Hartmann",
18
14
  "email": "tomas.hartmann@sap.com"
@@ -128,23 +124,22 @@
128
124
  "ui5 testing",
129
125
  "non-ui5 testing",
130
126
  "qmate ui automation",
131
- "qmate mobile automation",
132
127
  "wdio-plugin",
133
128
  "wdio-service"
134
129
  ],
135
130
  "license": "Apache-2.0",
136
131
  "dependencies": {
137
- "@sap_oss/odata-library": "^2.5.0",
138
- "axios": "^1.13.5",
132
+ "@sap_oss/odata-library": "^2.6.0",
133
+ "axios": "^1.17.0",
139
134
  "deepmerge": "^4.3.1",
140
- "fs-extra": "^11.3.2",
135
+ "fs-extra": "^11.3.5",
141
136
  "node-localstorage": "^3.0.5",
142
- "pdf-parse": "^1.1.1",
137
+ "pdfjs-dist": "^6.0.227",
143
138
  "qcrypt": "file:packages/qcrypt",
144
- "query-string": "^9.3.1",
139
+ "query-string": "^9.4.0",
145
140
  "sha.js": "^2.4.12",
146
- "supertest": "^7.1.4",
147
- "undici": "^7.16.0",
141
+ "supertest": "^7.2.2",
142
+ "undici": "^8.5.0",
148
143
  "xlsx": "^0.18.5",
149
144
  "xml2js": "^0.6.2",
150
145
  "yargs": "^18.0.0"
@@ -155,7 +150,6 @@
155
150
  "@types/pdf-parse": "^1.1.5",
156
151
  "@types/sha.js": "^2.4.4",
157
152
  "@types/xml2js": "^0.4.14",
158
- "@wdio/appium-service": "^8.46.0",
159
153
  "@wdio/cli": "^8.46.0",
160
154
  "@wdio/local-runner": "^8.46.0",
161
155
  "@wdio/mocha-framework": "^8.46.0",
@@ -163,22 +157,19 @@
163
157
  "@wdio/spec-reporter": "^8.43.0",
164
158
  "@wdio/static-server-service": "^8.41.0",
165
159
  "app-root-path": "^3.1.0",
166
- "appium": "^3.2.0",
167
- "appium-uiautomator2-driver": "^5.0.6",
168
- "appium-xcuitest-driver": "^10.2.2",
169
- "chai": "^6.2.0",
170
- "chromedriver": "^141.0.4",
160
+ "chai": "^6.2.2",
161
+ "chromedriver": "^149.0.3",
171
162
  "concurrently": "^9.2.1",
172
163
  "doctrine": "^3.0.0",
173
- "esbuild": "0.25.11",
164
+ "esbuild": "0.28.1",
174
165
  "eslint": "^8.57.1",
175
166
  "eslint-plugin-wdio": "^6.6.0",
176
167
  "glob": "^8.1.0",
177
168
  "glob-promise": "^6.0.7",
178
169
  "jsdoc-to-markdown": "^9.1.3",
179
170
  "json-server": "^0.17.4",
180
- "prettier": "^3.6.2",
181
- "rimraf": "^6.0.1",
171
+ "prettier": "^3.8.4",
172
+ "rimraf": "^6.1.3",
182
173
  "ts-node": "^10.9.2",
183
174
  "typescript": "^5.9.3",
184
175
  "vitest": "^3.2.4",
@@ -186,9 +177,10 @@
186
177
  },
187
178
  "overrides": {
188
179
  "got": "^11.8.5",
189
- "appium": {
190
- "axios": "^1.8.0"
191
- },
192
- "tough-cookie": "^4.1.3"
180
+ "tough-cookie": "^4.1.3",
181
+ "@napi-rs/canvas": "npm:noop-package@1.0.0"
182
+ },
183
+ "allowScripts": {
184
+ "chromedriver@*": true
193
185
  }
194
186
  }
@@ -1,41 +1,41 @@
1
1
  import { DecryptionOptions, PrintOptions, SecureData } from "../types/common";
2
2
  export default abstract class Decrypter {
3
- /**
4
- * @description Retrieves the private key from the file system and decrypts data using it.
5
- * @param data Data to be decrypted.
6
- * @param decryptionOptions Decryption options.
7
- * @returns Decrypted data.
8
- */
9
- static decryptDataForAvailableKey(data: SecureData, decryptionOptions: DecryptionOptions, printOptions: PrintOptions): string;
10
- /**
11
- * @description Decrypts data using the passed private key.
12
- * @param data Data to be decrypted. Can either be as single value or array of values for different keys.
13
- * @param privateKey Private key.
14
- * @param options Decryption options.
15
- * @returns Decrypted data.
16
- */
17
- static decryptData(data: SecureData, privateKey: string, options: DecryptionOptions): string;
18
- /**
19
- * @description Retrieves the private key from the current working directory, env var or the given path.
20
- * @param keyPath Path to the directory containing the private key.
21
- * @returns Private key.
22
- */
23
- static retrievePrivateKey(keyPath: string): string;
24
- /**
25
- * @description Decrypts data using a password.
26
- * @param data Data to be decrypted.
27
- * @returns Decrypted data.
28
- */
29
- private static _decryptDataWithPassword;
30
- /**
31
- * @description Prints the input options and data to the console.
32
- * @param options Decryption options.
33
- * @param data Data to be encrypted.
34
- */
35
- private static _printInput;
36
- /**
37
- * @description Prints the decrypted data.
38
- * @param decryptedData Decrypted data.
39
- */
40
- private static _printOutput;
3
+ /**
4
+ * @description Retrieves the private key from the file system and decrypts data using it.
5
+ * @param data Data to be decrypted.
6
+ * @param decryptionOptions Decryption options.
7
+ * @returns Decrypted data.
8
+ */
9
+ static decryptDataForAvailableKey(data: SecureData, decryptionOptions: DecryptionOptions, printOptions: PrintOptions): string;
10
+ /**
11
+ * @description Decrypts data using the passed private key.
12
+ * @param data Data to be decrypted. Can either be as single value or array of values for different keys.
13
+ * @param privateKey Private key.
14
+ * @param options Decryption options.
15
+ * @returns Decrypted data.
16
+ */
17
+ static decryptData(data: SecureData, privateKey: string, options: DecryptionOptions): string;
18
+ /**
19
+ * @description Retrieves the private key from the current working directory, env var or the given path.
20
+ * @param keyPath Path to the directory containing the private key.
21
+ * @returns Private key.
22
+ */
23
+ static retrievePrivateKey(keyPath: string): string;
24
+ /**
25
+ * @description Decrypts data using a password.
26
+ * @param data Data to be decrypted.
27
+ * @returns Decrypted data.
28
+ */
29
+ private static _decryptDataWithPassword;
30
+ /**
31
+ * @description Prints the input options and data to the console.
32
+ * @param options Decryption options.
33
+ * @param data Data to be encrypted.
34
+ */
35
+ private static _printInput;
36
+ /**
37
+ * @description Prints the decrypted data.
38
+ * @param decryptedData Decrypted data.
39
+ */
40
+ private static _printOutput;
41
41
  }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
2
+ var __importDefault =
3
+ (this && this.__importDefault) ||
4
+ function (mod) {
5
+ return mod && mod.__esModule ? mod : { default: mod };
6
+ };
5
7
  Object.defineProperty(exports, "__esModule", { value: true });
6
8
  // Imports
7
9
  const fs_1 = __importDefault(require("fs"));
@@ -12,161 +14,156 @@ const ErrorHandler_1 = __importDefault(require("./helper/ErrorHandler"));
12
14
  // Constants
13
15
  const common_1 = require("../constants/common");
14
16
  class Decrypter {
15
- // ========================== Public functions ==========================
16
- /**
17
- * @description Retrieves the private key from the file system and decrypts data using it.
18
- * @param data Data to be decrypted.
19
- * @param decryptionOptions Decryption options.
20
- * @returns Decrypted data.
21
- */
22
- static decryptDataForAvailableKey(data, decryptionOptions, printOptions) {
23
- if (printOptions === null || printOptions === void 0 ? void 0 : printOptions.printInput) {
24
- this._printInput(data, decryptionOptions);
25
- }
26
- const commonKeyPath = path_1.default.resolve(__dirname, "../keys");
27
- const privateKey = this.retrievePrivateKey(commonKeyPath);
28
- const decryptedData = this.decryptData(data, privateKey, decryptionOptions);
29
- if (printOptions === null || printOptions === void 0 ? void 0 : printOptions.printOutput) {
30
- this._printOutput(decryptedData);
31
- }
32
- return decryptedData;
17
+ // ========================== Public functions ==========================
18
+ /**
19
+ * @description Retrieves the private key from the file system and decrypts data using it.
20
+ * @param data Data to be decrypted.
21
+ * @param decryptionOptions Decryption options.
22
+ * @returns Decrypted data.
23
+ */
24
+ static decryptDataForAvailableKey(data, decryptionOptions, printOptions) {
25
+ if (printOptions === null || printOptions === void 0 ? void 0 : printOptions.printInput) {
26
+ this._printInput(data, decryptionOptions);
33
27
  }
34
- /**
35
- * @description Decrypts data using the passed private key.
36
- * @param data Data to be decrypted. Can either be as single value or array of values for different keys.
37
- * @param privateKey Private key.
38
- * @param options Decryption options.
39
- * @returns Decrypted data.
40
- */
41
- static decryptData(data, privateKey, options) {
42
- let encodedData;
43
- let decryptedDataByKey;
44
- let decryptedDataByRepoName;
45
- const decryptErrors = [];
46
- data = Util_1.default.convertStringToArray(data);
47
- for (const [index, value] of data.entries()) {
48
- // Convert base64 encoded data to utf8
49
- try {
50
- encodedData = options.useBase64Input ? Util_1.default.base64ToUtf8(value) : value;
51
- }
52
- catch (error) {
53
- decryptErrors.push(new Error(`\n - Invalid input data format at index ${index}. ${error.message}`));
54
- continue;
55
- }
56
- // Decrypt data with password
57
- try {
58
- decryptedDataByRepoName = Buffer.from(this._decryptDataWithPassword(encodedData, options), "base64");
59
- }
60
- catch (error) {
61
- const errorMessage = ErrorHandler_1.default.handleDecryptDataWithPasswordError(error, options);
62
- decryptErrors.push(new Error(`\n - Decryption with password failed for data at index ${index}. ${errorMessage}`));
63
- continue;
64
- }
65
- // Decrypt data with private key
66
- try {
67
- decryptedDataByKey = crypto_1.default.privateDecrypt({
68
- key: Util_1.default.parseKeyByEncoding(privateKey),
69
- padding: crypto_1.default.constants.RSA_PKCS1_OAEP_PADDING,
70
- oaepHash: "sha256"
71
- }, decryptedDataByRepoName);
72
- }
73
- catch (error) {
74
- const errorMessage = ErrorHandler_1.default.handleDecryptDataWithPrivateKeyError(error);
75
- decryptErrors.push(new Error(`\n - Decryption with private key failed for data at index ${index}. ${errorMessage}`));
76
- }
77
- }
78
- // Return the decrypted data if successful
79
- if (decryptedDataByKey) {
80
- return options.useBase64Output ? Util_1.default.utf8ToBase64(decryptedDataByKey.toString()) : decryptedDataByKey.toString();
81
- }
82
- else {
83
- throw new Error(`${ErrorHandler_1.default.DECRYPTION_ERROR_MESSAGE}: ${decryptErrors.map((error) => error.message).join(" ")}`);
84
- }
28
+ const commonKeyPath = path_1.default.resolve(__dirname, "../keys");
29
+ const privateKey = this.retrievePrivateKey(commonKeyPath);
30
+ const decryptedData = this.decryptData(data, privateKey, decryptionOptions);
31
+ if (printOptions === null || printOptions === void 0 ? void 0 : printOptions.printOutput) {
32
+ this._printOutput(decryptedData);
85
33
  }
86
- /**
87
- * @description Retrieves the private key from the current working directory, env var or the given path.
88
- * @param keyPath Path to the directory containing the private key.
89
- * @returns Private key.
90
- */
91
- static retrievePrivateKey(keyPath) {
92
- let privateKey;
93
- if (fs_1.default.existsSync(path_1.default.resolve(process.cwd(), common_1.PRIVATE_KEY_NAME))) {
94
- privateKey = fs_1.default.readFileSync(path_1.default.resolve(process.cwd(), common_1.PRIVATE_KEY_NAME), "utf8");
95
- }
96
- else if (process.env.QMATE_PRIVATE_KEY) {
97
- privateKey = Util_1.default.normalizeKey(process.env.QMATE_PRIVATE_KEY);
98
- }
99
- else if (fs_1.default.existsSync(path_1.default.resolve(keyPath, common_1.PRIVATE_KEY_NAME))) {
100
- privateKey = fs_1.default.readFileSync(path_1.default.resolve(keyPath, common_1.PRIVATE_KEY_NAME), "utf8");
101
- }
102
- if (!privateKey) {
103
- throw new Error(`${ErrorHandler_1.default.NO_PRIVATE_KEY_ERROR_MESSAGE}.`);
104
- }
105
- // Clear the private key from the environment variables after use
106
- process.env.QMATE_PRIVATE_KEY = "";
107
- return privateKey;
34
+ return decryptedData;
35
+ }
36
+ /**
37
+ * @description Decrypts data using the passed private key.
38
+ * @param data Data to be decrypted. Can either be as single value or array of values for different keys.
39
+ * @param privateKey Private key.
40
+ * @param options Decryption options.
41
+ * @returns Decrypted data.
42
+ */
43
+ static decryptData(data, privateKey, options) {
44
+ let encodedData;
45
+ let decryptedDataByKey;
46
+ let decryptedDataByRepoName;
47
+ const decryptErrors = [];
48
+ data = Util_1.default.convertStringToArray(data);
49
+ for (const [index, value] of data.entries()) {
50
+ // Convert base64 encoded data to utf8
51
+ try {
52
+ encodedData = options.useBase64Input ? Util_1.default.base64ToUtf8(value) : value;
53
+ } catch (error) {
54
+ decryptErrors.push(new Error(`\n - Invalid input data format at index ${index}. ${error.message}`));
55
+ continue;
56
+ }
57
+ // Decrypt data with password
58
+ try {
59
+ decryptedDataByRepoName = Buffer.from(this._decryptDataWithPassword(encodedData, options), "base64");
60
+ } catch (error) {
61
+ const errorMessage = ErrorHandler_1.default.handleDecryptDataWithPasswordError(error, options);
62
+ decryptErrors.push(new Error(`\n - Decryption with password failed for data at index ${index}. ${errorMessage}`));
63
+ continue;
64
+ }
65
+ // Decrypt data with private key
66
+ try {
67
+ decryptedDataByKey = crypto_1.default.privateDecrypt(
68
+ {
69
+ key: Util_1.default.parseKeyByEncoding(privateKey),
70
+ padding: crypto_1.default.constants.RSA_PKCS1_OAEP_PADDING,
71
+ oaepHash: "sha256"
72
+ },
73
+ decryptedDataByRepoName
74
+ );
75
+ } catch (error) {
76
+ const errorMessage = ErrorHandler_1.default.handleDecryptDataWithPrivateKeyError(error);
77
+ decryptErrors.push(new Error(`\n - Decryption with private key failed for data at index ${index}. ${errorMessage}`));
78
+ }
108
79
  }
109
- // ========================== Private functions ==========================
110
- /**
111
- * @description Decrypts data using a password.
112
- * @param data Data to be decrypted.
113
- * @returns Decrypted data.
114
- */
115
- static _decryptDataWithPassword(data, options) {
116
- let secretKey;
117
- if (options.includeRepoUrl) {
118
- const repoUrl = Util_1.default.getRepoUrl();
119
- const repoUrlContractHashed = Util_1.default.unifyRepoUrl(repoUrl);
120
- secretKey = crypto_1.default.pbkdf2Sync(repoUrlContractHashed, common_1.SALT, common_1.ITERATIONS, common_1.KEY_LENGTH, common_1.DIGEST);
121
- }
122
- else {
123
- secretKey = crypto_1.default.pbkdf2Sync(common_1.STATIC_PASSWORD, common_1.SALT, common_1.ITERATIONS, common_1.KEY_LENGTH, common_1.DIGEST);
124
- }
125
- try {
126
- const decipher = crypto_1.default.createDecipheriv(common_1.ALGORITHM, secretKey, common_1.IV);
127
- let decryptedData = decipher.update(data, "hex", "utf8");
128
- decryptedData += decipher.final("utf8");
129
- return decryptedData;
130
- }
131
- catch (error) {
132
- ErrorHandler_1.default.handleAndThrowError(error);
133
- }
80
+ // Return the decrypted data if successful
81
+ if (decryptedDataByKey) {
82
+ return options.useBase64Output ? Util_1.default.utf8ToBase64(decryptedDataByKey.toString()) : decryptedDataByKey.toString();
83
+ } else {
84
+ throw new Error(`${ErrorHandler_1.default.DECRYPTION_ERROR_MESSAGE}: ${decryptErrors.map((error) => error.message).join(" ")}`);
134
85
  }
135
- /**
136
- * @description Prints the input options and data to the console.
137
- * @param options Decryption options.
138
- * @param data Data to be encrypted.
139
- */
140
- static _printInput(data, options) {
141
- console.log("\n===========INPUT==========================================================");
142
- if (options.includeRepoUrl || options.useBase64Input || options.useBase64Output) {
143
- console.log("Options:");
144
- if (options.includeRepoUrl) {
145
- console.log("\x1b[33m - Using repo URL in key derivation.\x1b[0m");
146
- }
147
- if (options.useBase64Input) {
148
- console.log("\x1b[33m - Input data is processed as base64 format.\x1b[0m");
149
- }
150
- if (options.useBase64Output) {
151
- console.log("\x1b[33m - Output data is displayed in base64 format.\x1b[0m");
152
- }
153
- console.log("");
154
- }
155
- if (data instanceof Array) {
156
- console.log("Input Data:");
157
- console.log("\x1b[33mMultiple data entries found. Trying to decrypt the data with the first key matching one of the entries.\x1b[0m");
158
- }
159
- console.log("==========================================================================\n");
86
+ }
87
+ /**
88
+ * @description Retrieves the private key from the current working directory, env var or the given path.
89
+ * @param keyPath Path to the directory containing the private key.
90
+ * @returns Private key.
91
+ */
92
+ static retrievePrivateKey(keyPath) {
93
+ let privateKey;
94
+ if (fs_1.default.existsSync(path_1.default.resolve(process.cwd(), common_1.PRIVATE_KEY_NAME))) {
95
+ privateKey = fs_1.default.readFileSync(path_1.default.resolve(process.cwd(), common_1.PRIVATE_KEY_NAME), "utf8");
96
+ } else if (process.env.QMATE_PRIVATE_KEY) {
97
+ privateKey = Util_1.default.normalizeKey(process.env.QMATE_PRIVATE_KEY);
98
+ } else if (fs_1.default.existsSync(path_1.default.resolve(keyPath, common_1.PRIVATE_KEY_NAME))) {
99
+ privateKey = fs_1.default.readFileSync(path_1.default.resolve(keyPath, common_1.PRIVATE_KEY_NAME), "utf8");
160
100
  }
161
- /**
162
- * @description Prints the decrypted data.
163
- * @param decryptedData Decrypted data.
164
- */
165
- static _printOutput(decryptedData) {
166
- console.log("\n===========OUTPUT=========================================================");
167
- console.log("Decrypted Data ⬎");
168
- console.log(`\x1b[32m${decryptedData}\x1b[0m\n`);
169
- console.log("==========================================================================");
101
+ if (!privateKey) {
102
+ throw new Error(`${ErrorHandler_1.default.NO_PRIVATE_KEY_ERROR_MESSAGE}.`);
170
103
  }
104
+ // Clear the private key from the environment variables after use
105
+ process.env.QMATE_PRIVATE_KEY = "";
106
+ return privateKey;
107
+ }
108
+ // ========================== Private functions ==========================
109
+ /**
110
+ * @description Decrypts data using a password.
111
+ * @param data Data to be decrypted.
112
+ * @returns Decrypted data.
113
+ */
114
+ static _decryptDataWithPassword(data, options) {
115
+ let secretKey;
116
+ if (options.includeRepoUrl) {
117
+ const repoUrl = Util_1.default.getRepoUrl();
118
+ const repoUrlContractHashed = Util_1.default.unifyRepoUrl(repoUrl);
119
+ secretKey = crypto_1.default.pbkdf2Sync(repoUrlContractHashed, common_1.SALT, common_1.ITERATIONS, common_1.KEY_LENGTH, common_1.DIGEST);
120
+ } else {
121
+ secretKey = crypto_1.default.pbkdf2Sync(common_1.STATIC_PASSWORD, common_1.SALT, common_1.ITERATIONS, common_1.KEY_LENGTH, common_1.DIGEST);
122
+ }
123
+ try {
124
+ const decipher = crypto_1.default.createDecipheriv(common_1.ALGORITHM, secretKey, common_1.IV);
125
+ let decryptedData = decipher.update(data, "hex", "utf8");
126
+ decryptedData += decipher.final("utf8");
127
+ return decryptedData;
128
+ } catch (error) {
129
+ ErrorHandler_1.default.handleAndThrowError(error);
130
+ }
131
+ }
132
+ /**
133
+ * @description Prints the input options and data to the console.
134
+ * @param options Decryption options.
135
+ * @param data Data to be encrypted.
136
+ */
137
+ static _printInput(data, options) {
138
+ console.log("\n===========INPUT==========================================================");
139
+ if (options.includeRepoUrl || options.useBase64Input || options.useBase64Output) {
140
+ console.log("Options:");
141
+ if (options.includeRepoUrl) {
142
+ console.log("\x1b[33m - Using repo URL in key derivation.\x1b[0m");
143
+ }
144
+ if (options.useBase64Input) {
145
+ console.log("\x1b[33m - Input data is processed as base64 format.\x1b[0m");
146
+ }
147
+ if (options.useBase64Output) {
148
+ console.log("\x1b[33m - Output data is displayed in base64 format.\x1b[0m");
149
+ }
150
+ console.log("");
151
+ }
152
+ if (data instanceof Array) {
153
+ console.log("Input Data:");
154
+ console.log("\x1b[33mMultiple data entries found. Trying to decrypt the data with the first key matching one of the entries.\x1b[0m");
155
+ }
156
+ console.log("==========================================================================\n");
157
+ }
158
+ /**
159
+ * @description Prints the decrypted data.
160
+ * @param decryptedData Decrypted data.
161
+ */
162
+ static _printOutput(decryptedData) {
163
+ console.log("\n===========OUTPUT=========================================================");
164
+ console.log("Decrypted Data ⬎");
165
+ console.log(`\x1b[32m${decryptedData}\x1b[0m\n`);
166
+ console.log("==========================================================================");
167
+ }
171
168
  }
172
169
  exports.default = Decrypter;