@ebubekirylmaz/link-test 1.0.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.
- package/.babelrc +3 -0
- package/.browserslistrc +1 -0
- package/.env +2 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +58 -0
- package/.gitattributes +1 -0
- package/.github/workflows/publish.yml +66 -0
- package/.prettierignore +1 -0
- package/.prettierrc +10 -0
- package/.storybook/main.js +15 -0
- package/.storybook/preview.js +17 -0
- package/.storybook/vitest.setup.js +6 -0
- package/README.md +1 -0
- package/cypress.config.js +11 -0
- package/index.js +1 -0
- package/package.json +111 -0
- package/project/.eslintrc.cjs +22 -0
- package/project/config.js +18 -0
- package/project/config.menu.js +39 -0
- package/project/config.template.js +31 -0
- package/project/cypress/e2e/layouts.cy.js +170 -0
- package/project/cypress/e2e/login.cy.js +35 -0
- package/project/cypress/e2e/selectbar.cy.js +80 -0
- package/project/cypress/fixtures/CONFIG/MENU_CONFIG.js +39 -0
- package/project/cypress/fixtures/EMPEROR/EMPERORS_GET.json +51 -0
- package/project/cypress/fixtures/EMPEROR/EMPERORS_POST.json +9 -0
- package/project/cypress/fixtures/OAUTH/GITHUB/user.json +46 -0
- package/project/cypress/fixtures/example.json +5 -0
- package/project/cypress/support/commands.js +104 -0
- package/project/cypress/support/e2e.js +1 -0
- package/project/cypress.config.js +10 -0
- package/project/index.html +12 -0
- package/project/media/ProjectIcons/3d.png +0 -0
- package/project/media/ProjectIcons/box.png +0 -0
- package/project/media/ProjectIcons/cafe.png +0 -0
- package/project/media/ProjectIcons/cargo.png +0 -0
- package/project/media/ProjectIcons/cloud.png +0 -0
- package/project/media/ProjectIcons/code.png +0 -0
- package/project/media/ProjectIcons/company.png +0 -0
- package/project/media/ProjectIcons/conversation.png +0 -0
- package/project/media/ProjectIcons/distributed.png +0 -0
- package/project/media/ProjectIcons/fingerprint.png +0 -0
- package/project/media/ProjectIcons/forest.png +0 -0
- package/project/media/ProjectIcons/headphones.png +0 -0
- package/project/media/ProjectIcons/office.png +0 -0
- package/project/media/ProjectIcons/path.png +0 -0
- package/project/media/ProjectIcons/printer.png +0 -0
- package/project/media/ProjectIcons/project.png +0 -0
- package/project/media/ProjectIcons/resume.png +0 -0
- package/project/media/ProjectIcons/rocket.png +0 -0
- package/project/media/ProjectIcons/rtruck.png +0 -0
- package/project/media/ProjectIcons/sign.png +0 -0
- package/project/media/ProjectIcons/site.png +0 -0
- package/project/media/ProjectIcons/truck.png +0 -0
- package/project/media/logo.png +0 -0
- package/project/package-lock.json +22434 -0
- package/project/package.json +42 -0
- package/project/public/assets/background/overlay_2.jpg +0 -0
- package/project/public/assets/illustrations/illustration_dashboard.png +0 -0
- package/project/public/media/largeLogo.png +0 -0
- package/project/public/media/logo.png +0 -0
- package/project/public/vite.svg +1 -0
- package/project/routes.jsx +47 -0
- package/project/server/mock.json +110 -0
- package/project/server/oauthMock.js +27 -0
- package/project/server/package-lock.json +1505 -0
- package/project/server/package.json +20 -0
- package/project/server/server.js +127 -0
- package/project/src/Container.jsx +7 -0
- package/project/src/components/ActionButton.jsx +18 -0
- package/project/src/hooks/useEmperor.jsx +21 -0
- package/project/src/http/index.js +39 -0
- package/project/src/main.jsx +10 -0
- package/project/src/pages/Battles.jsx +16 -0
- package/project/src/pages/Emperor.jsx +50 -0
- package/project/src/pages/index.jsx +33 -0
- package/project/src/theme.js +151 -0
- package/project/src/widgets/ActionButton.jsx +68 -0
- package/project/src/widgets/AddNewEmperor.jsx +120 -0
- package/project/src/widgets/ProjectContainer.jsx +27 -0
- package/project/vite.config.js +6 -0
- package/project/vite.config.js.timestamp-1709564450418-45fdd27900806.mjs +341 -0
- package/public/assets/background/overlay_2.jpg +0 -0
- package/public/assets/illustrations/illustration_dashboard.png +0 -0
- package/public/vite.svg +1 -0
- package/src/ContextProvider/ContextProvider.jsx +19 -0
- package/src/GlobalSnackMessage/GlobalSnackMessage.jsx +45 -0
- package/src/GlobalSnackMessage/index.js +1 -0
- package/src/GlobalSnackMessage/styles.js +3 -0
- package/src/Platform.jsx +76 -0
- package/src/RouteManager/RouteManager.jsx +56 -0
- package/src/RouteManager/index.js +1 -0
- package/src/assets/illustrations/avatar-shape.jsx +31 -0
- package/src/assets/illustrations/background-shape.jsx +37 -0
- package/src/assets/illustrations/booking-illustration.jsx +335 -0
- package/src/assets/illustrations/check-in-illustration.jsx +96 -0
- package/src/assets/illustrations/check-out-illustration.jsx +69 -0
- package/src/assets/illustrations/coming-soon-illustration.jsx +125 -0
- package/src/assets/illustrations/forbidden-illustration.jsx +95 -0
- package/src/assets/illustrations/index.js +2 -0
- package/src/assets/illustrations/maintenance-illustration.jsx +228 -0
- package/src/assets/illustrations/motivation-illustration.jsx +74 -0
- package/src/assets/illustrations/order-complete-illustration.jsx +126 -0
- package/src/assets/illustrations/page-not-found-illustration.jsx +81 -0
- package/src/assets/illustrations/seo-illustration.jsx +244 -0
- package/src/assets/illustrations/sever-error-illustration.jsx +152 -0
- package/src/assets/illustrations/upgrade-storage-illustration.jsx +161 -0
- package/src/assets/illustrations/upload-illustration.jsx +622 -0
- package/src/components/Iconify/Iconify.jsx +18 -0
- package/src/components/Iconify/index.js +1 -0
- package/src/components/MiniTopBar/MiniTopBar.jsx +25 -0
- package/src/components/MiniTopBar/index.js +1 -0
- package/src/components/MiniTopBar/styles.js +6 -0
- package/src/components/NucleoidLoginForm/NucleoidLoginForm.jsx +69 -0
- package/src/components/NucleoidLoginForm/index.js +1 -0
- package/src/components/NucleoidLoginForm/styles.js +3 -0
- package/src/components/Sidebar/Sidebar.jsx +76 -0
- package/src/components/Sidebar/index.js +1 -0
- package/src/components/Sidebar/styles.js +25 -0
- package/src/components/SocialLoginButtons/SocialLoginButtons.jsx +55 -0
- package/src/components/SocialLoginButtons/index.js +1 -0
- package/src/components/SocialLoginButtons/styles.js +3 -0
- package/src/components/TopNavBar/TopNavBar.jsx +186 -0
- package/src/components/TopNavBar/index.js +1 -0
- package/src/components/TopNavBar/styles.js +7 -0
- package/src/components/animate/index.js +4 -0
- package/src/components/animate/motion-container.jsx +38 -0
- package/src/components/animate/motion-lazy.jsx +11 -0
- package/src/components/animate/motion-viewport.jsx +30 -0
- package/src/components/animate/variants/actions.js +4 -0
- package/src/components/animate/variants/background.js +97 -0
- package/src/components/animate/variants/bounce.js +107 -0
- package/src/components/animate/variants/container.js +20 -0
- package/src/components/animate/variants/fade.js +127 -0
- package/src/components/animate/variants/flip.js +54 -0
- package/src/components/animate/variants/index.js +12 -0
- package/src/components/animate/variants/path.js +12 -0
- package/src/components/animate/variants/rotate.js +33 -0
- package/src/components/animate/variants/scale.js +54 -0
- package/src/components/animate/variants/slide.js +65 -0
- package/src/components/animate/variants/transition.js +20 -0
- package/src/components/animate/variants/zoom.js +130 -0
- package/src/components/chart/chart.js +69 -0
- package/src/components/chart/index.js +5 -0
- package/src/components/chart/use-chart.js +215 -0
- package/src/components/custom-popover/custom-popover.jsx +46 -0
- package/src/components/custom-popover/index.js +3 -0
- package/src/components/custom-popover/styles.js +84 -0
- package/src/components/custom-popover/use-popover.js +22 -0
- package/src/components/custom-popover/utils.js +100 -0
- package/src/components/file-thumbnail/download-button.jsx +39 -0
- package/src/components/file-thumbnail/file-thumbnail.jsx +72 -0
- package/src/components/file-thumbnail/index.js +5 -0
- package/src/components/file-thumbnail/utils.js +148 -0
- package/src/components/image/image.jsx +119 -0
- package/src/components/image/index.js +1 -0
- package/src/components/image/utils.js +15 -0
- package/src/components/label/index.js +1 -0
- package/src/components/label/label.jsx +51 -0
- package/src/components/label/styles.js +78 -0
- package/src/components/loading-screen/index.js +2 -0
- package/src/components/loading-screen/loading-screen.jsx +23 -0
- package/src/components/loading-screen/splash-screen.jsx +95 -0
- package/src/components/logo/index.js +1 -0
- package/src/components/logo/logo.jsx +61 -0
- package/src/components/logo/styles.js +17 -0
- package/src/components/nav-section/horizontal/index.js +1 -0
- package/src/components/nav-section/horizontal/nav-item.jsx +224 -0
- package/src/components/nav-section/horizontal/nav-list.jsx +113 -0
- package/src/components/nav-section/horizontal/nav-section-horizontal.jsx +41 -0
- package/src/components/nav-section/index.js +3 -0
- package/src/components/nav-section/mini/index.js +1 -0
- package/src/components/nav-section/mini/nav-item.jsx +242 -0
- package/src/components/nav-section/mini/nav-list.jsx +107 -0
- package/src/components/nav-section/mini/nav-section-mini.jsx +35 -0
- package/src/components/nav-section/vertical/index.js +1 -0
- package/src/components/nav-section/vertical/nav-item.jsx +294 -0
- package/src/components/nav-section/vertical/nav-list.jsx +66 -0
- package/src/components/nav-section/vertical/nav-section-vertical.jsx +74 -0
- package/src/components/scrollbar/index.js +1 -0
- package/src/components/scrollbar/scrollbar.jsx +39 -0
- package/src/components/scrollbar/styles.js +27 -0
- package/src/components/search-not-found/index.js +1 -0
- package/src/components/search-not-found/search-not-found.jsx +29 -0
- package/src/components/settings/context/index.js +2 -0
- package/src/components/settings/context/settings-context.js +14 -0
- package/src/components/settings/context/settings-provider.jsx +46 -0
- package/src/components/settings/drawer/base-option.jsx +52 -0
- package/src/components/settings/drawer/fullscreen-option.jsx +58 -0
- package/src/components/settings/drawer/index.js +1 -0
- package/src/components/settings/drawer/layout-options.jsx +144 -0
- package/src/components/settings/drawer/presets-options.jsx +53 -0
- package/src/components/settings/drawer/settings-drawer.jsx +189 -0
- package/src/components/settings/drawer/stretch-options.jsx +67 -0
- package/src/components/settings/index.js +3 -0
- package/src/components/svg-color/index.js +1 -0
- package/src/components/svg-color/svg-color.jsx +23 -0
- package/src/config/config.js +48 -0
- package/src/config/schemas.js +148 -0
- package/src/context/reducer.js +52 -0
- package/src/global.css +2 -0
- package/src/hooks/index.js +2 -0
- package/src/hooks/use-boolean.js +27 -0
- package/src/hooks/use-event-listener.js +34 -0
- package/src/hooks/use-local-storage.js +89 -0
- package/src/hooks/use-off-set-top.js +37 -0
- package/src/hooks/use-responsive.js +47 -0
- package/src/hooks/use-scroll-to-top.js +14 -0
- package/src/hooks/use-user.js +58 -0
- package/src/hooks/useApi.js +25 -0
- package/src/hooks/useItemsState.js +23 -0
- package/src/hooks/useProjects.js +24 -0
- package/src/hooks/useSettings.jsx +51 -0
- package/src/http/index.js +155 -0
- package/src/http/oauth.js +27 -0
- package/src/http/user.js +110 -0
- package/src/layouts/AppLayout.jsx +113 -0
- package/src/layouts/CompactLayout/CompactLayout.jsx +32 -0
- package/src/layouts/CompactLayout/index.js +1 -0
- package/src/layouts/DashboardLayout/DashboardLayout.jsx +87 -0
- package/src/layouts/DashboardLayout/config-navigation.jsx +0 -0
- package/src/layouts/DashboardLayout/header.jsx +104 -0
- package/src/layouts/DashboardLayout/index.js +2 -0
- package/src/layouts/DashboardLayout/main.jsx +64 -0
- package/src/layouts/DashboardLayout/nav-horizontal.jsx +62 -0
- package/src/layouts/DashboardLayout/nav-mini.jsx +99 -0
- package/src/layouts/DashboardLayout/nav-vertical.jsx +201 -0
- package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +101 -0
- package/src/layouts/FullScreenLayout/index.js +1 -0
- package/src/layouts/FullScreenLayout/nav-horizontal.jsx +50 -0
- package/src/layouts/FullScreenLayout/nav-vertical.jsx +136 -0
- package/src/layouts/MainLayout/MainLayout.jsx +21 -0
- package/src/layouts/MainLayout/footer.jsx +153 -0
- package/src/layouts/MainLayout/header.jsx +81 -0
- package/src/layouts/MainLayout/index.js +1 -0
- package/src/layouts/MainLayout/nav/desktop/index.jsx +20 -0
- package/src/layouts/MainLayout/nav/desktop/nav-item.jsx +186 -0
- package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +145 -0
- package/src/layouts/MainLayout/nav/mobile/index.jsx +60 -0
- package/src/layouts/MainLayout/nav/mobile/nav-item.jsx +90 -0
- package/src/layouts/MainLayout/nav/mobile/nav-list.jsx +72 -0
- package/src/layouts/Page.jsx +16 -0
- package/src/layouts/SimpleLayout/SimpleLayout.jsx +8 -0
- package/src/layouts/SimpleLayout/index.js +1 -0
- package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +31 -0
- package/src/layouts/TwoSideLayout/index.js +1 -0
- package/src/layouts/auth/classic.jsx +95 -0
- package/src/layouts/auth/modern-compact.jsx +51 -0
- package/src/layouts/auth/modern.jsx +94 -0
- package/src/layouts/common/ProjectBar/index.jsx +325 -0
- package/src/layouts/common/ProjectBar/result-item.jsx +90 -0
- package/src/layouts/common/ProjectBar/utils.js +86 -0
- package/src/layouts/common/account-popover.jsx +116 -0
- package/src/layouts/common/header-shadow.jsx +26 -0
- package/src/layouts/common/header-sim.jsx +52 -0
- package/src/layouts/common/header-simple.jsx +76 -0
- package/src/layouts/common/nav-toggle-button.jsx +57 -0
- package/src/layouts/common/notifications-popover/index.jsx +177 -0
- package/src/layouts/common/notifications-popover/notification-item.jsx +252 -0
- package/src/layouts/common/settings-button.jsx +48 -0
- package/src/layouts/config-layout.js +12 -0
- package/src/layouts/index.js +7 -0
- package/src/lib/AddItemWizard/AddItemWizard.jsx +211 -0
- package/src/lib/AddItemWizard/index.js +1 -0
- package/src/lib/CustomBreadcrumbs/CustomBreadcrumbs.jsx +88 -0
- package/src/lib/CustomBreadcrumbs/index.js +1 -0
- package/src/lib/CustomBreadcrumbs/link-item.jsx +58 -0
- package/src/lib/CustomPopover/CustomPopover.jsx +46 -0
- package/src/lib/CustomPopover/index.js +3 -0
- package/src/lib/CustomPopover/styles.js +82 -0
- package/src/lib/CustomPopover/usePopover.js +20 -0
- package/src/lib/CustomPopover/utils.js +100 -0
- package/src/lib/Flow/connectors/DynamicConnector.jsx +247 -0
- package/src/lib/Flow/core/Flow.jsx +79 -0
- package/src/lib/Flow/core/FlowNode.jsx +68 -0
- package/src/lib/Flow/core/FlowViewport.jsx +259 -0
- package/src/lib/Flow/graph/FloatingGraph.jsx +44 -0
- package/src/lib/Flow/hooks/useGraphOperations.js +362 -0
- package/src/lib/Flow/hooks/useNodeStyle.js +56 -0
- package/src/lib/Flow/index.js +1 -0
- package/src/lib/Flow/layouts/ActionNode.jsx +78 -0
- package/src/lib/Flow/layouts/AnimatedNode.jsx +22 -0
- package/src/lib/Flow/layouts/CardLayout.jsx +397 -0
- package/src/lib/Flow/layouts/InfoNode.jsx +255 -0
- package/src/lib/Flow/layouts/LoadingNode.jsx +37 -0
- package/src/lib/Flow/nodes/DefaultCard.jsx +107 -0
- package/src/lib/Flow/nodes/DraggableNode.jsx +162 -0
- package/src/lib/Flow/nodes/FlowNodeView.jsx +214 -0
- package/src/lib/Flow/selection/SelectionContext.jsx +259 -0
- package/src/lib/Flow/selection/SelectionOverlay.jsx +31 -0
- package/src/lib/Flow/styles.js +154 -0
- package/src/lib/Flow/utils/flowUtils.js +268 -0
- package/src/lib/FormProvider/FormProvider.jsx +16 -0
- package/src/lib/FormProvider/index.js +1 -0
- package/src/lib/IconSelector/IconSelector.jsx +89 -0
- package/src/lib/Iconify/Iconify.jsx +17 -0
- package/src/lib/Iconify/index.js +1 -0
- package/src/lib/Image/Image.jsx +116 -0
- package/src/lib/Image/index.js +1 -0
- package/src/lib/Image/utils.js +15 -0
- package/src/lib/ItemSummary/ItemSummary.jsx +77 -0
- package/src/lib/ItemSummary/ItemsSummary.jsx +163 -0
- package/src/lib/Label/Label.jsx +51 -0
- package/src/lib/Label/index.js +1 -0
- package/src/lib/Label/styles.js +76 -0
- package/src/lib/ProjectWizard.jsx +137 -0
- package/src/lib/RHFTextfield/RHFTextfield.jsx +39 -0
- package/src/lib/RHFTextfield/index.js +1 -0
- package/src/lib/Scrollbar/Scrollbar.jsx +39 -0
- package/src/lib/Scrollbar/index.js +1 -0
- package/src/lib/Scrollbar/styles.js +27 -0
- package/src/lib/SearchNotFound/SearchNotFound.jsx +29 -0
- package/src/lib/SearchNotFound/index.js +1 -0
- package/src/lib/SparkleInput/SparkleInput.jsx +51 -0
- package/src/lib/StepComponent/StepComponent.jsx +98 -0
- package/src/lib/SvgColor/SvgColor.jsx +28 -0
- package/src/lib/SvgColor/index.js +1 -0
- package/src/lib/TableHeadCustom/TableHeadCustom.jsx +87 -0
- package/src/lib/TableHeadCustom/index.js +1 -0
- package/src/lib/TableSelectedAction/TableSelectedAction.jsx +72 -0
- package/src/lib/TableSelectedAction/index.js +1 -0
- package/src/lib/index.js +36 -0
- package/src/lib/lib/Icons.js +40 -0
- package/src/lib/lib/context.json +272 -0
- package/src/lib/useChart/useChart.js +179 -0
- package/src/lib/useTable/useTable.js +121 -0
- package/src/pages/404.jsx +17 -0
- package/src/pages/Callback.jsx +126 -0
- package/src/pages/ConfigError.jsx +49 -0
- package/src/pages/LoginPage.jsx +43 -0
- package/src/routes/components/index.js +1 -0
- package/src/routes/components/router-link.jsx +11 -0
- package/src/routes/hooks/index.js +4 -0
- package/src/routes/hooks/use-active-link.js +15 -0
- package/src/routes/hooks/use-pathname.js +10 -0
- package/src/routes/hooks/use-router.js +21 -0
- package/src/stories/FlowChart.stories.jsx +333 -0
- package/src/stories/Iconify.stories.jsx +183 -0
- package/src/stories/Label.stories.jsx +447 -0
- package/src/stories/Navbar.stories.jsx +588 -0
- package/src/theme/css.js +152 -0
- package/src/theme/custom-shadows.js +47 -0
- package/src/theme/index.jsx +100 -0
- package/src/theme/options/contrast.js +34 -0
- package/src/theme/options/presets.js +89 -0
- package/src/theme/options/right-to-left.jsx +26 -0
- package/src/theme/overrides/components/accordion.js +43 -0
- package/src/theme/overrides/components/alert.js +69 -0
- package/src/theme/overrides/components/appbar.js +13 -0
- package/src/theme/overrides/components/autocomplete.js +44 -0
- package/src/theme/overrides/components/avatar.js +111 -0
- package/src/theme/overrides/components/backdrop.js +18 -0
- package/src/theme/overrides/components/badge.js +90 -0
- package/src/theme/overrides/components/breadcrumbs.js +21 -0
- package/src/theme/overrides/components/button-group.js +90 -0
- package/src/theme/overrides/components/button.js +145 -0
- package/src/theme/overrides/components/card.js +30 -0
- package/src/theme/overrides/components/checkbox.js +13 -0
- package/src/theme/overrides/components/chip.js +129 -0
- package/src/theme/overrides/components/css-baseline.js +48 -0
- package/src/theme/overrides/components/data-grid.js +94 -0
- package/src/theme/overrides/components/date-picker.jsx +94 -0
- package/src/theme/overrides/components/dialog.js +49 -0
- package/src/theme/overrides/components/drawer.js +39 -0
- package/src/theme/overrides/components/fab.js +165 -0
- package/src/theme/overrides/components/list.js +33 -0
- package/src/theme/overrides/components/loading-button.js +30 -0
- package/src/theme/overrides/components/menu.js +15 -0
- package/src/theme/overrides/components/pagination.js +81 -0
- package/src/theme/overrides/components/paper.js +18 -0
- package/src/theme/overrides/components/popover.js +20 -0
- package/src/theme/overrides/components/progress.js +40 -0
- package/src/theme/overrides/components/radio.js +22 -0
- package/src/theme/overrides/components/rating.js +40 -0
- package/src/theme/overrides/components/select.js +26 -0
- package/src/theme/overrides/components/skeleton.js +16 -0
- package/src/theme/overrides/components/slider.js +30 -0
- package/src/theme/overrides/components/stepper.js +13 -0
- package/src/theme/overrides/components/svg-icon.js +15 -0
- package/src/theme/overrides/components/switch.js +66 -0
- package/src/theme/overrides/components/table.js +79 -0
- package/src/theme/overrides/components/tabs.js +39 -0
- package/src/theme/overrides/components/textfield.js +146 -0
- package/src/theme/overrides/components/timeline.js +20 -0
- package/src/theme/overrides/components/toggle-button.js +70 -0
- package/src/theme/overrides/components/tooltip.js +18 -0
- package/src/theme/overrides/components/tree-view.js +16 -0
- package/src/theme/overrides/components/typography.js +16 -0
- package/src/theme/overrides/default-props.jsx +238 -0
- package/src/theme/overrides/index.js +100 -0
- package/src/theme/palette.js +144 -0
- package/src/theme/shadows.js +41 -0
- package/src/theme/typography.js +107 -0
- package/src/utils/flatten-array.js +16 -0
- package/src/utils/format-number.js +37 -0
- package/src/utils/format-time.js +27 -0
- package/src/utils/storage-available.js +24 -0
- package/src/widgets/Login/CognitoLogin.jsx +43 -0
- package/src/widgets/Login/Login.jsx +58 -0
- package/src/widgets/Login/cognitoAuth.jsx +26 -0
- package/src/widgets/LoginForm/LoginForm.jsx +87 -0
- package/src/widgets/LoginForm/LoginFormStyles.js +43 -0
- package/src/widgets/LoginForm/index.js +1 -0
- package/src/widgets/SettingsDialog.jsx +308 -0
- package/src/widgets/error/index.js +1 -0
- package/src/widgets/error/not-found-view.jsx +42 -0
- package/vite/vite.js +77 -0
- package/vite.config.js +7 -0
- package/vitest.config.js +32 -0
package/.babelrc
ADDED
package/.browserslistrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
defaults
|
package/.env
ADDED
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"es2020": true,
|
|
4
|
+
"browser": true,
|
|
5
|
+
"node": true,
|
|
6
|
+
"jest": true
|
|
7
|
+
},
|
|
8
|
+
"extends": [
|
|
9
|
+
"eslint:recommended",
|
|
10
|
+
"plugin:prettier/recommended",
|
|
11
|
+
"plugin:react/recommended",
|
|
12
|
+
"plugin:react-hooks/recommended",
|
|
13
|
+
"plugin:cypress/recommended",
|
|
14
|
+
"plugin:storybook/recommended"
|
|
15
|
+
],
|
|
16
|
+
"parserOptions": {
|
|
17
|
+
"ecmaVersion": "latest",
|
|
18
|
+
"sourceType": "module"
|
|
19
|
+
},
|
|
20
|
+
"settings": {
|
|
21
|
+
"react": {
|
|
22
|
+
"version": "18.2"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"ignorePatterns": [
|
|
26
|
+
"/node_modules",
|
|
27
|
+
"/dist",
|
|
28
|
+
"/src/dist",
|
|
29
|
+
"/public/dist",
|
|
30
|
+
"/public/service-worker.js",
|
|
31
|
+
"/src/defaultMap.js"
|
|
32
|
+
],
|
|
33
|
+
"rules": {
|
|
34
|
+
"react/no-children-prop": "off",
|
|
35
|
+
"react/display-name": "off",
|
|
36
|
+
"react/react-in-jsx-scope": "off",
|
|
37
|
+
"react/prop-types": "off",
|
|
38
|
+
"eqeqeq": [
|
|
39
|
+
"error",
|
|
40
|
+
"always"
|
|
41
|
+
],
|
|
42
|
+
"no-console": "off",
|
|
43
|
+
"no-eval": "error",
|
|
44
|
+
"no-var": "error",
|
|
45
|
+
"prefer-const": "error",
|
|
46
|
+
"sort-imports": [
|
|
47
|
+
"warn",
|
|
48
|
+
{
|
|
49
|
+
"memberSyntaxSortOrder": [
|
|
50
|
+
"none",
|
|
51
|
+
"single",
|
|
52
|
+
"multiple",
|
|
53
|
+
"all"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Publish NPM Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version_type:
|
|
7
|
+
description: 'Version bump type'
|
|
8
|
+
required: true
|
|
9
|
+
default: 'patch'
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- patch
|
|
13
|
+
- minor
|
|
14
|
+
- major
|
|
15
|
+
release:
|
|
16
|
+
types: [created]
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
publish:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
id-token: write
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout code
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
token: ${{ secrets.PAT_TOKEN }}
|
|
30
|
+
|
|
31
|
+
- name: Setup Node.js
|
|
32
|
+
uses: actions/setup-node@v4
|
|
33
|
+
with:
|
|
34
|
+
node-version: '20'
|
|
35
|
+
registry-url: 'https://registry.npmjs.org'
|
|
36
|
+
|
|
37
|
+
- name: Configure Git
|
|
38
|
+
run: |
|
|
39
|
+
git config user.name "github-actions[bot]"
|
|
40
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: npm ci
|
|
44
|
+
|
|
45
|
+
- name: Bump version
|
|
46
|
+
id: version_bump
|
|
47
|
+
run: |
|
|
48
|
+
npm version ${{ github.event.inputs.version_type }} -m "Bump version to %s [skip ci]"
|
|
49
|
+
echo "NEW_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
50
|
+
git push --follow-tags
|
|
51
|
+
|
|
52
|
+
- name: Publish to NPM
|
|
53
|
+
id: npm_publish
|
|
54
|
+
run: npm publish --access public
|
|
55
|
+
env:
|
|
56
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
57
|
+
|
|
58
|
+
- name: Notify Slack
|
|
59
|
+
uses: slackapi/slack-github-action@v2.0.0
|
|
60
|
+
with:
|
|
61
|
+
webhook: https://hooks.slack.com/services/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
|
|
62
|
+
webhook-type: incoming-webhook
|
|
63
|
+
payload: |
|
|
64
|
+
{
|
|
65
|
+
"text": "Successfully published @canmingir/link@${{ steps.version_bump.outputs.NEW_VERSION }}"
|
|
66
|
+
}
|
package/.prettierignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/public/dist
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @type { import('@storybook/react-vite').StorybookConfig } */
|
|
2
|
+
const config = {
|
|
3
|
+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
4
|
+
addons: [
|
|
5
|
+
"@chromatic-com/storybook",
|
|
6
|
+
"@storybook/addon-docs",
|
|
7
|
+
"@storybook/addon-a11y",
|
|
8
|
+
"@storybook/addon-vitest",
|
|
9
|
+
],
|
|
10
|
+
framework: {
|
|
11
|
+
name: "@storybook/react-vite",
|
|
12
|
+
options: {},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default config;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @type { import('@storybook/react-vite').Preview } */
|
|
2
|
+
const preview = {
|
|
3
|
+
parameters: {
|
|
4
|
+
controls: {
|
|
5
|
+
matchers: {
|
|
6
|
+
color: /(background|color)$/i,
|
|
7
|
+
date: /Date$/i,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
a11y: {
|
|
12
|
+
test: "todo",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default preview;
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# platform
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Platform } from "./src/Platform";
|
package/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ebubekirylmaz/link-test",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./layouts": "./src/layouts/index.js",
|
|
9
|
+
"./vite": "./vite/vite.js",
|
|
10
|
+
"./platform/components": "./src/lib/index.js",
|
|
11
|
+
"./platform/hooks": "./src/hooks/index.js",
|
|
12
|
+
"./platform/cypress": "./cypress/cypress.js",
|
|
13
|
+
"./platform/commands": "./commands/index.js",
|
|
14
|
+
"./platform/http": "./src/http/index.js"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "cd project && concurrently \"npm run dev\" \"npm run server\"",
|
|
18
|
+
"dev:update": "cd project && npm i @nucleoidai/platform@latest",
|
|
19
|
+
"test": "exit 0",
|
|
20
|
+
"storybook": "storybook dev -p 6006",
|
|
21
|
+
"build-storybook": "storybook build",
|
|
22
|
+
"cypress": "cypress open --browser chrome"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@aws-sdk/client-cognito-identity-provider": "^3.968.0",
|
|
26
|
+
"@chatscope/chat-ui-kit-react": "^1.10.1",
|
|
27
|
+
"@emoji-mart/data": "^1.1.2",
|
|
28
|
+
"@emoji-mart/react": "^1.1.1",
|
|
29
|
+
"@emotion/react": "^11.13.3",
|
|
30
|
+
"@iconify/react": "^5.0.1",
|
|
31
|
+
"@mui/icons-material": "^5.16.4",
|
|
32
|
+
"@mui/lab": "^5.0.0-alpha.172",
|
|
33
|
+
"@mui/material": "^5.16.4",
|
|
34
|
+
"@mui/x-date-pickers": "^7.10.0",
|
|
35
|
+
"@nucleoidai/react-event": "^1.1.9",
|
|
36
|
+
"@nucleoidjs/webstorage": "^1.0.5",
|
|
37
|
+
"autosuggest-highlight": "^3.3.4",
|
|
38
|
+
"axios": "^1.10.0",
|
|
39
|
+
"axios-auth-refresh": "^3.3.6",
|
|
40
|
+
"axios-retry": "^4.4.1",
|
|
41
|
+
"cypress": "^15.3.0",
|
|
42
|
+
"date-fns": "^3.6.0",
|
|
43
|
+
"framer-motion": "^11.3.6",
|
|
44
|
+
"highlight.js": "^11.10.0",
|
|
45
|
+
"joi": "^17.13.3",
|
|
46
|
+
"jwt-decode": "^4.0.0",
|
|
47
|
+
"mapbox-gl": "^2.15.0",
|
|
48
|
+
"mui-one-time-password-input": "^2.0.3",
|
|
49
|
+
"notistack": "^3.0.1",
|
|
50
|
+
"nprogress": "^0.2.0",
|
|
51
|
+
"numeral": "^2.0.6",
|
|
52
|
+
"prop-types": "^15.8.1",
|
|
53
|
+
"qs": "^6.11.2",
|
|
54
|
+
"react": "^18.2.0",
|
|
55
|
+
"react-apexcharts": "^1.4.1",
|
|
56
|
+
"react-chartjs-2": "^5.2.0",
|
|
57
|
+
"react-dom": "^18.2.0",
|
|
58
|
+
"react-dropzone": "^14.2.3",
|
|
59
|
+
"react-helmet-async": "^2.0.5",
|
|
60
|
+
"react-hook-form": "^7.52.1",
|
|
61
|
+
"react-lazy-load-image-component": "^1.6.2",
|
|
62
|
+
"react-map-gl": "^7.1.7",
|
|
63
|
+
"react-markdown": "^9.0.1",
|
|
64
|
+
"react-organizational-chart": "^2.2.1",
|
|
65
|
+
"react-quill": "^2.0.0",
|
|
66
|
+
"react-router-dom": "^6.25.0",
|
|
67
|
+
"react-slick": "^0.30.2",
|
|
68
|
+
"rehype-highlight": "^7.0.0",
|
|
69
|
+
"rehype-raw": "^7.0.0",
|
|
70
|
+
"remark-gfm": "^4.0.0",
|
|
71
|
+
"simplebar-react": "^3.2.6",
|
|
72
|
+
"styled-components": "^6.1.11",
|
|
73
|
+
"stylis": "^4.3.2",
|
|
74
|
+
"stylis-plugin-rtl": "^2.1.1",
|
|
75
|
+
"swr": "^2.2.5",
|
|
76
|
+
"yet-another-react-lightbox": "^3.21.1"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@babel/preset-env": "^7.21.5",
|
|
80
|
+
"@babel/preset-react": "^7.18.6",
|
|
81
|
+
"@chromatic-com/storybook": "^4.1.1",
|
|
82
|
+
"@storybook/addon-a11y": "^9.1.8",
|
|
83
|
+
"@storybook/addon-docs": "^9.1.8",
|
|
84
|
+
"@storybook/addon-vitest": "^9.1.8",
|
|
85
|
+
"@storybook/react-vite": "^9.1.8",
|
|
86
|
+
"@types/react": "^18.0.28",
|
|
87
|
+
"@types/react-dom": "^18.0.11",
|
|
88
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
89
|
+
"@vitest/browser": "^3.2.4",
|
|
90
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
91
|
+
"babel-jest": "^29.5.0",
|
|
92
|
+
"concurrently": "^8.2.2",
|
|
93
|
+
"eslint": "^8.57.0",
|
|
94
|
+
"eslint-config-prettier": "^8.8.0",
|
|
95
|
+
"eslint-plugin-cypress": "^2.15.1",
|
|
96
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
97
|
+
"eslint-plugin-react": "^7.32.2",
|
|
98
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
99
|
+
"eslint-plugin-storybook": "^9.1.8",
|
|
100
|
+
"jest": "^29.5.0",
|
|
101
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
102
|
+
"nodemon": "^3.0.1",
|
|
103
|
+
"playwright": "^1.55.1",
|
|
104
|
+
"prettier": "^2.8.8",
|
|
105
|
+
"storybook": "^9.1.8",
|
|
106
|
+
"vite": "^7.3.1",
|
|
107
|
+
"vite-plugin-checker": "^0.9.0",
|
|
108
|
+
"vite-plugin-svgr": "^4.2.0",
|
|
109
|
+
"vitest": "^3.2.4"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: { browser: true, es2020: true },
|
|
4
|
+
extends: [
|
|
5
|
+
"eslint:recommended",
|
|
6
|
+
"plugin:react/recommended",
|
|
7
|
+
"plugin:react/jsx-runtime",
|
|
8
|
+
"plugin:react-hooks/recommended",
|
|
9
|
+
"plugin:cypress/recommended",
|
|
10
|
+
],
|
|
11
|
+
ignores:["server"],
|
|
12
|
+
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
|
13
|
+
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
|
|
14
|
+
settings: { react: { version: "18.2" } },
|
|
15
|
+
plugins: ["react-refresh"],
|
|
16
|
+
rules: {
|
|
17
|
+
"react-refresh/only-export-components": [
|
|
18
|
+
"warn",
|
|
19
|
+
{ allowConstantExport: true },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
name: "SPQR",
|
|
3
|
+
base: "/",
|
|
4
|
+
appId: "10b7bc8c-a49c-4002-b0ec-63599e4b5210",
|
|
5
|
+
api: "http://localhost:3000",
|
|
6
|
+
project: {
|
|
7
|
+
github: {
|
|
8
|
+
authUrl: "https://github.com/login/oauth/authorize",
|
|
9
|
+
clientId: "0c2844d3d19dc9293fc5",
|
|
10
|
+
redirectUri: "http://localhost:5173/callback",
|
|
11
|
+
userUrl: "https://api.github.com/user",
|
|
12
|
+
scope: "user",
|
|
13
|
+
response_type: "code",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default config;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import ActionButton from "./src/widgets/ActionButton";
|
|
2
|
+
|
|
3
|
+
const menuConfig = {
|
|
4
|
+
topMenu: [],
|
|
5
|
+
sideMenu: [
|
|
6
|
+
{
|
|
7
|
+
subheader: "SPQR",
|
|
8
|
+
items: [
|
|
9
|
+
{
|
|
10
|
+
title: "Emperor",
|
|
11
|
+
icon: "game-icons:olive",
|
|
12
|
+
path: "/emperor",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
title: "Battles",
|
|
16
|
+
icon: "pepicons-print:swords",
|
|
17
|
+
path: "/emperor/battle",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
options: [
|
|
23
|
+
{
|
|
24
|
+
label: "Home",
|
|
25
|
+
linkTo: "/",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "Profile",
|
|
29
|
+
linkTo: "/",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "Settings",
|
|
33
|
+
linkTo: "/",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
actionButtons: [ActionButton],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default menuConfig;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
const templateConfig = {
|
|
3
|
+
theme: {
|
|
4
|
+
variants: (theme) => ({
|
|
5
|
+
MuiCard: {
|
|
6
|
+
variants: [
|
|
7
|
+
{
|
|
8
|
+
props: { variant: "profile-card" },
|
|
9
|
+
style: {
|
|
10
|
+
mb: 3,
|
|
11
|
+
height: 290,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
}),
|
|
17
|
+
mode: "dark",
|
|
18
|
+
colorPresets: "cyan",
|
|
19
|
+
},
|
|
20
|
+
login: {
|
|
21
|
+
variant: "modern",
|
|
22
|
+
image: "https://minimals.cc/assets/background/overlay_3.jpg",
|
|
23
|
+
icon: "https://cdn.nucleoid.com/media/icon.png",
|
|
24
|
+
largeIcon: "https://cdn.nucleoid.com/media/icon.png",
|
|
25
|
+
},
|
|
26
|
+
projectBar: {
|
|
27
|
+
label: "Team",
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default templateConfig;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
describe("CompactLayout", () => {
|
|
2
|
+
it("should contain only header", () => {
|
|
3
|
+
cy.visit("/");
|
|
4
|
+
cy.checkLayout("CompactLayout");
|
|
5
|
+
});
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
describe("FullScreenLayout", () => {
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
cy.fixture("CONFIG/MENU_CONFIG.js").as("config");
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it("should contain only mini nav ", () => {
|
|
14
|
+
cy.visit("/emperor/battle");
|
|
15
|
+
cy.checkLayout("FullScreenLayout");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("should include paths from config.menu in navigation", () => {
|
|
19
|
+
cy.visit("/emperor/battle");
|
|
20
|
+
|
|
21
|
+
cy.get("@config").then((config) => {
|
|
22
|
+
config.sideMenu[0].items.map((item) =>
|
|
23
|
+
cy.getBySel("nav-mini").contains(item.title)
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("should redirect to the correct path", () => {
|
|
29
|
+
cy.visit("/emperor/battle");
|
|
30
|
+
|
|
31
|
+
cy.get("@config").then((config) => {
|
|
32
|
+
cy.getBySel("nav-mini")
|
|
33
|
+
.contains(config.sideMenu[0].items[0].title)
|
|
34
|
+
.click();
|
|
35
|
+
cy.url().should("include", config.sideMenu[0].items[0].path);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
describe("DashboardLayout", () => {
|
|
41
|
+
beforeEach(() => {
|
|
42
|
+
cy.fixture("CONFIG/MENU_CONFIG.js").as("config");
|
|
43
|
+
cy.viewport(1280, 720);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("should contain header and vertical nav", () => {
|
|
47
|
+
cy.visit("/emperor");
|
|
48
|
+
cy.checkLayout("DashboardLayout");
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("should include paths from config.menu in navigation", () => {
|
|
52
|
+
cy.visit("/emperor");
|
|
53
|
+
|
|
54
|
+
cy.get("@config").then((config) => {
|
|
55
|
+
config.sideMenu[0].items.map((item) =>
|
|
56
|
+
cy.getBySel("nav-vertical").contains(item.title)
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("should redirect to the correct path", () => {
|
|
62
|
+
cy.visit("/emperor");
|
|
63
|
+
|
|
64
|
+
cy.get("@config").then((config) => {
|
|
65
|
+
cy.getBySel("nav-vertical")
|
|
66
|
+
.contains(config.sideMenu[0].items[0].title)
|
|
67
|
+
.click();
|
|
68
|
+
cy.url().should("include", config.sideMenu[0].items[0].path);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("when click action button open snackbar", () => {
|
|
73
|
+
cy.visit("/emperor");
|
|
74
|
+
|
|
75
|
+
cy.get("@config").then((config) => {
|
|
76
|
+
cy.getBySel("nav-vertical")
|
|
77
|
+
.contains(config.sideMenu[0].items[0].title)
|
|
78
|
+
.click();
|
|
79
|
+
cy.contains("Talk to Emperor").click();
|
|
80
|
+
cy.contains("Emperor is busy right now").should("be.visible");
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("when click end item navigate to the correct path", () => {
|
|
85
|
+
cy.visit("/emperor");
|
|
86
|
+
|
|
87
|
+
cy.get("@config").then((config) => {
|
|
88
|
+
cy.getBySel("nav-vertical")
|
|
89
|
+
.contains(config.sideMenu[0].items[0].title)
|
|
90
|
+
.click();
|
|
91
|
+
|
|
92
|
+
cy.getBySel("end-item").click();
|
|
93
|
+
|
|
94
|
+
cy.get("@config").then((config) => {
|
|
95
|
+
cy.url().should("include", config.endItem.path);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
describe("CompactLayout (mobile)", () => {
|
|
102
|
+
beforeEach(() => {
|
|
103
|
+
cy.viewport(375, 667);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it("should contain only header", () => {
|
|
107
|
+
cy.visit("/");
|
|
108
|
+
cy.checkLayout("CompactLayout");
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
describe("FullScreenLayout (mobile)", () => {
|
|
113
|
+
beforeEach(() => {
|
|
114
|
+
cy.viewport(375, 667);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("should contain only mini nav ", () => {
|
|
118
|
+
cy.visit("/emperor/battle");
|
|
119
|
+
cy.checkLayout("FullScreenLayout");
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
describe("DashboardLayout (mobile)", () => {
|
|
124
|
+
beforeEach(() => {
|
|
125
|
+
cy.viewport(375, 667);
|
|
126
|
+
cy.fixture("CONFIG/MENU_CONFIG.js").as("config");
|
|
127
|
+
});
|
|
128
|
+
it("should contain header and vertical nav", () => {
|
|
129
|
+
cy.visit("/emperor");
|
|
130
|
+
cy.checkLayout("DashboardLayout");
|
|
131
|
+
});
|
|
132
|
+
it("should include paths from config.menu in navigation", () => {
|
|
133
|
+
cy.visit("/emperor");
|
|
134
|
+
|
|
135
|
+
cy.getBySel("open-nav-button").click();
|
|
136
|
+
|
|
137
|
+
cy.get("@config").then((config) => {
|
|
138
|
+
config.sideMenu[0].items.map((item) =>
|
|
139
|
+
cy.get(".simplebar-content").contains(item.title)
|
|
140
|
+
);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it("should redirect to the correct path", () => {
|
|
145
|
+
cy.visit("/emperor");
|
|
146
|
+
|
|
147
|
+
cy.getBySel("open-nav-button").click();
|
|
148
|
+
|
|
149
|
+
cy.get("@config").then((config) => {
|
|
150
|
+
cy.get(".simplebar-content")
|
|
151
|
+
.contains(config.sideMenu[0].items[0].title)
|
|
152
|
+
.click();
|
|
153
|
+
cy.url().should("include", config.sideMenu[0].items[0].path);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it("when click action button open snackbar", () => {
|
|
158
|
+
cy.visit("/emperor");
|
|
159
|
+
|
|
160
|
+
cy.getBySel("open-nav-button").click();
|
|
161
|
+
|
|
162
|
+
cy.get("@config").then((config) => {
|
|
163
|
+
cy.get(".simplebar-content")
|
|
164
|
+
.contains(config.sideMenu[0].items[0].title)
|
|
165
|
+
.click();
|
|
166
|
+
cy.contains("Talk to Emperor").click();
|
|
167
|
+
cy.contains("Emperor is busy right now").should("be.visible");
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import config from "../../config.js";
|
|
2
|
+
|
|
3
|
+
describe("OAuth GitHub", () => {
|
|
4
|
+
it("should when press login button redirect provider url with correct params", () => {
|
|
5
|
+
cy.visit("/login");
|
|
6
|
+
|
|
7
|
+
cy.get('[data-cy="github-login-button"]').click();
|
|
8
|
+
|
|
9
|
+
cy.url().should("include", "https://github.com/login");
|
|
10
|
+
cy.url().should("include", config.login.github.clientId);
|
|
11
|
+
cy.url().should("include", config.login.github.scope);
|
|
12
|
+
cy.url().should("include", config.login.github.response_type);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it("should user after login redirect homepage and display user info", () => {
|
|
16
|
+
cy.intercept("POST", "/oauth", {
|
|
17
|
+
body: {
|
|
18
|
+
accessToken: "TEST_ACCESS_TOKEN",
|
|
19
|
+
refreshToken: "TEST_REFRESH_TOKEN",
|
|
20
|
+
},
|
|
21
|
+
}).as("oauthRequest");
|
|
22
|
+
|
|
23
|
+
cy.intercept("GET", "https://api.github.com/user", {
|
|
24
|
+
fixture: "/OAUTH/GITHUB/user.json",
|
|
25
|
+
}).as("githubUserRequest");
|
|
26
|
+
|
|
27
|
+
cy.visit("/callback?code=TEST_CODE");
|
|
28
|
+
|
|
29
|
+
cy.wait("@oauthRequest");
|
|
30
|
+
cy.wait("@githubUserRequest");
|
|
31
|
+
|
|
32
|
+
cy.getBySel("account-popover").click();
|
|
33
|
+
cy.getBySel("account-popover-name").contains("octocat");
|
|
34
|
+
});
|
|
35
|
+
});
|