@verdaccio/ui-theme 6.0.0-6-next.9 → 6.0.0-6-next.13

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 (323) hide show
  1. package/.babelrc +1 -1
  2. package/.eslintrc +0 -15
  3. package/CHANGELOG.md +61 -0
  4. package/jest/api/packages.json +42 -0
  5. package/jest/jest.config.js +2 -2
  6. package/jest/server-handlers.ts +9 -0
  7. package/jest/server.ts +6 -0
  8. package/jest/setup-env.ts +18 -0
  9. package/jest/setup.ts +2 -7
  10. package/jest/unit/components/__mocks__/token.ts +0 -1
  11. package/jest/unit/components/store/login.ts +1 -0
  12. package/package.json +43 -33
  13. package/src/App/App.test.tsx +75 -51
  14. package/src/App/App.tsx +7 -42
  15. package/src/App/AppRoute.tsx +3 -16
  16. package/src/App/Footer/Footer.test.tsx +0 -1
  17. package/src/App/Footer/Footer.tsx +35 -22
  18. package/src/App/Footer/__snapshots__/Footer.test.tsx.snap +208 -302
  19. package/src/App/Footer/styles.ts +2 -3
  20. package/src/App/Header/Header.test.tsx +53 -61
  21. package/src/App/Header/Header.tsx +13 -24
  22. package/src/App/Header/HeaderGreetings.tsx +0 -1
  23. package/src/App/Header/HeaderLeft.tsx +0 -1
  24. package/src/App/Header/HeaderMenu.tsx +6 -6
  25. package/src/App/Header/HeaderRight.tsx +1 -2
  26. package/src/App/Header/HeaderToolTip.tsx +0 -1
  27. package/src/App/Header/HeaderToolTipIcon.tsx +10 -10
  28. package/src/App/Header/LanguageSwitch.tsx +17 -79
  29. package/src/App/Header/LoginDialog/LoginDialog.test.tsx +25 -35
  30. package/src/App/Header/LoginDialog/LoginDialog.tsx +28 -46
  31. package/src/App/Header/LoginDialog/LoginDialogCloseButton.tsx +1 -2
  32. package/src/App/Header/LoginDialog/LoginDialogForm.tsx +0 -1
  33. package/src/App/Header/LoginDialog/LoginDialogFormError.tsx +1 -2
  34. package/src/App/Header/LoginDialog/LoginDialogHeader.tsx +4 -4
  35. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.test.tsx +1 -3
  36. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.tsx +9 -10
  37. package/src/App/Header/RegistryInfoDialog/RegistryInfoDialog.tsx +1 -2
  38. package/src/App/Header/RegistryInfoDialog/styles.ts +0 -1
  39. package/src/App/Header/Search/Search.test.tsx +48 -43
  40. package/src/App/Header/Search/Search.tsx +23 -108
  41. package/src/App/Header/Search/__snapshots__/Search.test.tsx.snap +392 -28
  42. package/src/App/Header/styles.ts +2 -3
  43. package/src/App/index.ts +0 -1
  44. package/src/App/utils/loadable.tsx +3 -1
  45. package/src/components/ActionBar/ActionBar.test.tsx +13 -14
  46. package/src/components/ActionBar/ActionBar.tsx +0 -2
  47. package/src/components/ActionBar/ActionBarAction.tsx +11 -14
  48. package/src/components/ActionBar/__snapshots__/ActionBar.test.tsx.snap +198 -53
  49. package/src/components/AppBar.tsx +1 -1
  50. package/src/components/Author/Author.test.tsx +1 -4
  51. package/src/components/Author/Author.tsx +2 -4
  52. package/src/components/Author/__snapshots__/Author.test.tsx.snap +804 -48
  53. package/src/components/Author/styles.ts +0 -1
  54. package/src/components/AutoComplete/AutoComplete.tsx +85 -163
  55. package/src/components/AutoComplete/AutoCompleteV2.tsx +8 -10
  56. package/src/components/AutoComplete/styles.tsx +0 -15
  57. package/src/components/Avatar.tsx +1 -1
  58. package/src/components/Box.tsx +1 -1
  59. package/src/components/Button.tsx +1 -1
  60. package/src/components/Card.tsx +1 -1
  61. package/src/components/CardActions.tsx +1 -1
  62. package/src/components/CardContent.tsx +1 -1
  63. package/src/components/Chip.tsx +1 -1
  64. package/src/components/CircularProgress.tsx +2 -2
  65. package/src/components/CopyToClipBoard.tsx +2 -3
  66. package/src/components/Dialog.tsx +1 -1
  67. package/src/components/DialogActions.tsx +2 -2
  68. package/src/components/DialogContent.tsx +2 -2
  69. package/src/components/DialogTitle.tsx +1 -1
  70. package/src/components/Divider.tsx +1 -1
  71. package/src/components/FloatingActionButton.tsx +1 -1
  72. package/src/components/FormControl.tsx +1 -1
  73. package/src/components/FormHelperText.tsx +2 -2
  74. package/src/components/Grid.tsx +1 -1
  75. package/src/components/Heading.tsx +1 -1
  76. package/src/components/IconButton.tsx +1 -1
  77. package/src/components/Icons/index.ts +1 -17
  78. package/src/components/Input.tsx +1 -1
  79. package/src/components/InputAdornment/InputAdornment.tsx +2 -2
  80. package/src/components/InputLabel.tsx +1 -1
  81. package/src/components/Label/Label.test.tsx +0 -1
  82. package/src/components/Label/Label.tsx +2 -3
  83. package/src/components/List.tsx +1 -1
  84. package/src/components/ListItem.tsx +1 -1
  85. package/src/components/ListItemText.tsx +1 -4
  86. package/src/components/Loading/Loading.test.tsx +0 -1
  87. package/src/components/Loading/Loading.tsx +1 -2
  88. package/src/components/Loading/Spinner/Spinner.test.tsx +1 -2
  89. package/src/components/Loading/Spinner/Spinner.tsx +1 -2
  90. package/src/components/Loading/Spinner/__snapshots__/Spinner.test.tsx.snap +114 -16
  91. package/src/components/Loading/__snapshots__/Loading.test.tsx.snap +63 -11
  92. package/src/components/Loading/styles.ts +1 -2
  93. package/src/components/Logo/Logo.test.tsx +0 -1
  94. package/src/components/Logo/Logo.tsx +1 -2
  95. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +2 -0
  96. package/src/components/Menu.tsx +1 -1
  97. package/src/components/MenuItem.tsx +1 -1
  98. package/src/components/NotFound/NotFound.tsx +1 -3
  99. package/src/components/NotFound/Notfound.test.tsx +1 -2
  100. package/src/components/NotFound/__snapshots__/Notfound.test.tsx.snap +138 -11
  101. package/src/components/NotFound/styles.ts +0 -1
  102. package/src/components/Paper.tsx +1 -1
  103. package/src/components/SnackbarContent.tsx +1 -1
  104. package/src/components/SvgIcon.tsx +1 -1
  105. package/src/components/Tab.tsx +1 -1
  106. package/src/components/Tabs.tsx +1 -1
  107. package/src/components/Text/Text.tsx +1 -1
  108. package/src/components/Text/TextConfig.ts +1 -1
  109. package/src/components/TextField/TextField.test.tsx +0 -1
  110. package/src/components/TextField/TextField.tsx +2 -2
  111. package/src/components/TextField/__snapshots__/TextField.test.tsx.snap +216 -3
  112. package/src/components/Toolbar.tsx +1 -1
  113. package/src/components/Tooltip.tsx +1 -1
  114. package/src/design-tokens/ResetStyles.tsx +1 -1
  115. package/src/design-tokens/StyleBaseline.tsx +2 -2
  116. package/src/design-tokens/ThemeContext.ts +1 -1
  117. package/src/design-tokens/ThemeProvider.tsx +15 -12
  118. package/src/design-tokens/theme.ts +28 -26
  119. package/src/design-tokens/useTheme.ts +1 -1
  120. package/src/{design-tokens → hooks}/useLocalStorage.ts +0 -0
  121. package/src/{design-tokens → hooks}/useOnClickOutside.ts +0 -0
  122. package/src/i18n/ABOUT_TRANSLATIONS.md +13 -0
  123. package/src/i18n/__mocks__/loadTranslationFile.ts +5 -0
  124. package/src/i18n/config.ts +38 -0
  125. package/src/i18n/crowdin/ui.json +170 -0
  126. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/cs-CZ.json +0 -0
  127. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/de-DE.json +0 -0
  128. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/en-US.json +0 -0
  129. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/es-ES.json +0 -0
  130. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/fr-FR.json +0 -0
  131. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/ja-JP.json +0 -0
  132. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/km-KH.json +0 -0
  133. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/pt-BR.json +0 -0
  134. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/ru-RU.json +0 -0
  135. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/tr-TR.json +0 -0
  136. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/uk-UA.json +0 -0
  137. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/zh-CN.json +0 -0
  138. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/zh-TW.json +0 -0
  139. package/src/i18n/download_translations/ar-SA/ui.json +170 -0
  140. package/src/i18n/download_translations/cs-CZ/ui.json +170 -0
  141. package/src/i18n/download_translations/de-DE/ui.json +170 -0
  142. package/src/i18n/download_translations/es-ES/ui.json +170 -0
  143. package/src/i18n/download_translations/fi-FI/ui.json +170 -0
  144. package/src/i18n/download_translations/fil-PH/ui.json +170 -0
  145. package/src/i18n/download_translations/fr-FR/ui.json +170 -0
  146. package/src/i18n/download_translations/gl-ES/ui.json +170 -0
  147. package/src/i18n/download_translations/hi-IN/ui.json +170 -0
  148. package/src/i18n/download_translations/it-IT/ui.json +170 -0
  149. package/src/i18n/download_translations/ja-JP/ui.json +170 -0
  150. package/src/i18n/download_translations/km-KH/ui.json +170 -0
  151. package/src/i18n/download_translations/ko-KR/ui.json +170 -0
  152. package/src/i18n/download_translations/pl-PL/ui.json +170 -0
  153. package/src/i18n/download_translations/pt-BR/ui.json +170 -0
  154. package/src/i18n/download_translations/pt-PT/ui.json +170 -0
  155. package/src/i18n/download_translations/ro-RO/ui.json +170 -0
  156. package/src/i18n/download_translations/ru-RU/ui.json +170 -0
  157. package/src/i18n/download_translations/si-LK/ui.json +170 -0
  158. package/src/i18n/download_translations/sr-CS/ui.json +170 -0
  159. package/src/i18n/download_translations/sr-SP/ui.json +170 -0
  160. package/src/i18n/download_translations/tg-TJ/ui.json +170 -0
  161. package/src/i18n/download_translations/tr-TR/ui.json +170 -0
  162. package/src/i18n/download_translations/uk-UA/ui.json +170 -0
  163. package/src/i18n/download_translations/vi-VN/ui.json +170 -0
  164. package/src/i18n/download_translations/yo-NG/ui.json +170 -0
  165. package/src/i18n/download_translations/zh-CN/ui.json +170 -0
  166. package/src/i18n/download_translations/zh-TW/ui.json +170 -0
  167. package/src/i18n/enabledLanguages.ts +35 -0
  168. package/src/i18n/loadTranslationFile.ts +14 -0
  169. package/src/index.tsx +13 -11
  170. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.test.tsx +0 -2
  171. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.tsx +1 -3
  172. package/src/pages/Version/DetailContainer/Dependencies/styles.ts +0 -1
  173. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.test.tsx +1 -3
  174. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.tsx +2 -3
  175. package/src/pages/Version/DetailContainer/DetailContainer.test.tsx +0 -1
  176. package/src/pages/Version/DetailContainer/DetailContainer.tsx +1 -3
  177. package/src/pages/Version/DetailContainer/DetailContainerContent.tsx +0 -1
  178. package/src/pages/Version/DetailContainer/DetailContainerContentReadme.tsx +0 -1
  179. package/src/pages/Version/DetailContainer/DetailContainerTabs.tsx +0 -1
  180. package/src/pages/Version/DetailContainer/NoItems/NoItems.tsx +0 -1
  181. package/src/pages/Version/DetailContainer/NoItems/Noitems.test.tsx +0 -1
  182. package/src/pages/Version/DetailContainer/NoItems/__snapshots__/Noitems.test.tsx.snap +10 -1
  183. package/src/pages/Version/DetailContainer/Readme/Readme.spec.tsx +1 -2
  184. package/src/pages/Version/DetailContainer/Readme/Readme.tsx +1 -2
  185. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.test.tsx +1 -9
  186. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.tsx +1 -3
  187. package/src/pages/Version/DetailContainer/UpLinks/__snapshots__/UpLinks.test.tsx.snap +184 -26
  188. package/src/pages/Version/DetailContainer/UpLinks/styles.ts +2 -3
  189. package/src/pages/Version/DetailContainer/Versions/Versions.test.tsx +3 -5
  190. package/src/pages/Version/DetailContainer/Versions/Versions.tsx +1 -2
  191. package/src/pages/Version/DetailContainer/Versions/VersionsHistoryList.tsx +2 -4
  192. package/src/pages/Version/DetailContainer/Versions/VersionsTagList.tsx +1 -3
  193. package/src/pages/Version/DetailContainer/Versions/styles.ts +2 -3
  194. package/src/pages/Version/DetailContainer/__snapshots__/DetailContainer.test.tsx.snap +168 -34
  195. package/src/pages/Version/DetailSidebar/DetailSidebar.tsx +0 -2
  196. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.test.tsx +0 -2
  197. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.tsx +1 -2
  198. package/src/pages/Version/DetailSidebar/DetailSidebarTitle.tsx +0 -1
  199. package/src/pages/Version/DetailSidebar/Developers/Developers.test.tsx +3 -5
  200. package/src/pages/Version/DetailSidebar/Developers/Developers.tsx +3 -5
  201. package/src/pages/Version/DetailSidebar/Developers/DevelopersTitle.tsx +0 -1
  202. package/src/pages/Version/DetailSidebar/Developers/__snapshots__/Developers.test.tsx.snap +328 -40
  203. package/src/pages/Version/DetailSidebar/Developers/styles.ts +0 -1
  204. package/src/pages/Version/DetailSidebar/Dist/Dist.test.tsx +1 -3
  205. package/src/pages/Version/DetailSidebar/Dist/Dist.tsx +1 -3
  206. package/src/pages/Version/DetailSidebar/Dist/__snapshots__/Dist.test.tsx.snap +1436 -74
  207. package/src/pages/Version/DetailSidebar/Dist/styles.ts +2 -1
  208. package/src/pages/Version/DetailSidebar/Engines/Engines.test.tsx +1 -3
  209. package/src/pages/Version/DetailSidebar/Engines/Engines.tsx +1 -3
  210. package/src/pages/Version/DetailSidebar/Engines/styles.ts +0 -1
  211. package/src/pages/Version/DetailSidebar/Install/Install.test.tsx +1 -3
  212. package/src/pages/Version/DetailSidebar/Install/Install.tsx +0 -2
  213. package/src/pages/Version/DetailSidebar/Install/InstallListItem.tsx +0 -1
  214. package/src/pages/Version/DetailSidebar/Repository/Repository.test.tsx +1 -3
  215. package/src/pages/Version/DetailSidebar/Repository/Repository.tsx +1 -3
  216. package/src/pages/Version/Version.test.tsx +3 -5
  217. package/src/pages/Version/Version.tsx +21 -6
  218. package/src/pages/Version/VersionContextProvider.tsx +14 -45
  219. package/src/pages/Version/VersionLayout.tsx +1 -1
  220. package/src/pages/Version/context.ts +1 -1
  221. package/src/pages/home/Home.tsx +9 -28
  222. package/src/pages/home/PackageList/Help/Help.test.tsx +0 -1
  223. package/src/pages/home/PackageList/Help/Help.tsx +0 -1
  224. package/src/pages/home/PackageList/Help/__snapshots__/Help.test.tsx.snap +298 -59
  225. package/src/pages/home/PackageList/Help/styles.ts +0 -1
  226. package/src/pages/home/PackageList/Package/Package.test.tsx +5 -4
  227. package/src/pages/home/PackageList/Package/Package.tsx +20 -28
  228. package/src/pages/home/PackageList/Package/Tag/Tag.test.tsx +0 -1
  229. package/src/pages/home/PackageList/Package/styles.ts +5 -6
  230. package/src/pages/home/PackageList/PackageList.tsx +17 -17
  231. package/src/pages/home/PackageList/Packagelist.test.tsx +6 -5
  232. package/src/providers/API/api.test.ts +1 -0
  233. package/src/providers/API/api.ts +7 -3
  234. package/src/providers/config/AppConfigurationProvider.tsx +3 -3
  235. package/src/store/index.ts +1 -0
  236. package/src/store/models/configuration.ts +41 -0
  237. package/src/store/models/download.ts +30 -0
  238. package/src/store/models/index.ts +18 -0
  239. package/src/store/models/login.ts +92 -0
  240. package/src/store/models/manifest.ts +91 -0
  241. package/src/store/models/packages.ts +36 -0
  242. package/src/store/models/search.ts +81 -0
  243. package/src/store/store.ts +15 -0
  244. package/src/utils/login.test.ts +3 -4
  245. package/src/utils/package.test.ts +2 -3
  246. package/src/utils/package.ts +2 -1
  247. package/src/utils/sec-utils.ts +1 -1
  248. package/src/utils/test-react-testing-library.tsx +22 -5
  249. package/src/utils/url.test.ts +1 -1
  250. package/src/utils/url.ts +1 -0
  251. package/static/Dependencies.15768a14646212b71166.js +2 -0
  252. package/static/Dependencies.15768a14646212b71166.js.LICENSE.txt +78 -0
  253. package/static/Dist.15768a14646212b71166.js +2 -0
  254. package/static/Dist.15768a14646212b71166.js.LICENSE.txt +60 -0
  255. package/static/Engines.15768a14646212b71166.js +2 -0
  256. package/static/Engines.15768a14646212b71166.js.LICENSE.txt +66 -0
  257. package/static/Home.15768a14646212b71166.js +2 -0
  258. package/static/Home.15768a14646212b71166.js.LICENSE.txt +222 -0
  259. package/static/Install.15768a14646212b71166.js +2 -0
  260. package/static/Install.15768a14646212b71166.js.LICENSE.txt +66 -0
  261. package/static/NotFound.15768a14646212b71166.js +2 -0
  262. package/static/NotFound.15768a14646212b71166.js.LICENSE.txt +40 -0
  263. package/static/Provider.15768a14646212b71166.js +2 -0
  264. package/static/Provider.15768a14646212b71166.js.LICENSE.txt +32 -0
  265. package/static/Repository.15768a14646212b71166.js +2 -0
  266. package/static/Repository.15768a14646212b71166.js.LICENSE.txt +50 -0
  267. package/static/UpLinks.15768a14646212b71166.js +2 -0
  268. package/static/UpLinks.15768a14646212b71166.js.LICENSE.txt +56 -0
  269. package/static/Version.15768a14646212b71166.js +2 -0
  270. package/static/Version.15768a14646212b71166.js.LICENSE.txt +380 -0
  271. package/static/Versions.15768a14646212b71166.js +2 -0
  272. package/static/Versions.15768a14646212b71166.js.LICENSE.txt +64 -0
  273. package/static/index.html +1 -1
  274. package/static/main.15768a14646212b71166.js +2 -0
  275. package/static/main.15768a14646212b71166.js.LICENSE.txt +972 -0
  276. package/static/manifest.json +17 -3
  277. package/static/runtime.15768a14646212b71166.js +2 -0
  278. package/static/{runtime.9525ddaaf85378590c63.js.LICENSE.txt → runtime.15768a14646212b71166.js.LICENSE.txt} +2 -2
  279. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js +2 -0
  280. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js.LICENSE.txt +148 -0
  281. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js +2 -0
  282. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js.LICENSE.txt +218 -0
  283. package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js +2 -0
  284. package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js.LICENSE.txt +316 -0
  285. package/static/vendors.15768a14646212b71166.js +103 -0
  286. package/static/vendors.15768a14646212b71166.js.LICENSE.txt +3158 -0
  287. package/tools/dev.server.js +0 -1
  288. package/tools/webpack.dev.config.babel.js +1 -3
  289. package/tools/webpack.prod.config.babel.js +1 -1
  290. package/tsconfig.json +1 -3
  291. package/types/index.ts +3 -20
  292. package/i18n/config.ts +0 -94
  293. package/src/App/AppContext.ts +0 -18
  294. package/src/App/AppContextProvider.tsx +0 -44
  295. package/src/App/Header/Search/SearchAdornment.tsx +0 -18
  296. package/src/components/Icons/Austria.tsx +0 -23
  297. package/src/components/Icons/Brazil.tsx +0 -44
  298. package/src/components/Icons/China.tsx +0 -33
  299. package/src/components/Icons/Czech.tsx +0 -21
  300. package/src/components/Icons/France.tsx +0 -27
  301. package/src/components/Icons/Germany.tsx +0 -27
  302. package/src/components/Icons/India.tsx +0 -44
  303. package/src/components/Icons/Japan.tsx +0 -23
  304. package/src/components/Icons/Khmer.tsx +0 -40
  305. package/src/components/Icons/Nicaragua.tsx +0 -66
  306. package/src/components/Icons/Russia.tsx +0 -27
  307. package/src/components/Icons/Spain.tsx +0 -43
  308. package/src/components/Icons/Taiwan.tsx +0 -25
  309. package/src/components/Icons/Turkey.tsx +0 -23
  310. package/src/components/Icons/Ukraine.tsx +0 -30
  311. package/src/components/Icons/Usa.tsx +0 -34
  312. package/src/design-tokens/emotion.ts +0 -5
  313. package/src/lib/constants.ts +0 -9
  314. package/src/pages/Version/DetailSidebar/ActionBar/ActionBar.test.tsx +0 -84
  315. package/src/pages/Version/DetailSidebar/ActionBar/__snapshots__/ActionBar.test.tsx.snap +0 -122
  316. package/src/pages/Version/is-package-version-valid.ts +0 -19
  317. package/src/providers/API/APIProvider.tsx +0 -109
  318. package/src/providers/API/index.ts +0 -1
  319. package/static/main.9525ddaaf85378590c63.js +0 -2
  320. package/static/main.9525ddaaf85378590c63.js.LICENSE.txt +0 -1588
  321. package/static/runtime.9525ddaaf85378590c63.js +0 -2
  322. package/static/vendors.9525ddaaf85378590c63.js +0 -2
  323. package/static/vendors.9525ddaaf85378590c63.js.LICENSE.txt +0 -4540
@@ -1,80 +1,77 @@
1
1
  import React from 'react';
2
2
  import { BrowserRouter as Router } from 'react-router-dom';
3
-
4
3
  import {
5
- render,
4
+ cleanup,
6
5
  fireEvent,
7
- waitFor,
6
+ renderWithStore,
8
7
  screen,
8
+ waitFor,
9
9
  waitForElementToBeRemoved,
10
10
  } from 'verdaccio-ui/utils/test-react-testing-library';
11
11
 
12
- import translationEN from '../../../i18n/translations/en-US.json';
13
- import { AppContextProvider } from '../../App';
14
-
12
+ import translationEN from '../../i18n/crowdin/ui.json';
13
+ import { store } from '../../store';
15
14
  import Header from './Header';
16
15
 
17
- const props = {
18
- user: {
19
- username: 'verddacio-user',
20
- },
21
- packages: [],
22
- };
23
-
24
16
  /* eslint-disable react/jsx-no-bind*/
25
17
  describe('<Header /> component with logged in state', () => {
18
+ afterEach(cleanup);
19
+
26
20
  test('should load the component in logged out state', () => {
27
- render(
21
+ renderWithStore(
28
22
  <Router>
29
- <AppContextProvider>
30
- <Header />
31
- </AppContextProvider>
32
- </Router>
23
+ <Header />
24
+ </Router>,
25
+ store
33
26
  );
34
27
 
35
- expect(screen.queryByTestId('header--menu-accountcircle')).toBeNull();
28
+ expect(screen.queryByTestId('logInDialogIcon')).toBeNull();
36
29
  expect(screen.getByText('Login')).toBeTruthy();
37
30
  expect(screen.queryByTestId('header--button-login')).toBeInTheDocument();
38
31
  });
39
32
 
40
- test('should load the component in logged in state', () => {
41
- const { getByTestId, queryByText } = render(
33
+ test('should load the component in logged in state', async () => {
34
+ renderWithStore(
42
35
  <Router>
43
- <AppContextProvider user={props.user}>
44
- <Header />
45
- </AppContextProvider>
46
- </Router>
36
+ <Header />
37
+ </Router>,
38
+ store
47
39
  );
40
+ store.dispatch.login.logInUser({ username: 'store', token: '12345' });
48
41
 
49
- expect(getByTestId('header--menu-accountcircle')).toBeTruthy();
50
- expect(queryByText('Login')).toBeNull();
42
+ await waitFor(() => {
43
+ expect(screen.getByTestId('logInDialogIcon')).toBeTruthy();
44
+ expect(screen.queryByText('Login')).toBeNull();
45
+ });
51
46
  });
52
47
 
53
48
  test('should open login dialog', async () => {
54
- const { getByTestId } = render(
49
+ renderWithStore(
55
50
  <Router>
56
- <AppContextProvider>
57
- <Header />
58
- </AppContextProvider>
59
- </Router>
51
+ <Header />
52
+ </Router>,
53
+ store
60
54
  );
61
55
 
62
- const loginBtn = getByTestId('header--button-login');
56
+ store.dispatch.login.logOutUser();
57
+
58
+ const loginBtn = screen.getByTestId('header--button-login');
63
59
  fireEvent.click(loginBtn);
64
- const loginDialog = await waitFor(() => getByTestId('login--dialog'));
60
+ const loginDialog = await waitFor(() => screen.getByTestId('login--dialog'));
65
61
  expect(loginDialog).toBeTruthy();
66
62
  });
67
63
 
68
64
  test('should logout the user', async () => {
69
- const { getByText, getByTestId } = render(
65
+ const { getByText, getByTestId } = renderWithStore(
70
66
  <Router>
71
- <AppContextProvider user={props.user}>
72
- <Header />
73
- </AppContextProvider>
74
- </Router>
67
+ <Header />
68
+ </Router>,
69
+ store
75
70
  );
76
71
 
77
- const headerMenuAccountCircle = getByTestId('header--menu-accountcircle');
72
+ store.dispatch.login.logInUser({ username: 'store', token: '12345' });
73
+
74
+ const headerMenuAccountCircle = getByTestId('logInDialogIcon');
78
75
  fireEvent.click(headerMenuAccountCircle);
79
76
 
80
77
  // wait for button Logout's appearance and return the element
@@ -84,12 +81,11 @@ describe('<Header /> component with logged in state', () => {
84
81
  });
85
82
 
86
83
  test("The question icon should open a new tab of verdaccio's website - installation doc", () => {
87
- const { getByTestId } = render(
84
+ const { getByTestId } = renderWithStore(
88
85
  <Router>
89
- <AppContextProvider user={props.user}>
90
- <Header />
91
- </AppContextProvider>
92
- </Router>
86
+ <Header />
87
+ </Router>,
88
+ store
93
89
  );
94
90
 
95
91
  const documentationBtn = getByTestId('header--tooltip-documentation');
@@ -99,12 +95,11 @@ describe('<Header /> component with logged in state', () => {
99
95
  });
100
96
 
101
97
  test('should open the registrationInfo modal when clicking on the info icon', async () => {
102
- const { getByTestId } = render(
98
+ const { getByTestId } = renderWithStore(
103
99
  <Router>
104
- <AppContextProvider user={props.user}>
105
- <Header />
106
- </AppContextProvider>
107
- </Router>
100
+ <Header />
101
+ </Router>,
102
+ store
108
103
  );
109
104
 
110
105
  const infoBtn = getByTestId('header--tooltip-info');
@@ -116,12 +111,11 @@ describe('<Header /> component with logged in state', () => {
116
111
  });
117
112
 
118
113
  test('should close the registrationInfo modal when clicking on the button close', async () => {
119
- const { getByTestId, getByText, queryByTestId } = render(
114
+ const { getByTestId, getByText, queryByTestId } = renderWithStore(
120
115
  <Router>
121
- <AppContextProvider user={props.user}>
122
- <Header />
123
- </AppContextProvider>
124
- </Router>
116
+ <Header />
117
+ </Router>,
118
+ store
125
119
  );
126
120
 
127
121
  const infoBtn = getByTestId('header--tooltip-info');
@@ -138,17 +132,15 @@ describe('<Header /> component with logged in state', () => {
138
132
  });
139
133
 
140
134
  test('should hide login if is disabled', () => {
141
- // @ts-expect-error
142
135
  window.__VERDACCIO_BASENAME_UI_OPTIONS = {
143
136
  base: 'foo',
144
137
  login: false,
145
138
  };
146
- render(
139
+ renderWithStore(
147
140
  <Router>
148
- <AppContextProvider user={props.user}>
149
- <Header />
150
- </AppContextProvider>
151
- </Router>
141
+ <Header />
142
+ </Router>,
143
+ store
152
144
  );
153
145
 
154
146
  expect(screen.queryByTestId('header--button-login')).not.toBeInTheDocument();
@@ -1,18 +1,16 @@
1
- import React, { useState, useContext } from 'react';
1
+ import React, { useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
-
3
+ import { useDispatch, useSelector } from 'react-redux';
4
4
  import Button from 'verdaccio-ui/components/Button';
5
5
  import { useConfig } from 'verdaccio-ui/providers/config';
6
- import storage from 'verdaccio-ui/utils/storage';
7
-
8
- import AppContext from '../../App/AppContext';
9
6
 
7
+ import { Dispatch, RootState } from '../../store/store';
10
8
  import HeaderInfoDialog from './HeaderInfoDialog';
11
9
  import HeaderLeft from './HeaderLeft';
12
10
  import HeaderRight from './HeaderRight';
13
11
  import LoginDialog from './LoginDialog';
14
12
  import Search from './Search';
15
- import { NavBar, InnerNavBar, MobileNavBar, InnerMobileNavBar } from './styles';
13
+ import { InnerMobileNavBar, InnerNavBar, MobileNavBar, NavBar } from './styles';
16
14
 
17
15
  interface Props {
18
16
  withoutSearch?: boolean;
@@ -21,26 +19,15 @@ interface Props {
21
19
  /* eslint-disable react/jsx-no-bind*/
22
20
  const Header: React.FC<Props> = ({ withoutSearch }) => {
23
21
  const { t } = useTranslation();
24
- const appContext = useContext(AppContext);
25
22
  const [isInfoDialogOpen, setOpenInfoDialog] = useState<boolean>(false);
26
23
  const [showMobileNavBar, setShowMobileNavBar] = useState<boolean>(false);
27
24
  const [showLoginModal, setShowLoginModal] = useState<boolean>(false);
28
-
29
- if (!appContext) {
30
- throw Error(t('app-context-not-correct-used'));
31
- }
32
-
33
- const { user, scope, setUser } = appContext;
25
+ const loginStore = useSelector((state: RootState) => state.login);
26
+ const configStore = useSelector((state: RootState) => state.configuration.config);
34
27
  const { configOptions } = useConfig();
35
-
36
- /**
37
- * Logouts user
38
- * Required by: <Header />
39
- */
28
+ const dispatch = useDispatch<Dispatch>();
40
29
  const handleLogout = () => {
41
- storage.removeItem('username');
42
- storage.removeItem('token');
43
- setUser(undefined);
30
+ dispatch.login.logOutUser();
44
31
  };
45
32
 
46
33
  return (
@@ -54,7 +41,7 @@ const Header: React.FC<Props> = ({ withoutSearch }) => {
54
41
  onOpenRegistryInfoDialog={() => setOpenInfoDialog(true)}
55
42
  onToggleLogin={() => setShowLoginModal(!showLoginModal)}
56
43
  onToggleMobileNav={() => setShowMobileNavBar(!showMobileNavBar)}
57
- username={user?.username}
44
+ username={loginStore?.username}
58
45
  withoutSearch={withoutSearch}
59
46
  />
60
47
  </InnerNavBar>
@@ -62,7 +49,7 @@ const Header: React.FC<Props> = ({ withoutSearch }) => {
62
49
  isOpen={isInfoDialogOpen}
63
50
  onCloseDialog={() => setOpenInfoDialog(false)}
64
51
  registryUrl={configOptions.base}
65
- scope={scope}
52
+ scope={configStore.scope}
66
53
  />
67
54
  </NavBar>
68
55
  {showMobileNavBar && !withoutSearch && (
@@ -75,7 +62,9 @@ const Header: React.FC<Props> = ({ withoutSearch }) => {
75
62
  </Button>
76
63
  </MobileNavBar>
77
64
  )}
78
- {!user && <LoginDialog onClose={() => setShowLoginModal(false)} open={showLoginModal} />}
65
+ {!loginStore.username && (
66
+ <LoginDialog onClose={() => setShowLoginModal(false)} open={showLoginModal} />
67
+ )}
79
68
  </>
80
69
  );
81
70
  };
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
-
4
3
  import Label from 'verdaccio-ui/components/Label';
5
4
 
6
5
  import { Greetings } from './styles';
@@ -1,7 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import React from 'react';
3
3
  import { Link } from 'react-router-dom';
4
-
5
4
  import Logo from 'verdaccio-ui/components/Logo';
6
5
 
7
6
  import Search from './Search';
@@ -1,7 +1,6 @@
1
- import AccountCircle from '@material-ui/icons/AccountCircle';
1
+ import AccountCircle from '@mui/icons-material/AccountCircle';
2
2
  import React, { MouseEvent } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
-
5
4
  import IconButton from 'verdaccio-ui/components/IconButton';
6
5
  import Menu from 'verdaccio-ui/components/Menu';
7
6
  import MenuItem from 'verdaccio-ui/components/MenuItem';
@@ -30,9 +29,10 @@ const HeaderMenu: React.FC<Props> = ({
30
29
  <>
31
30
  <IconButton
32
31
  color="inherit"
33
- data-testid="header--menu-accountcircle"
32
+ data-testid="logInDialogIcon"
34
33
  id="header--button-account"
35
- onClick={onLoggedInMenu}>
34
+ onClick={onLoggedInMenu}
35
+ size="large">
36
36
  <AccountCircle />
37
37
  </IconButton>
38
38
  <Menu
@@ -52,8 +52,8 @@ const HeaderMenu: React.FC<Props> = ({
52
52
  </MenuItem>
53
53
  <MenuItem
54
54
  button={true}
55
- data-testid="header--button-logout"
56
- id="header--button-logout"
55
+ data-testid="logOutDialogIcon"
56
+ id="logOutDialogIcon"
57
57
  onClick={onLogout}>
58
58
  {t('button.logout')}
59
59
  </MenuItem>
@@ -1,6 +1,5 @@
1
- import React, { useState, useEffect, useContext, MouseEvent } from 'react';
1
+ import React, { MouseEvent, useContext, useEffect, useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
-
4
3
  import Button from 'verdaccio-ui/components/Button';
5
4
  import ThemeContext from 'verdaccio-ui/design-tokens/ThemeContext';
6
5
 
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
-
3
2
  import Tooltip from 'verdaccio-ui/components/Tooltip';
4
3
 
5
4
  import HeaderToolTipIcon, { TooltipIconType } from './HeaderToolTipIcon';
@@ -1,10 +1,9 @@
1
- import Help from '@material-ui/icons/Help';
2
- import Info from '@material-ui/icons/Info';
3
- import NightsStay from '@material-ui/icons/NightsStay';
4
- import Search from '@material-ui/icons/Search';
5
- import WbSunny from '@material-ui/icons/WbSunny';
1
+ import Help from '@mui/icons-material/Help';
2
+ import Info from '@mui/icons-material/Info';
3
+ import NightsStay from '@mui/icons-material/NightsStay';
4
+ import Search from '@mui/icons-material/Search';
5
+ import WbSunny from '@mui/icons-material/WbSunny';
6
6
  import React, { forwardRef } from 'react';
7
-
8
7
  import IconButton from 'verdaccio-ui/components/IconButton';
9
8
 
10
9
  import { IconSearchButton, StyledLink } from './styles';
@@ -30,7 +29,7 @@ const HeaderToolTipIcon = forwardRef<HeaderToolTipIconRef, Props>(function Heade
30
29
  data-testid={'header--tooltip-documentation'}
31
30
  external={true}
32
31
  to={'https://verdaccio.org/docs/en/installation'}>
33
- <IconButton color={'inherit'}>
32
+ <IconButton color={'inherit'} size="large">
34
33
  <Help />
35
34
  </IconButton>
36
35
  </StyledLink>
@@ -42,7 +41,8 @@ const HeaderToolTipIcon = forwardRef<HeaderToolTipIconRef, Props>(function Heade
42
41
  data-testid={'header--tooltip-info'}
43
42
  id="header--button-registryInfo"
44
43
  onClick={onClick}
45
- ref={ref}>
44
+ ref={ref}
45
+ size="large">
46
46
  <Info />
47
47
  </IconButton>
48
48
  );
@@ -55,7 +55,7 @@ const HeaderToolTipIcon = forwardRef<HeaderToolTipIconRef, Props>(function Heade
55
55
  case 'dark-mode':
56
56
  // todo(Priscila): Add Zoom transition effect
57
57
  return (
58
- <IconButton color="inherit" onClick={onClick} ref={ref}>
58
+ <IconButton color="inherit" onClick={onClick} ref={ref} size="large">
59
59
  <NightsStay />
60
60
  </IconButton>
61
61
  );
@@ -63,7 +63,7 @@ const HeaderToolTipIcon = forwardRef<HeaderToolTipIconRef, Props>(function Heade
63
63
  case 'light-mode':
64
64
  // todo(Priscila): Add Zoom transition effect
65
65
  return (
66
- <IconButton color="inherit" onClick={onClick} ref={ref}>
66
+ <IconButton color="inherit" onClick={onClick} ref={ref} size="large">
67
67
  <WbSunny />
68
68
  </IconButton>
69
69
  );
@@ -1,86 +1,24 @@
1
+ /* eslint-disable react/jsx-pascal-case */
1
2
  import styled from '@emotion/styled';
2
- import { withStyles } from '@material-ui/core/styles';
3
- import LanguageIcon from '@material-ui/icons/Language';
4
- import i18next, { TFunctionKeys } from 'i18next';
5
- import React, { useCallback, useContext, useState, useMemo } from 'react';
3
+ import LanguageIcon from '@mui/icons-material/Language';
4
+ import withStyles from '@mui/styles/withStyles';
5
+ import i18next from 'i18next';
6
+ import React, { useCallback, useContext, useMemo, useState } from 'react';
6
7
  import { useTranslation } from 'react-i18next';
7
-
8
8
  import { AutoComplete } from 'verdaccio-ui/components/AutoComplete/AutoCompleteV2';
9
- import {
10
- France,
11
- Brazil,
12
- Germany,
13
- Spain,
14
- China,
15
- Russia,
16
- Turkey,
17
- Ukraine,
18
- Khmer,
19
- Japan,
20
- Usa,
21
- Czech,
22
- Taiwan,
23
- } from 'verdaccio-ui/components/Icons';
24
9
  import MenuItem from 'verdaccio-ui/components/MenuItem';
25
- import { Theme } from 'verdaccio-ui/design-tokens/theme';
26
10
  import ThemeContext from 'verdaccio-ui/design-tokens/ThemeContext';
11
+ import { Theme } from 'verdaccio-ui/design-tokens/theme';
27
12
 
28
- import { Language } from '../../../i18n/config';
13
+ import { Language, listLanguages } from '../../i18n/enabledLanguages';
29
14
 
30
- const lngDetails: Record<Language, { translation: TFunctionKeys; icon: React.ReactElement }> = {
31
- 'fr-FR': {
32
- translation: 'lng.french',
33
- icon: <France size="md" />,
34
- },
35
- 'pt-BR': {
36
- translation: 'lng.portuguese',
37
- icon: <Brazil size="md" />,
38
- },
39
- 'de-DE': {
40
- translation: 'lng.german',
41
- icon: <Germany size="md" />,
42
- },
43
- 'es-ES': {
44
- translation: 'lng.spanish',
45
- icon: <Spain size="md" />,
46
- },
47
- 'zh-CN': {
48
- translation: 'lng.chinese',
49
- icon: <China size="md" />,
50
- },
51
- 'ru-RU': {
52
- translation: 'lng.russian',
53
- icon: <Russia size="md" />,
54
- },
55
- 'tr-TR': {
56
- translation: 'lng.turkish',
57
- icon: <Turkey size="md" />,
58
- },
59
- 'uk-UA': {
60
- translation: 'lng.ukraine',
61
- icon: <Ukraine size="md" />,
62
- },
63
- 'km-KH': {
64
- translation: 'lng.khmer',
65
- icon: <Khmer size="md" />,
66
- },
67
- 'ja-JP': {
68
- translation: 'lng.japanese',
69
- icon: <Japan size="md" />,
70
- },
71
- 'en-US': {
72
- translation: 'lng.english',
73
- icon: <Usa size="md" />,
74
- },
75
- 'cs-CZ': {
76
- translation: 'lng.czech',
77
- icon: <Czech size="md" />,
78
- },
79
- 'zh-TW': {
80
- translation: 'lng.chineseTraditional',
81
- icon: <Taiwan size="md" />,
82
- },
83
- };
15
+ const listConverted = listLanguages.reduce((prev, item) => {
16
+ prev[item.lng] = {
17
+ translation: item.menuKey,
18
+ icon: item.icon,
19
+ };
20
+ return prev;
21
+ }, {});
84
22
 
85
23
  const LanguageSwitch = () => {
86
24
  const themeContext = useContext(ThemeContext);
@@ -104,10 +42,10 @@ const LanguageSwitch = () => {
104
42
 
105
43
  const getCurrentLngDetails = useCallback(
106
44
  (language: Language) => {
107
- const { icon, translation } = lngDetails[language] || lngDetails['en-US'];
45
+ const lng = listConverted[language] || listConverted['en-US'];
108
46
  return {
109
- icon,
110
- translation: t(translation),
47
+ icon: <lng.icon />,
48
+ translation: t(lng.translation),
111
49
  };
112
50
  },
113
51
  [t]
@@ -1,24 +1,17 @@
1
1
  import React from 'react';
2
-
3
2
  import api from 'verdaccio-ui/providers/API/api';
4
3
  import {
5
- render,
6
- waitFor,
7
- fireEvent,
4
+ act,
8
5
  cleanup,
6
+ fireEvent,
7
+ renderWithStore,
9
8
  screen,
10
- act,
9
+ waitFor,
11
10
  } from 'verdaccio-ui/utils/test-react-testing-library';
12
11
 
13
- import AppContext, { AppContextProps } from '../../AppContext';
14
-
12
+ import { store } from '../../../store';
15
13
  import LoginDialog from './LoginDialog';
16
14
 
17
- const appContextValue: AppContextProps = {
18
- scope: '',
19
- setUser: jest.fn(),
20
- };
21
-
22
15
  describe('<LoginDialog /> component', () => {
23
16
  beforeEach(() => {
24
17
  jest.resetModules();
@@ -30,11 +23,7 @@ describe('<LoginDialog /> component', () => {
30
23
  const props = {
31
24
  onClose: jest.fn(),
32
25
  };
33
- const { container } = render(
34
- <AppContext.Provider value={appContextValue}>
35
- <LoginDialog onClose={props.onClose} />
36
- </AppContext.Provider>
37
- );
26
+ const { container } = renderWithStore(<LoginDialog onClose={props.onClose} />, store);
38
27
  expect(container.firstChild).toMatchSnapshot();
39
28
  });
40
29
 
@@ -44,10 +33,9 @@ describe('<LoginDialog /> component', () => {
44
33
  onClose: jest.fn(),
45
34
  };
46
35
 
47
- const { getByTestId } = render(
48
- <AppContext.Provider value={appContextValue}>
49
- <LoginDialog onClose={props.onClose} open={props.open} />
50
- </AppContext.Provider>
36
+ const { getByTestId } = renderWithStore(
37
+ <LoginDialog onClose={props.onClose} open={props.open} />,
38
+ store
51
39
  );
52
40
 
53
41
  const loginDialogHeading = await waitFor(() => getByTestId('login-dialog-form-login-button'));
@@ -60,18 +48,18 @@ describe('<LoginDialog /> component', () => {
60
48
  onClose: jest.fn(),
61
49
  };
62
50
 
63
- const { getByTestId } = render(
64
- <AppContext.Provider value={appContextValue}>
65
- <LoginDialog onClose={props.onClose} open={props.open} />
66
- </AppContext.Provider>
51
+ const { getByTestId } = renderWithStore(
52
+ <LoginDialog onClose={props.onClose} open={props.open} />,
53
+ store
67
54
  );
68
55
 
69
56
  const loginDialogButton = await waitFor(() => getByTestId('close-login-dialog-button'));
70
57
  expect(loginDialogButton).toBeTruthy();
71
58
 
72
- act(() => {
59
+ await act(() => {
73
60
  fireEvent.click(loginDialogButton, { open: false });
74
61
  });
62
+
75
63
  expect(props.onClose).toHaveBeenCalled();
76
64
  });
77
65
 
@@ -88,11 +76,9 @@ describe('<LoginDialog /> component', () => {
88
76
  })
89
77
  );
90
78
 
91
- render(
92
- <AppContext.Provider value={appContextValue}>
93
- <LoginDialog onClose={props.onClose} open={props.open} />
94
- </AppContext.Provider>
95
- );
79
+ await act(async () => {
80
+ renderWithStore(<LoginDialog onClose={props.onClose} open={props.open} />, store);
81
+ });
96
82
 
97
83
  const userNameInput = screen.getByPlaceholderText('Your username');
98
84
  expect(userNameInput).toBeInTheDocument();
@@ -104,13 +90,17 @@ describe('<LoginDialog /> component', () => {
104
90
  const passwordInput = screen.getByPlaceholderText('Your strong password');
105
91
  expect(userNameInput).toBeInTheDocument();
106
92
  fireEvent.focus(passwordInput);
107
- fireEvent.change(passwordInput, { target: { value: '1234' } });
108
93
 
109
- act(async () => {
110
- const signInButton = await screen.getByTestId('login-dialog-form-login-button');
111
- expect(signInButton).not.toBeDisabled();
94
+ await act(async () => {
95
+ fireEvent.change(passwordInput, { target: { value: '1234' } });
96
+ });
97
+ const signInButton = screen.getByTestId('login-dialog-form-login-button');
98
+ expect(signInButton).not.toBeDisabled();
99
+
100
+ await act(async () => {
112
101
  fireEvent.click(signInButton);
113
102
  });
103
+ expect(props.onClose).toHaveBeenCalledTimes(1);
114
104
  });
115
105
 
116
106
  test.todo('validateCredentials: should validate credentials');