@bigbinary/neeto-commons-frontend 4.13.37 → 4.13.39

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 (218) hide show
  1. package/README.md +0 -1
  2. package/configs/eslint/index.mjs +0 -1
  3. package/cypress-utils.d.ts +0 -40
  4. package/dist/cjs/{index-CUYe6FO0.js → index-BskY8dVw.js} +6 -4
  5. package/dist/cjs/index-BskY8dVw.js.map +1 -0
  6. package/dist/cjs/initializers/dayjs.js +3 -0
  7. package/dist/cjs/initializers/dayjs.js.map +1 -1
  8. package/dist/cjs/initializers/index.js +2 -0
  9. package/dist/cjs/initializers/index.js.map +1 -1
  10. package/dist/cjs/react-utils/BrowserPushNotifications/index.js +1 -2
  11. package/dist/cjs/react-utils/BrowserPushNotifications/index.js.map +1 -1
  12. package/dist/cjs/react-utils/BrowserPushNotifications/pushHelper.js +1 -2
  13. package/dist/cjs/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
  14. package/dist/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js +1 -2
  15. package/dist/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
  16. package/dist/cjs/react-utils/index.js +1 -2
  17. package/dist/cjs/react-utils/index.js.map +1 -1
  18. package/dist/cjs/react-utils/useFetchNeetoApps/index.js +1 -2
  19. package/dist/cjs/react-utils/useFetchNeetoApps/index.js.map +1 -1
  20. package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +1 -2
  21. package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
  22. package/dist/cjs/react-utils/useLocalStorage/index.js +1 -2
  23. package/dist/cjs/react-utils/useLocalStorage/index.js.map +1 -1
  24. package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js +1 -2
  25. package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
  26. package/dist/cjs/react-utils/usePersistedQuery/index.js +1 -2
  27. package/dist/cjs/react-utils/usePersistedQuery/index.js.map +1 -1
  28. package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js +1 -2
  29. package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
  30. package/dist/cjs/react-utils/useQueryParams/index.js +1 -2
  31. package/dist/cjs/react-utils/useQueryParams/index.js.map +1 -1
  32. package/dist/cjs/react-utils/useQueryParams/useQueryParams.js +1 -2
  33. package/dist/cjs/react-utils/useQueryParams/useQueryParams.js.map +1 -1
  34. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js +1 -2
  35. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
  36. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +1 -2
  37. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
  38. package/dist/cjs/utils/createSubscription.js +1 -2
  39. package/dist/cjs/utils/createSubscription.js.map +1 -1
  40. package/dist/cjs/utils/general.js +1 -2
  41. package/dist/cjs/utils/general.js.map +1 -1
  42. package/dist/cjs/utils/index.js +1 -2
  43. package/dist/cjs/utils/index.js.map +1 -1
  44. package/dist/cjs/utils/localePlugin.js +502 -0
  45. package/dist/cjs/utils/localePlugin.js.map +1 -0
  46. package/dist/{index-COfUw8MU.js → index-CoBEoJgD.js} +5 -3
  47. package/dist/index-CoBEoJgD.js.map +1 -0
  48. package/dist/initializers/dayjs.js +3 -0
  49. package/dist/initializers/dayjs.js.map +1 -1
  50. package/dist/initializers/index.js +2 -0
  51. package/dist/initializers/index.js.map +1 -1
  52. package/dist/react-utils/BrowserPushNotifications/index.js +1 -2
  53. package/dist/react-utils/BrowserPushNotifications/index.js.map +1 -1
  54. package/dist/react-utils/BrowserPushNotifications/pushHelper.js +2 -3
  55. package/dist/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
  56. package/dist/react-utils/BrowserPushNotifications/registerServiceWorker.js +1 -2
  57. package/dist/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
  58. package/dist/react-utils/index.js +1 -2
  59. package/dist/react-utils/index.js.map +1 -1
  60. package/dist/react-utils/useFetchNeetoApps/index.js +1 -2
  61. package/dist/react-utils/useFetchNeetoApps/index.js.map +1 -1
  62. package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +1 -2
  63. package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
  64. package/dist/react-utils/useLocalStorage/index.js +1 -2
  65. package/dist/react-utils/useLocalStorage/index.js.map +1 -1
  66. package/dist/react-utils/useLocalStorage/useLocalStorage.js +1 -2
  67. package/dist/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
  68. package/dist/react-utils/usePersistedQuery/index.js +1 -2
  69. package/dist/react-utils/usePersistedQuery/index.js.map +1 -1
  70. package/dist/react-utils/usePersistedQuery/usePersistedQuery.js +1 -2
  71. package/dist/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
  72. package/dist/react-utils/useQueryParams/index.js +1 -2
  73. package/dist/react-utils/useQueryParams/index.js.map +1 -1
  74. package/dist/react-utils/useQueryParams/useQueryParams.js +1 -2
  75. package/dist/react-utils/useQueryParams/useQueryParams.js.map +1 -1
  76. package/dist/react-utils/useRegisterNavigationCheckpoint/index.js +1 -2
  77. package/dist/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
  78. package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +1 -2
  79. package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
  80. package/dist/utils/createSubscription.js +1 -2
  81. package/dist/utils/createSubscription.js.map +1 -1
  82. package/dist/utils/general.js +1 -2
  83. package/dist/utils/general.js.map +1 -1
  84. package/dist/utils/index.js +1 -2
  85. package/dist/utils/index.js.map +1 -1
  86. package/dist/utils/localePlugin.js +500 -0
  87. package/dist/utils/localePlugin.js.map +1 -0
  88. package/package.json +1 -10
  89. package/cypress-configs/initializer.js +0 -32
  90. package/cypress-configs/plugins.js +0 -114
  91. package/cypress-configs/resolve.js +0 -17
  92. package/cypress-configs/webpack.config.js +0 -19
  93. package/dist/_commonjsHelpers-B85MJLTf.js +0 -6
  94. package/dist/_commonjsHelpers-B85MJLTf.js.map +0 -1
  95. package/dist/cjs/_commonjsHelpers-CFO10eej.js +0 -8
  96. package/dist/cjs/_commonjsHelpers-CFO10eej.js.map +0 -1
  97. package/dist/cjs/cypress-utils/.eslintrc.js +0 -40
  98. package/dist/cjs/cypress-utils/.eslintrc.js.map +0 -1
  99. package/dist/cjs/cypress-utils/commands.js +0 -288
  100. package/dist/cjs/cypress-utils/commands.js.map +0 -1
  101. package/dist/cjs/cypress-utils/constants/index.js +0 -11
  102. package/dist/cjs/cypress-utils/constants/index.js.map +0 -1
  103. package/dist/cjs/cypress-utils/constants/routes.js +0 -41
  104. package/dist/cjs/cypress-utils/constants/routes.js.map +0 -1
  105. package/dist/cjs/cypress-utils/constants/selectors/common.js +0 -104
  106. package/dist/cjs/cypress-utils/constants/selectors/common.js.map +0 -1
  107. package/dist/cjs/cypress-utils/constants/selectors/editor.js +0 -30
  108. package/dist/cjs/cypress-utils/constants/selectors/editor.js.map +0 -1
  109. package/dist/cjs/cypress-utils/constants/selectors/ipRestriction.js +0 -20
  110. package/dist/cjs/cypress-utils/constants/selectors/ipRestriction.js.map +0 -1
  111. package/dist/cjs/cypress-utils/constants/selectors/login.js +0 -22
  112. package/dist/cjs/cypress-utils/constants/selectors/login.js.map +0 -1
  113. package/dist/cjs/cypress-utils/constants/selectors/member.js +0 -67
  114. package/dist/cjs/cypress-utils/constants/selectors/member.js.map +0 -1
  115. package/dist/cjs/cypress-utils/constants/selectors/navigation.js +0 -29
  116. package/dist/cjs/cypress-utils/constants/selectors/navigation.js.map +0 -1
  117. package/dist/cjs/cypress-utils/constants/selectors/roles.js +0 -22
  118. package/dist/cjs/cypress-utils/constants/selectors/roles.js.map +0 -1
  119. package/dist/cjs/cypress-utils/constants/selectors/signUp.js +0 -24
  120. package/dist/cjs/cypress-utils/constants/selectors/signUp.js.map +0 -1
  121. package/dist/cjs/cypress-utils/constants/selectors/tags.js +0 -32
  122. package/dist/cjs/cypress-utils/constants/selectors/tags.js.map +0 -1
  123. package/dist/cjs/cypress-utils/constants/texts/common.js +0 -37
  124. package/dist/cjs/cypress-utils/constants/texts/common.js.map +0 -1
  125. package/dist/cjs/cypress-utils/constants/texts/member.js +0 -65
  126. package/dist/cjs/cypress-utils/constants/texts/member.js.map +0 -1
  127. package/dist/cjs/cypress-utils/constants/texts/navigation.js +0 -21
  128. package/dist/cjs/cypress-utils/constants/texts/navigation.js.map +0 -1
  129. package/dist/cjs/cypress-utils/constants/texts/roles.js +0 -22
  130. package/dist/cjs/cypress-utils/constants/texts/roles.js.map +0 -1
  131. package/dist/cjs/cypress-utils/constants/texts/signUp.js +0 -11
  132. package/dist/cjs/cypress-utils/constants/texts/signUp.js.map +0 -1
  133. package/dist/cjs/cypress-utils/constants/texts/tags.js +0 -25
  134. package/dist/cjs/cypress-utils/constants/texts/tags.js.map +0 -1
  135. package/dist/cjs/cypress-utils/fixtures/fake.js +0 -175
  136. package/dist/cjs/cypress-utils/fixtures/fake.js.map +0 -1
  137. package/dist/cjs/cypress-utils/index.js +0 -72
  138. package/dist/cjs/cypress-utils/index.js.map +0 -1
  139. package/dist/cjs/cypress-utils/jsconfig.js +0 -33
  140. package/dist/cjs/cypress-utils/jsconfig.js.map +0 -1
  141. package/dist/cjs/cypress-utils/utils/authentication.js +0 -50
  142. package/dist/cjs/cypress-utils/utils/authentication.js.map +0 -1
  143. package/dist/cjs/cypress-utils/utils/common.js +0 -90
  144. package/dist/cjs/cypress-utils/utils/common.js.map +0 -1
  145. package/dist/cjs/cypress-utils/utils/date.js +0 -25
  146. package/dist/cjs/cypress-utils/utils/date.js.map +0 -1
  147. package/dist/cjs/cypress-utils/utils/email.js +0 -163
  148. package/dist/cjs/cypress-utils/utils/email.js.map +0 -1
  149. package/dist/cjs/cypress-utils/utils/member.js +0 -353
  150. package/dist/cjs/cypress-utils/utils/member.js.map +0 -1
  151. package/dist/cjs/cypress-utils/utils/navigation.js +0 -214
  152. package/dist/cjs/cypress-utils/utils/navigation.js.map +0 -1
  153. package/dist/cjs/cypress-utils/utils/organization.js +0 -110
  154. package/dist/cjs/cypress-utils/utils/organization.js.map +0 -1
  155. package/dist/cjs/cypress-utils/utils/validation.js +0 -19
  156. package/dist/cjs/cypress-utils/utils/validation.js.map +0 -1
  157. package/dist/cjs/index-CUYe6FO0.js.map +0 -1
  158. package/dist/cypress-utils/.eslintrc.js +0 -38
  159. package/dist/cypress-utils/.eslintrc.js.map +0 -1
  160. package/dist/cypress-utils/commands.js +0 -286
  161. package/dist/cypress-utils/commands.js.map +0 -1
  162. package/dist/cypress-utils/constants/index.js +0 -9
  163. package/dist/cypress-utils/constants/index.js.map +0 -1
  164. package/dist/cypress-utils/constants/routes.js +0 -38
  165. package/dist/cypress-utils/constants/routes.js.map +0 -1
  166. package/dist/cypress-utils/constants/selectors/common.js +0 -100
  167. package/dist/cypress-utils/constants/selectors/common.js.map +0 -1
  168. package/dist/cypress-utils/constants/selectors/editor.js +0 -28
  169. package/dist/cypress-utils/constants/selectors/editor.js.map +0 -1
  170. package/dist/cypress-utils/constants/selectors/ipRestriction.js +0 -18
  171. package/dist/cypress-utils/constants/selectors/ipRestriction.js.map +0 -1
  172. package/dist/cypress-utils/constants/selectors/login.js +0 -20
  173. package/dist/cypress-utils/constants/selectors/login.js.map +0 -1
  174. package/dist/cypress-utils/constants/selectors/member.js +0 -63
  175. package/dist/cypress-utils/constants/selectors/member.js.map +0 -1
  176. package/dist/cypress-utils/constants/selectors/navigation.js +0 -26
  177. package/dist/cypress-utils/constants/selectors/navigation.js.map +0 -1
  178. package/dist/cypress-utils/constants/selectors/roles.js +0 -20
  179. package/dist/cypress-utils/constants/selectors/roles.js.map +0 -1
  180. package/dist/cypress-utils/constants/selectors/signUp.js +0 -22
  181. package/dist/cypress-utils/constants/selectors/signUp.js.map +0 -1
  182. package/dist/cypress-utils/constants/selectors/tags.js +0 -29
  183. package/dist/cypress-utils/constants/selectors/tags.js.map +0 -1
  184. package/dist/cypress-utils/constants/texts/common.js +0 -35
  185. package/dist/cypress-utils/constants/texts/common.js.map +0 -1
  186. package/dist/cypress-utils/constants/texts/member.js +0 -61
  187. package/dist/cypress-utils/constants/texts/member.js.map +0 -1
  188. package/dist/cypress-utils/constants/texts/navigation.js +0 -18
  189. package/dist/cypress-utils/constants/texts/navigation.js.map +0 -1
  190. package/dist/cypress-utils/constants/texts/roles.js +0 -20
  191. package/dist/cypress-utils/constants/texts/roles.js.map +0 -1
  192. package/dist/cypress-utils/constants/texts/signUp.js +0 -9
  193. package/dist/cypress-utils/constants/texts/signUp.js.map +0 -1
  194. package/dist/cypress-utils/constants/texts/tags.js +0 -23
  195. package/dist/cypress-utils/constants/texts/tags.js.map +0 -1
  196. package/dist/cypress-utils/fixtures/fake.js +0 -173
  197. package/dist/cypress-utils/fixtures/fake.js.map +0 -1
  198. package/dist/cypress-utils/index.js +0 -28
  199. package/dist/cypress-utils/index.js.map +0 -1
  200. package/dist/cypress-utils/jsconfig.js +0 -26
  201. package/dist/cypress-utils/jsconfig.js.map +0 -1
  202. package/dist/cypress-utils/utils/authentication.js +0 -48
  203. package/dist/cypress-utils/utils/authentication.js.map +0 -1
  204. package/dist/cypress-utils/utils/common.js +0 -78
  205. package/dist/cypress-utils/utils/common.js.map +0 -1
  206. package/dist/cypress-utils/utils/date.js +0 -23
  207. package/dist/cypress-utils/utils/date.js.map +0 -1
  208. package/dist/cypress-utils/utils/email.js +0 -160
  209. package/dist/cypress-utils/utils/email.js.map +0 -1
  210. package/dist/cypress-utils/utils/member.js +0 -351
  211. package/dist/cypress-utils/utils/member.js.map +0 -1
  212. package/dist/cypress-utils/utils/navigation.js +0 -212
  213. package/dist/cypress-utils/utils/navigation.js.map +0 -1
  214. package/dist/cypress-utils/utils/organization.js +0 -108
  215. package/dist/cypress-utils/utils/organization.js.map +0 -1
  216. package/dist/cypress-utils/utils/validation.js +0 -17
  217. package/dist/cypress-utils/utils/validation.js.map +0 -1
  218. package/dist/index-COfUw8MU.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localePlugin.js","sources":["../../src/utils/localePlugin.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-dangling-constants */\n\nconst DEFAULT_LOCALE = \"en\";\nconst LOCALES = {\n af: () => import(\"dayjs/locale/af\"),\n am: () => import(\"dayjs/locale/am\"),\n \"ar-dz\": () => import(\"dayjs/locale/ar-dz\"),\n \"ar-iq\": () => import(\"dayjs/locale/ar-iq\"),\n \"ar-kw\": () => import(\"dayjs/locale/ar-kw\"),\n \"ar-ly\": () => import(\"dayjs/locale/ar-ly\"),\n \"ar-ma\": () => import(\"dayjs/locale/ar-ma\"),\n \"ar-sa\": () => import(\"dayjs/locale/ar-sa\"),\n \"ar-tn\": () => import(\"dayjs/locale/ar-tn\"),\n ar: () => import(\"dayjs/locale/ar\"),\n az: () => import(\"dayjs/locale/az\"),\n be: () => import(\"dayjs/locale/be\"),\n bg: () => import(\"dayjs/locale/bg\"),\n bi: () => import(\"dayjs/locale/bi\"),\n bm: () => import(\"dayjs/locale/bm\"),\n \"bn-bd\": () => import(\"dayjs/locale/bn-bd\"),\n bn: () => import(\"dayjs/locale/bn\"),\n bo: () => import(\"dayjs/locale/bo\"),\n br: () => import(\"dayjs/locale/br\"),\n bs: () => import(\"dayjs/locale/bs\"),\n ca: () => import(\"dayjs/locale/ca\"),\n cs: () => import(\"dayjs/locale/cs\"),\n cv: () => import(\"dayjs/locale/cv\"),\n cy: () => import(\"dayjs/locale/cy\"),\n da: () => import(\"dayjs/locale/da\"),\n \"de-at\": () => import(\"dayjs/locale/de-at\"),\n \"de-ch\": () => import(\"dayjs/locale/de-ch\"),\n de: () => import(\"dayjs/locale/de\"),\n dv: () => import(\"dayjs/locale/dv\"),\n el: () => import(\"dayjs/locale/el\"),\n \"en-au\": () => import(\"dayjs/locale/en-au\"),\n \"en-ca\": () => import(\"dayjs/locale/en-ca\"),\n \"en-gb\": () => import(\"dayjs/locale/en-gb\"),\n \"en-ie\": () => import(\"dayjs/locale/en-ie\"),\n \"en-il\": () => import(\"dayjs/locale/en-il\"),\n \"en-in\": () => import(\"dayjs/locale/en-in\"),\n \"en-nz\": () => import(\"dayjs/locale/en-nz\"),\n \"en-sg\": () => import(\"dayjs/locale/en-sg\"),\n \"en-tt\": () => import(\"dayjs/locale/en-tt\"),\n en: () => import(\"dayjs/locale/en\"),\n eo: () => import(\"dayjs/locale/eo\"),\n \"es-do\": () => import(\"dayjs/locale/es-do\"),\n \"es-mx\": () => import(\"dayjs/locale/es-mx\"),\n \"es-pr\": () => import(\"dayjs/locale/es-pr\"),\n \"es-us\": () => import(\"dayjs/locale/es-us\"),\n es: () => import(\"dayjs/locale/es\"),\n et: () => import(\"dayjs/locale/et\"),\n eu: () => import(\"dayjs/locale/eu\"),\n fa: () => import(\"dayjs/locale/fa\"),\n fi: () => import(\"dayjs/locale/fi\"),\n fo: () => import(\"dayjs/locale/fo\"),\n \"fr-ca\": () => import(\"dayjs/locale/fr-ca\"),\n \"fr-ch\": () => import(\"dayjs/locale/fr-ch\"),\n fr: () => import(\"dayjs/locale/fr\"),\n fy: () => import(\"dayjs/locale/fy\"),\n ga: () => import(\"dayjs/locale/ga\"),\n gd: () => import(\"dayjs/locale/gd\"),\n gl: () => import(\"dayjs/locale/gl\"),\n \"gom-latn\": () => import(\"dayjs/locale/gom-latn\"),\n gu: () => import(\"dayjs/locale/gu\"),\n he: () => import(\"dayjs/locale/he\"),\n hi: () => import(\"dayjs/locale/hi\"),\n hr: () => import(\"dayjs/locale/hr\"),\n ht: () => import(\"dayjs/locale/ht\"),\n hu: () => import(\"dayjs/locale/hu\"),\n \"hy-am\": () => import(\"dayjs/locale/hy-am\"),\n id: () => import(\"dayjs/locale/id\"),\n is: () => import(\"dayjs/locale/is\"),\n \"it-ch\": () => import(\"dayjs/locale/it-ch\"),\n it: () => import(\"dayjs/locale/it\"),\n ja: () => import(\"dayjs/locale/ja\"),\n jv: () => import(\"dayjs/locale/jv\"),\n ka: () => import(\"dayjs/locale/ka\"),\n kk: () => import(\"dayjs/locale/kk\"),\n km: () => import(\"dayjs/locale/km\"),\n kn: () => import(\"dayjs/locale/kn\"),\n ko: () => import(\"dayjs/locale/ko\"),\n ku: () => import(\"dayjs/locale/ku\"),\n ky: () => import(\"dayjs/locale/ky\"),\n lb: () => import(\"dayjs/locale/lb\"),\n lo: () => import(\"dayjs/locale/lo\"),\n lt: () => import(\"dayjs/locale/lt\"),\n lv: () => import(\"dayjs/locale/lv\"),\n me: () => import(\"dayjs/locale/me\"),\n mi: () => import(\"dayjs/locale/mi\"),\n mk: () => import(\"dayjs/locale/mk\"),\n ml: () => import(\"dayjs/locale/ml\"),\n mn: () => import(\"dayjs/locale/mn\"),\n mr: () => import(\"dayjs/locale/mr\"),\n \"ms-my\": () => import(\"dayjs/locale/ms-my\"),\n ms: () => import(\"dayjs/locale/ms\"),\n mt: () => import(\"dayjs/locale/mt\"),\n my: () => import(\"dayjs/locale/my\"),\n nb: () => import(\"dayjs/locale/nb\"),\n ne: () => import(\"dayjs/locale/ne\"),\n \"nl-be\": () => import(\"dayjs/locale/nl-be\"),\n nl: () => import(\"dayjs/locale/nl\"),\n nn: () => import(\"dayjs/locale/nn\"),\n \"oc-lnc\": () => import(\"dayjs/locale/oc-lnc\"),\n \"pa-in\": () => import(\"dayjs/locale/pa-in\"),\n pl: () => import(\"dayjs/locale/pl\"),\n \"pt-br\": () => import(\"dayjs/locale/pt-br\"),\n pt: () => import(\"dayjs/locale/pt\"),\n rn: () => import(\"dayjs/locale/rn\"),\n ro: () => import(\"dayjs/locale/ro\"),\n ru: () => import(\"dayjs/locale/ru\"),\n rw: () => import(\"dayjs/locale/rw\"),\n sd: () => import(\"dayjs/locale/sd\"),\n se: () => import(\"dayjs/locale/se\"),\n si: () => import(\"dayjs/locale/si\"),\n sk: () => import(\"dayjs/locale/sk\"),\n sl: () => import(\"dayjs/locale/sl\"),\n sq: () => import(\"dayjs/locale/sq\"),\n \"sr-cyrl\": () => import(\"dayjs/locale/sr-cyrl\"),\n sr: () => import(\"dayjs/locale/sr\"),\n ss: () => import(\"dayjs/locale/ss\"),\n \"sv-fi\": () => import(\"dayjs/locale/sv-fi\"),\n sv: () => import(\"dayjs/locale/sv\"),\n sw: () => import(\"dayjs/locale/sw\"),\n ta: () => import(\"dayjs/locale/ta\"),\n te: () => import(\"dayjs/locale/te\"),\n tet: () => import(\"dayjs/locale/tet\"),\n tg: () => import(\"dayjs/locale/tg\"),\n th: () => import(\"dayjs/locale/th\"),\n tk: () => import(\"dayjs/locale/tk\"),\n \"tl-ph\": () => import(\"dayjs/locale/tl-ph\"),\n tlh: () => import(\"dayjs/locale/tlh\"),\n tr: () => import(\"dayjs/locale/tr\"),\n tzl: () => import(\"dayjs/locale/tzl\"),\n \"tzm-latn\": () => import(\"dayjs/locale/tzm-latn\"),\n tzm: () => import(\"dayjs/locale/tzm\"),\n \"ug-cn\": () => import(\"dayjs/locale/ug-cn\"),\n uk: () => import(\"dayjs/locale/uk\"),\n ur: () => import(\"dayjs/locale/ur\"),\n \"uz-latn\": () => import(\"dayjs/locale/uz-latn\"),\n uz: () => import(\"dayjs/locale/uz\"),\n vi: () => import(\"dayjs/locale/vi\"),\n \"x-pseudo\": () => import(\"dayjs/locale/x-pseudo\"),\n yo: () => import(\"dayjs/locale/yo\"),\n \"zh-cn\": () => import(\"dayjs/locale/zh-cn\"),\n \"zh-hk\": () => import(\"dayjs/locale/zh-hk\"),\n \"zh-tw\": () => import(\"dayjs/locale/zh-tw\"),\n zh: () => import(\"dayjs/locale/zh\"),\n\n // special cases\n no: () => import(\"dayjs/locale/nb\"), // Norwegian\n zn: () => import(\"dayjs/locale/zh-cn\"), // Chinese\n};\n\nconst getDayjsLocale = () => {\n for (const language of navigator.languages) {\n const lang = language.toLowerCase();\n\n if (lang in LOCALES) return lang;\n\n // handle locales like `fr-be` and `fr-lu`.\n const langPrefix = lang.split(\"-\")[0];\n if (langPrefix in LOCALES) {\n return langPrefix;\n }\n }\n\n return DEFAULT_LOCALE;\n};\n\nexport default async (_o, _c, d) => {\n try {\n const locale = getDayjsLocale();\n await LOCALES[locale]();\n d.locale(locale);\n } catch {\n d.locale(DEFAULT_LOCALE);\n }\n};\n"],"names":["DEFAULT_LOCALE","LOCALES","af","am","arDz","arIq","arKw","arLy","arMa","arSa","arTn","ar","az","be","bg","bi","bm","bnBd","bn","bo","br","bs","ca","cs","cv","cy","da","deAt","deCh","de","dv","el","enAu","enCa","enGb","enIe","enIl","enIn","enNz","enSg","enTt","en","eo","esDo","esMx","esPr","esUs","es","et","eu","fa","fi","fo","frCa","frCh","fr","fy","ga","gd","gl","gomLatn","gu","he","hi","hr","ht","hu","hyAm","id","is","itCh","it","ja","jv","ka","kk","km","kn","ko","ku","ky","lb","lo","lt","lv","me","mi","mk","ml","mn","mr","msMy","ms","mt","my","nb","ne","nlBe","nl","nn","ocLnc","paIn","pl","ptBr","pt","rn","ro","ru","rw","sd","se","si","sk","sl","sq","srCyrl","sr","ss","svFi","sv","sw","ta","te","tet","tg","th","tk","tlPh","tlh","tr","tzl","tzmLatn","tzm","ugCn","uk","ur","uzLatn","uz","vi","xPseudo","yo","zhCn","zhHk","zhTw","zh","no","zn","getDayjsLocale","_iterator","_createForOfIteratorHelper","navigator","languages","_step","s","n","done","language","value","lang","toLowerCase","langPrefix","split","err","e","f","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_o","_c","d","locale","wrap","_callee$","_context","prev","next","t0","stop","_x","_x2","_x3","apply","arguments"],"mappings":";;;;;AAAA;;AAEA,IAAMA,cAAc,GAAG,IAAI;AAC3B,IAAMC,OAAO,GAAG;EACdC,EAAE,EAAE,SAAJA,EAAEA,GAAA;IAAA,OAAQ,OAAO,iBAAiB,CAAC;AAAA,GAAA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AAA,UAAA,OACzBjL,OAAO,CAAC4K,MAAM,CAAC,EAAE;AAAA,QAAA,KAAA,CAAA;AACvBD,UAAAA,CAAC,CAACC,MAAM,CAACA,MAAM,CAAC;AAACG,UAAAA,QAAA,CAAAE,IAAA,GAAA,EAAA;AAAA,UAAA;AAAA,QAAA,KAAA,CAAA;AAAAF,UAAAA,QAAA,CAAAC,IAAA,GAAA,CAAA;UAAAD,QAAA,CAAAG,EAAA,GAAAH,QAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA;AAEjBJ,UAAAA,CAAC,CAACC,MAAM,CAAC7K,cAAc,CAAC;AAAC,QAAA,KAAA,EAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAgL,QAAA,CAAAI,IAAA,EAAA;AAAA;AAAA,KAAA,EAAAX,OAAA,EAAA,IAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;GAE5B,CAAA,CAAA;AAAA,EAAA,OAAA,UAAAY,EAAA,EAAAC,GAAA,EAAAC,GAAA,EAAA;AAAA,IAAA,OAAAlB,IAAA,CAAAmB,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA;AAAA,GAAA;AAAA,CAAA,EAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "4.13.37",
3
+ "version": "4.13.39",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -33,12 +33,6 @@
33
33
  "require": "./dist/cjs/constants/index.js",
34
34
  "types": "./constants.d.ts"
35
35
  },
36
- "./cypress-configs/*": "./cypress-configs/*",
37
- "./cypress-utils": {
38
- "import": "./dist/cypress-utils/index.js",
39
- "require": "./dist/cjs/cypress-utils/index.js",
40
- "types": "./cypress-utils.d.ts"
41
- },
42
36
  "./initializers": {
43
37
  "import": "./dist/initializers/index.js",
44
38
  "require": "./dist/cjs/initializers/index.js",
@@ -73,7 +67,6 @@
73
67
  "files": [
74
68
  "dist",
75
69
  "configs",
76
- "cypress-configs",
77
70
  "*.d.ts"
78
71
  ],
79
72
  "devDependencies": {
@@ -148,7 +141,6 @@
148
141
  "babel-preset-react": "6.24.1",
149
142
  "babel-preset-typescript": "^7.0.0-alpha.19",
150
143
  "css-loader": "4.3.0",
151
- "cypress": "11.2.0",
152
144
  "dayjs": "1.11.13",
153
145
  "dompurify": "^2.4.0",
154
146
  "esbuild": "0.24.0",
@@ -242,7 +234,6 @@
242
234
  "autoprefixer": "10.4.20",
243
235
  "avvvatars-react": "0.4.2",
244
236
  "axios": "1.8.2",
245
- "cypress": "11.2.0",
246
237
  "dayjs": "1.11.13",
247
238
  "dompurify": "^2.4.0",
248
239
  "dotenv-webpack": "^8.0.1",
@@ -1,32 +0,0 @@
1
- const { defineConfig } = require("cypress");
2
-
3
- const defineCypressConfig = (overrides = {}) => {
4
- const { e2e: e2eOverrides = {}, ...otherProps } = overrides;
5
-
6
- return defineConfig({
7
- execTimeout: 1800000,
8
- defaultCommandTimeout: 12000,
9
- requestTimeout: 15000,
10
- pageLoadTimeout: 60000,
11
- responseTimeout: 45000,
12
- viewportWidth: 1440,
13
- viewportHeight: 960,
14
- chromeWebSecurity: false,
15
- env: { grepFilterSpecs: true, grepOmitFiltered: true },
16
- retries: { runMode: 1, openMode: 0 },
17
- e2e: {
18
- setupNodeEvents(on, config) {
19
- return require("./plugins")(on, config);
20
- },
21
- specPattern: "cypress/e2e/**/*.spec.js",
22
- excludeSpecPattern: ["cypress/e2e/**/*.wip.spec.js"],
23
- experimentalRunAllSpecs: true,
24
- testIsolation: true,
25
- experimentalMemoryManagement: true,
26
- ...e2eOverrides,
27
- },
28
- ...otherProps,
29
- });
30
- };
31
-
32
- module.exports = { defineCypressConfig };
@@ -1,114 +0,0 @@
1
- // @ts-nocheck
2
- /// <reference types="cypress" />
3
-
4
- /**
5
- * @type {Cypress.PluginConfig}
6
- */
7
- // eslint-disable-next-line no-unused-vars
8
- const path = require("path");
9
-
10
- const webpack = require("@cypress/webpack-preprocessor");
11
- const {
12
- cypressBrowserPermissionsPlugin,
13
- } = require("cypress-browser-permissions");
14
- const { cloudPlugin } = require("cypress-cloud/plugin");
15
- const fs = require("fs-extra");
16
-
17
- const getConfigurationByFile = file => {
18
- const pathToConfigFile = `cypress/config/cypress.${file}.json`;
19
-
20
- return file && fs.readJsonSync(path.join(process.cwd(), pathToConfigFile));
21
- };
22
-
23
- const globalState = "globalState.txt";
24
-
25
- const merge = (target, source = {}) => {
26
- Object.keys(source).forEach(key => {
27
- if (source[key] && typeof source[key] === "object") {
28
- merge((target[key] = target[key] || {}), source[key]);
29
-
30
- return;
31
- }
32
- target[key] = source[key];
33
- });
34
-
35
- return target;
36
- };
37
-
38
- module.exports = (on, config) => {
39
- const environment = config.env.configFile;
40
- const configForEnvironment = getConfigurationByFile(environment);
41
- const options = {
42
- // send in the options from your webpack.config.js
43
- webpackOptions: require("./webpack.config"),
44
- watchOptions: {},
45
- };
46
- on("file:preprocessor", webpack(options));
47
-
48
- on("task", {
49
- log(...message) {
50
- //eslint-disable-next-line
51
- console.log(...message);
52
-
53
- return null;
54
- },
55
- });
56
-
57
- config = cypressBrowserPermissionsPlugin(on, config);
58
-
59
- const newEnvironment = merge(config, configForEnvironment);
60
- require("@cypress/grep/src/plugin")(newEnvironment);
61
- require("@cypress/code-coverage/task")(on, newEnvironment);
62
- cloudPlugin(on, newEnvironment);
63
-
64
- on("before:browser:launch", (browser, launchOptions) => {
65
- if (["chrome", "edge"].includes(browser.name) && browser.isHeadless) {
66
- launchOptions.args.push("--no-sandbox");
67
- launchOptions.args.push("--disable-gl-drawing-for-tests");
68
- launchOptions.args.push("--js-flags=--max-old-space-size=5500");
69
- launchOptions.args.push("--disable-gpu");
70
- }
71
-
72
- return launchOptions;
73
- });
74
-
75
- const readFileSyncIfExists = filePath => {
76
- try {
77
- return JSON.parse(fs.readFileSync(filePath, "utf8"));
78
- } catch (error) {
79
- if (error.code === "ENOENT") {
80
- return {};
81
- }
82
- console.log(error); // eslint-disable-line
83
- }
84
-
85
- return {};
86
- };
87
-
88
- const writeDataToFile = (filePath, data) => {
89
- try {
90
- fs.writeFileSync(filePath, data, "utf8");
91
- } catch (err) {
92
- console.log(err); // eslint-disable-line
93
- }
94
-
95
- return true;
96
- };
97
-
98
- on("task", {
99
- getGlobalState: key =>
100
- key
101
- ? readFileSyncIfExists(globalState)?.[key] ?? null
102
- : readFileSyncIfExists(globalState),
103
- updateGlobalState: ({ key, value }) => {
104
- const data = readFileSyncIfExists(globalState);
105
- data[key] = value;
106
-
107
- return writeDataToFile(globalState, JSON.stringify(data));
108
- },
109
- bulkUpdateGlobalState: newState =>
110
- writeDataToFile(globalState, JSON.stringify(newState)),
111
- });
112
-
113
- return config, newEnvironment;
114
- };
@@ -1,17 +0,0 @@
1
- const path = require("path");
2
-
3
- const basePath = `${process.cwd()}/cypress/`;
4
-
5
- module.exports = {
6
- alias: {
7
- Fixtures: path.resolve(basePath, "fixtures"),
8
- Plugins: path.resolve(basePath, "plugins"),
9
- Support: path.resolve(basePath, "support"),
10
- Texts: path.resolve(basePath, "constants/texts"),
11
- Selectors: path.resolve(basePath, "constants/selectors"),
12
- neetocommons: "@bigbinary/neeto-commons-frontend",
13
- Constants: path.resolve(basePath, "constants"),
14
- neetocist: "@bigbinary/neeto-cist",
15
- },
16
- fallback: { path: require.resolve("path-browserify") },
17
- };
@@ -1,19 +0,0 @@
1
- const resolve = require("./resolve");
2
-
3
- module.exports = {
4
- resolve,
5
- module: {
6
- rules: [
7
- {
8
- test: /\.(js|jsx)$/,
9
- exclude: [/node_modules/],
10
- use: [
11
- {
12
- loader: "babel-loader",
13
- options: { presets: ["@babel/preset-env"] },
14
- },
15
- ],
16
- },
17
- ],
18
- },
19
- };
@@ -1,6 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- export { getDefaultExportFromCjs as g };
6
- //# sourceMappingURL=_commonjsHelpers-B85MJLTf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers-B85MJLTf.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- function getDefaultExportFromCjs (x) {
4
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5
- }
6
-
7
- exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
8
- //# sourceMappingURL=_commonjsHelpers-CFO10eej.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers-CFO10eej.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('../_commonjsHelpers-CFO10eej.js');
4
-
5
- // DO NOT ADD ANY OTHER RULES TO THIS FILE WITHOUT
6
- // CONSULTING WITH THE WHEEL TEAM.
7
-
8
- var _eslintrc = {
9
- root: true,
10
- "extends": ["../../.eslintrc", "plugin:cypress/recommended"],
11
- rules: {
12
- // disable async/await for cypress given that cypress doesn't allow async/await syntax
13
- // https://docs.cypress.io/faq/questions/using-cypress-faq#Can-I-use-the-new-ES7-async-await-syntax
14
- "promise/prefer-await-to-then": "off",
15
- "import/order": ["error", {
16
- "newlines-between": "always",
17
- alphabetize: {
18
- order: "asc",
19
- caseInsensitive: true
20
- },
21
- warnOnUnassignedImports: true,
22
- groups: ["builtin", "external", "internal", "index", "sibling", "parent", "object", "type"],
23
- /*
24
- * Currently we check for existence of webpack alias
25
- * config and then iterate over the aliases and create
26
- * these pathGroups. Only caveat with this mechanism
27
- * is that in VSCode eslint plugin won't dynamically
28
- * read it. But eslint cli would!
29
- */
30
- // Ignore react imports so that they're always ordered to the top of the file.
31
- pathGroupsExcludedImportTypes: ["react", "react-native"]
32
- }],
33
- "@bigbinary/neeto/use-react-query-for-managing-remote-data": "off"
34
- }
35
- };
36
-
37
- var _eslintrc$1 = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(_eslintrc);
38
-
39
- module.exports = _eslintrc$1;
40
- //# sourceMappingURL=.eslintrc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":".eslintrc.js","sources":["../../../src/cypress-utils/.eslintrc.js"],"sourcesContent":["// DO NOT ADD ANY OTHER RULES TO THIS FILE WITHOUT\n// CONSULTING WITH THE WHEEL TEAM.\n\nmodule.exports = {\n root: true,\n extends: [\"../../.eslintrc\", \"plugin:cypress/recommended\"],\n rules: {\n // disable async/await for cypress given that cypress doesn't allow async/await syntax\n // https://docs.cypress.io/faq/questions/using-cypress-faq#Can-I-use-the-new-ES7-async-await-syntax\n \"promise/prefer-await-to-then\": \"off\",\n \"import/order\": [\n \"error\",\n {\n \"newlines-between\": \"always\",\n alphabetize: { order: \"asc\", caseInsensitive: true },\n warnOnUnassignedImports: true,\n groups: [\n \"builtin\",\n \"external\",\n \"internal\",\n \"index\",\n \"sibling\",\n \"parent\",\n \"object\",\n \"type\",\n ],\n /*\n * Currently we check for existence of webpack alias\n * config and then iterate over the aliases and create\n * these pathGroups. Only caveat with this mechanism\n * is that in VSCode eslint plugin won't dynamically\n * read it. But eslint cli would!\n */\n // Ignore react imports so that they're always ordered to the top of the file.\n pathGroupsExcludedImportTypes: [\"react\", \"react-native\"],\n },\n ],\n \"@bigbinary/neeto/use-react-query-for-managing-remote-data\": \"off\",\n },\n};\n"],"names":["module","root","rules","alphabetize","order","caseInsensitive","warnOnUnassignedImports","groups","pathGroupsExcludedImportTypes"],"mappings":";;;;AAAA;AACA;;AAEAA,IAAAA,SAAc,GAAG;AACfC,EAAAA,IAAI,EAAE,IAAI;AACV,EAAA,SAAA,EAAS,CAAC,iBAAiB,EAAE,4BAA4B,CAAC;AAC1DC,EAAAA,KAAK,EAAE;AACL;AACA;AACA,IAAA,8BAA8B,EAAE,KAAK;IACrC,cAAc,EAAE,CACd,OAAO,EACP;AACE,MAAA,kBAAkB,EAAE,QAAQ;AAC5BC,MAAAA,WAAW,EAAE;AAAEC,QAAAA,KAAK,EAAE,KAAK;AAAEC,QAAAA,eAAe,EAAE;OAAM;AACpDC,MAAAA,uBAAuB,EAAE,IAAI;AAC7BC,MAAAA,MAAM,EAAE,CACN,SAAS,EACT,UAAU,EACV,UAAU,EACV,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,CACP;AACD;AACR;AACA;AACA;AACA;AACA;AACA;AACQ;AACAC,MAAAA,6BAA6B,EAAE,CAAC,OAAO,EAAE,cAAc;AACzD,KAAC,CACF;AACD,IAAA,2DAA2D,EAAE;AAC/D;AACF,CAAC;;;;;;"}
@@ -1,288 +0,0 @@
1
- 'use strict';
2
-
3
- var defineProperty = require('../defineProperty-lChFfVqi.js');
4
- var toConsumableArray = require('../toConsumableArray-tBKHqzE3.js');
5
- var _typeof = require('../typeof-D4ZZ_FlZ.js');
6
- var cypressUtils_constants_routes = require('./constants/routes.js');
7
- var cypressUtils_constants_selectors_common = require('./constants/selectors/common.js');
8
- var cypressUtils_constants_texts_common = require('./constants/texts/common.js');
9
- var cypressUtils_utils_common = require('./utils/common.js');
10
- require('../unsupportedIterableToArray-BoHMiKNA.js');
11
- require('./constants/index.js');
12
-
13
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
- var initCustomCommands = function initCustomCommands() {
16
- Cypress.Commands.add("clearAndType", function (selector, text) {
17
- cy.get(selector).clear().type(text);
18
- });
19
- Cypress.Commands.add("clearAndTypeFast", function (selector, text) {
20
- cy.get(selector).clear().type(text, {
21
- delay: 0
22
- });
23
- });
24
- Cypress.Commands.add("clearByClickAndTypeFast", function (selector, text) {
25
- cy.get(selector).click().clear().type(text, {
26
- delay: 0
27
- });
28
- });
29
- Cypress.Commands.add("typeFast", function (selector, text) {
30
- cy.get(selector).type(text, {
31
- delay: 0
32
- });
33
- });
34
- Cypress.Commands.add("typeAndEnter", function (selector, text) {
35
- cy.get(selector).clear().type("".concat(text, "{enter}"));
36
- });
37
- Cypress.Commands.add("verifyToastMessage", function (message) {
38
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.toastMessage).should("be.visible").should("have.text", message);
39
-
40
- // close toast message
41
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.toastCloseButton).click();
42
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.toastMessage).should("not.exist");
43
- });
44
- Cypress.Commands.add("verifyToastIcon", function () {
45
- var closeToastr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
46
- cy.document().its("body").find(cypressUtils_constants_selectors_common.commonSelectors.toastIcon).should("have.text", "👍");
47
- closeToastr && cy.document().its("body").find(cypressUtils_constants_selectors_common.commonSelectors.toastCloseButton).click();
48
- cy.document().its("body").find(cypressUtils_constants_selectors_common.commonSelectors.toastIcon).should("not.exist");
49
- });
50
- Cypress.Commands.add("continueOnAlert", function (args) {
51
- var props = _typeof._typeof(args) === "object" ? args : {
52
- alias: args
53
- };
54
- var alias = props.alias,
55
- title = props.title,
56
- _props$requestCount = props.requestCount,
57
- requestCount = _props$requestCount === void 0 ? 1 : _props$requestCount,
58
- verifyToastIcon = props.verifyToastIcon,
59
- toastMessage = props.toastMessage;
60
- var hasMoreThanOneRequest = requestCount > 1;
61
- title && cy.get(cypressUtils_constants_selectors_common.commonSelectors.alertTitle).should("have.text", title);
62
- cy.interceptApi(alias, requestCount);
63
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.alertModalSubmitButton).click();
64
- cy.wait("@".concat(alias));
65
- verifyToastIcon && cy.verifyToastIcon();
66
- toastMessage && cy.verifyToastMessage(toastMessage);
67
- hasMoreThanOneRequest && cy.waitForMultipleRequest("@".concat(alias), requestCount - 1);
68
- });
69
- Cypress.Commands.add("interceptApi", function (alias) {
70
- var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
71
- return times > 0 && cy.intercept({
72
- url: cypressUtils_constants_routes.requestApis.allPath,
73
- resourceType: "xhr",
74
- times: times
75
- }).as(alias);
76
- });
77
- Cypress.Commands.add("waitForMultipleRequest", function (alias) {
78
- var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
79
- return cy.wrap(toConsumableArray._toConsumableArray(new Array(times))).each(function () {
80
- return cy.wait(alias);
81
- });
82
- });
83
- Cypress.Commands.add("apiRequest", function (options) {
84
- return cy.get("@requestHeaders").then(function (requestHeaders) {
85
- return requestHeaders ? cy.request(_objectSpread(_objectSpread({}, options), {}, {
86
- headers: _objectSpread(_objectSpread({}, requestHeaders), {}, {
87
- "accept-encoding": "gzip"
88
- })
89
- })) : cy.log("No request headers found");
90
- });
91
- });
92
- Cypress.Commands.add("reloadAndWait", function () {
93
- var requestCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
94
- if (!(requestCount > 0)) return;
95
- cy.interceptApi("reloadAllRequests", requestCount);
96
- cy.reload();
97
- cy.waitForMultipleRequest("@reloadAllRequests", requestCount);
98
- });
99
- Cypress.Commands.add("selectOption", function (containerSelector, optionText) {
100
- cy.get(containerSelector).click().type(optionText);
101
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.selectOption(optionText)).invoke("click");
102
- });
103
- Cypress.Commands.add("clickDropdownOption", function (optionText) {
104
- var dropdownSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : cypressUtils_constants_selectors_common.commonSelectors.dropdownIcon;
105
- cy.get(dropdownSelector).click();
106
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.dropdownContainer).contains(optionText).invoke("click");
107
- });
108
- Cypress.Commands.add("getText", function (selector) {
109
- return cy.get(selector).invoke("text");
110
- });
111
- Cypress.Commands.add("getValue", function (selector) {
112
- return cy.get(selector).invoke("val");
113
- });
114
-
115
- // Deprecated. Use withinIframe.
116
- Cypress.Commands.add("getIframe", function (iframeSelector) {
117
- return cy.get(iframeSelector).its("0.contentDocument.body").should("not.be.empty");
118
- });
119
- Cypress.Commands.add("withinIframe", function (selector, callback) {
120
- cy.get(selector, {
121
- timeout: 10000
122
- }).its("0.contentDocument.body").should("be.visible").and("not.be.empty");
123
- cy.get(selector, {
124
- timeout: 10000
125
- }).its("0.contentDocument.body").eq(0).within(callback);
126
- });
127
- Cypress.Commands.add("openInSameTabOnClick", function (_ref) {
128
- var url = _ref.url,
129
- alias = _ref.alias,
130
- selector = _ref.selector;
131
- cy.window().then(function (win) {
132
- cy.stub(win, "open").as(alias)
133
- // eslint-disable-next-line xss/no-location-href-assign
134
- .callsFake(function (newUrl) {
135
- return win.location.href = newUrl;
136
- });
137
- });
138
- cy.get(selector).click();
139
- cy.get("@".concat(alias)).should("be.called");
140
- cy.url().should("include", url);
141
- });
142
- Cypress.Commands.add("globalState", function (key) {
143
- return cy.task("getGlobalState", key);
144
- });
145
- Cypress.Commands.add("ifExist", function (selector, callback) {
146
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.body).then(function ($body) {
147
- if ($body.find(selector).length) callback();
148
- });
149
- });
150
- Cypress.Commands.add("ifNotExist", function (selector, callback) {
151
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.body).then(function ($body) {
152
- if (!$body.find(selector).length) callback();
153
- });
154
- });
155
- Cypress.Commands.add("dragAndDrop", function (_ref2) {
156
- var subject = _ref2.subject,
157
- target = _ref2.target,
158
- _ref2$dragIndex = _ref2.dragIndex,
159
- dragIndex = _ref2$dragIndex === void 0 ? 0 : _ref2$dragIndex,
160
- _ref2$dropIndex = _ref2.dropIndex,
161
- dropIndex = _ref2$dropIndex === void 0 ? 0 : _ref2$dropIndex;
162
- cy.get(subject).should("be.visible", {
163
- timeout: 20000
164
- });
165
- Cypress.log({
166
- name: "DRAGNDROP",
167
- message: "Dragging element ".concat(subject, " to ").concat(target),
168
- consoleProps: function consoleProps() {
169
- return {
170
- subject: subject,
171
- target: target
172
- };
173
- }
174
- });
175
- cy.get(target).eq(dropIndex).then(function ($target) {
176
- var coordsDrop = $target[0].getBoundingClientRect();
177
- cy.get(subject).eq(dragIndex).then(function (subject) {
178
- var coordsDrag = subject[0].getBoundingClientRect();
179
- cy.wrap(subject).trigger("mousedown", {
180
- button: 0,
181
- // BUTTON_INDEX
182
- clientX: coordsDrag.x,
183
- clientY: coordsDrag.y,
184
- force: true
185
- }).trigger("mousemove", {
186
- button: 0,
187
- // BUTTON_INDEX
188
- clientX: coordsDrag.x + 10,
189
- // SLOPPY_CLICK_THRESHOLD
190
- clientY: coordsDrag.y,
191
- force: true
192
- });
193
- cy.get("body").trigger("mousemove", {
194
- button: 0,
195
- // BUTTON_INDEX
196
- clientX: coordsDrop.x,
197
- clientY: coordsDrop.y,
198
- force: true
199
- }).trigger("mouseup");
200
- });
201
- });
202
- });
203
- Cypress.Commands.add("verifyPlaceholder", function (textInputSelector, value) {
204
- cy.get(textInputSelector).should("have.attr", "placeholder").and("eq", value);
205
- });
206
- Cypress.Commands.add("enableOrDisableSwitch", function (switchButton, value) {
207
- cy.get(switchButton).invoke("click");
208
- cy.get(switchButton).should("have.prop", "value").and("eq", value);
209
- });
210
- Cypress.Commands.add("interceptNonVersionedApi", function (_ref3) {
211
- var _ref3$url = _ref3.url,
212
- url = _ref3$url === void 0 ? "*" : _ref3$url,
213
- alias = _ref3.alias,
214
- _ref3$times = _ref3.times,
215
- times = _ref3$times === void 0 ? 1 : _ref3$times;
216
- cy.intercept({
217
- url: url,
218
- times: times
219
- }).as(alias);
220
- });
221
- Cypress.Commands.add("typeOnSearchField", function (_ref4) {
222
- var selector = _ref4.selector,
223
- value = _ref4.value,
224
- _ref4$skipSearchReque = _ref4.skipSearchRequest,
225
- skipSearchRequest = _ref4$skipSearchReque === void 0 ? true : _ref4$skipSearchReque,
226
- delay = _ref4.delay;
227
- cy.get(selector).invoke("val").then(function (currentValue) {
228
- if (currentValue !== value) {
229
- !skipSearchRequest && cy.interceptApi("searchRequest");
230
- cy.clearAndTypeFast(selector, value);
231
- !skipSearchRequest && cy.wait("@searchRequest");
232
- } else delay && cy.wait(delay);
233
- });
234
- });
235
- Cypress.Commands.add("clickByRemoveTargetAttr", function (selector) {
236
- cy.get(selector).invoke("removeAttr", "target").click();
237
- });
238
- Cypress.Commands.add("navigateToPreviewPage", function (selector) {
239
- var fetchRequestCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
240
- cy.interceptApi("fetchRequests", fetchRequestCount);
241
- cy.clickByRemoveTargetAttr(selector);
242
- fetchRequestCount === 1 ? cy.wait("@fetchRequests") : cy.waitForMultipleRequest("@fetchRequests", fetchRequestCount);
243
- });
244
- Cypress.Commands.add("saveChanges", function (aliasName) {
245
- var requestCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
246
- cy.interceptApi(aliasName, requestCount);
247
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.saveChangesButton).click();
248
- cy.wait("@".concat(aliasName));
249
- cy.verifyToastIcon();
250
- requestCount > 1 && cy.waitForMultipleRequest("@".concat(aliasName), requestCount - 1);
251
- });
252
- Cypress.Commands.add("verifyAttribute", function (_ref5) {
253
- var selector = _ref5.selector,
254
- attr = _ref5.attr,
255
- value = _ref5.value;
256
- cy.get(selector).should("have.attr", attr).and("include", value);
257
- });
258
- Cypress.Commands.add("verifyUnsavedAlertModal", function (cancelButton) {
259
- cy.get(cancelButton).click();
260
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.alertTitle).should("have.text", cypressUtils_constants_texts_common.commonTexts.unsavedChangesAlertTitle);
261
- cy.get(cypressUtils_constants_selectors_common.commonSelectors.alertMessage).should("have.text", cypressUtils_constants_texts_common.commonTexts.unsavedChangesAlertMessage);
262
- });
263
- Cypress.Commands.add("verifyTooltip", function (selector, text) {
264
- cy.get(selector).realHover();
265
- cy.document().its("body").find(cypressUtils_constants_selectors_common.commonSelectors.tooltip).should("have.text", text);
266
- cy.document().find("body").click("topRight", {
267
- force: true
268
- });
269
- cy.document().its("body").find(cypressUtils_constants_selectors_common.commonSelectors.tooltip).should("not.exist");
270
- });
271
- Cypress.Commands.add("getEmailContent", function (props, options) {
272
- return cy.mailosaurGetMessage(Cypress.env("MAILOSAUR_SERVER_ID"), props, options);
273
- });
274
- Cypress.Commands.add("rewriteHeaders", function () {
275
- if (!cypressUtils_utils_common.isStagingEnv) return;
276
- cy.intercept("*", function (req) {
277
- return req.on("response", function (res) {
278
- var setCookies = res.headers["set-cookie"];
279
- res.headers["set-cookie"] = (Array.isArray(setCookies) ? setCookies : [setCookies]).filter(Boolean).map(function (headerContent) {
280
- return headerContent.concat("secure; samesite=none");
281
- });
282
- });
283
- });
284
- });
285
- };
286
-
287
- exports.initCustomCommands = initCustomCommands;
288
- //# sourceMappingURL=commands.js.map