@canmingir/link 1.2.56 → 1.2.57
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/.eslintignore +0 -1
- package/LICENSE +201 -0
- package/package.json +2 -1
- package/src/assets/illustrations/avatar-shape.jsx +10 -8
- package/src/assets/illustrations/background-shape.jsx +0 -2
- package/src/assets/illustrations/booking-illustration.jsx +8 -6
- package/src/assets/illustrations/check-in-illustration.jsx +8 -6
- package/src/assets/illustrations/check-out-illustration.jsx +8 -6
- package/src/assets/illustrations/coming-soon-illustration.jsx +8 -6
- package/src/assets/illustrations/forbidden-illustration.jsx +8 -6
- package/src/assets/illustrations/maintenance-illustration.jsx +8 -6
- package/src/assets/illustrations/motivation-illustration.jsx +8 -6
- package/src/assets/illustrations/order-complete-illustration.jsx +8 -6
- package/src/assets/illustrations/page-not-found-illustration.jsx +8 -6
- package/src/assets/illustrations/seo-illustration.jsx +8 -6
- package/src/assets/illustrations/sever-error-illustration.jsx +8 -6
- package/src/assets/illustrations/upgrade-storage-illustration.jsx +8 -6
- package/src/assets/illustrations/upload-illustration.jsx +8 -6
- package/src/components/Iconify/Iconify.jsx +0 -1
- package/src/components/chart/chart.js +0 -2
- package/src/components/chart/index.js +0 -2
- package/src/components/chart/use-chart.js +0 -2
- package/src/components/custom-popover/styles.js +0 -2
- package/src/components/custom-popover/use-popover.js +0 -2
- package/src/components/custom-popover/utils.js +0 -2
- package/src/components/file-thumbnail/utils.js +0 -12
- package/src/components/image/utils.js +0 -2
- package/src/components/label/styles.js +0 -2
- package/src/components/logo/logo.jsx +1 -1
- package/src/components/scrollbar/styles.js +0 -2
- package/src/components/settings/context/settings-context.js +0 -2
- package/src/hooks/use-boolean.js +0 -2
- package/src/hooks/use-event-listener.js +0 -2
- package/src/hooks/use-local-storage.js +0 -4
- package/src/hooks/use-off-set-top.js +0 -2
- package/src/hooks/use-responsive.js +0 -4
- package/src/hooks/use-scroll-to-top.js +0 -2
- package/src/layouts/CompactLayout/CompactLayout.jsx +0 -2
- package/src/layouts/DashboardLayout/DashboardLayout.jsx +0 -2
- package/src/layouts/DashboardLayout/main.jsx +0 -2
- package/src/layouts/DashboardLayout/nav-horizontal.jsx +0 -2
- package/src/layouts/DashboardLayout/nav-vertical.jsx +6 -5
- package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +3 -4
- package/src/layouts/FullScreenLayout/nav-horizontal.jsx +0 -2
- package/src/layouts/FullScreenLayout/nav-vertical.jsx +4 -5
- package/src/layouts/MainLayout/header.jsx +1 -3
- package/src/layouts/MainLayout/nav/desktop/index.jsx +0 -2
- package/src/layouts/MainLayout/nav/desktop/nav-item.jsx +0 -6
- package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +16 -16
- package/src/layouts/MainLayout/nav/mobile/index.jsx +1 -3
- package/src/layouts/MainLayout/nav/mobile/nav-item.jsx +0 -4
- package/src/layouts/MainLayout/nav/mobile/nav-list.jsx +0 -2
- package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +0 -1
- package/src/layouts/auth/classic.jsx +3 -4
- package/src/layouts/auth/modern-compact.jsx +0 -2
- package/src/layouts/auth/modern.jsx +0 -2
- package/src/layouts/common/ProjectBar/utils.js +0 -10
- package/src/layouts/common/account-popover.jsx +0 -2
- package/src/layouts/common/header-shadow.jsx +0 -2
- package/src/layouts/common/header-sim.jsx +7 -4
- package/src/layouts/common/header-simple.jsx +14 -8
- package/src/layouts/common/nav-toggle-button.jsx +1 -3
- package/src/layouts/common/notifications-popover/index.jsx +9 -10
- package/src/layouts/common/notifications-popover/notification-item.jsx +20 -17
- package/src/layouts/common/settings-button.jsx +0 -2
- package/src/layouts/config-layout.js +0 -2
- package/src/lib/Image/utils.js +0 -2
- package/src/lib/Scrollbar/styles.js +0 -2
- package/src/pages/404.jsx +0 -2
- package/src/routes/components/router-link.jsx +0 -2
- package/src/routes/hooks/use-active-link.js +0 -2
- package/src/routes/hooks/use-pathname.js +0 -2
- package/src/routes/hooks/use-router.js +0 -2
- package/src/theme/css.js +0 -12
- package/src/theme/custom-shadows.js +0 -2
- package/src/theme/options/contrast.js +0 -2
- package/src/theme/options/presets.js +0 -4
- package/src/theme/options/right-to-left.jsx +0 -2
- package/src/theme/overrides/components/accordion.js +0 -2
- package/src/theme/overrides/components/alert.js +0 -4
- package/src/theme/overrides/components/appbar.js +0 -2
- package/src/theme/overrides/components/autocomplete.js +0 -2
- package/src/theme/overrides/components/avatar.js +0 -4
- package/src/theme/overrides/components/backdrop.js +0 -2
- package/src/theme/overrides/components/badge.js +0 -2
- package/src/theme/overrides/components/breadcrumbs.js +0 -2
- package/src/theme/overrides/components/button-group.js +0 -4
- package/src/theme/overrides/components/button.js +0 -4
- package/src/theme/overrides/components/card.js +0 -2
- package/src/theme/overrides/components/checkbox.js +0 -2
- package/src/theme/overrides/components/chip.js +0 -4
- package/src/theme/overrides/components/css-baseline.js +0 -2
- package/src/theme/overrides/components/data-grid.js +0 -2
- package/src/theme/overrides/components/date-picker.jsx +0 -2
- package/src/theme/overrides/components/dialog.js +0 -2
- package/src/theme/overrides/components/drawer.js +0 -2
- package/src/theme/overrides/components/fab.js +0 -4
- package/src/theme/overrides/components/form.js +0 -2
- package/src/theme/overrides/components/list.js +0 -2
- package/src/theme/overrides/components/loading-button.js +0 -2
- package/src/theme/overrides/components/menu.js +0 -2
- package/src/theme/overrides/components/pagination.js +0 -4
- package/src/theme/overrides/components/paper.js +0 -2
- package/src/theme/overrides/components/popover.js +0 -2
- package/src/theme/overrides/components/progress.js +0 -4
- package/src/theme/overrides/components/radio.js +0 -2
- package/src/theme/overrides/components/rating.js +0 -2
- package/src/theme/overrides/components/select.js +0 -2
- package/src/theme/overrides/components/skeleton.js +0 -2
- package/src/theme/overrides/components/slider.js +0 -2
- package/src/theme/overrides/components/stepper.js +0 -2
- package/src/theme/overrides/components/svg-icon.js +0 -2
- package/src/theme/overrides/components/switch.js +0 -2
- package/src/theme/overrides/components/table.js +0 -2
- package/src/theme/overrides/components/tabs.js +0 -2
- package/src/theme/overrides/components/textfield.js +0 -2
- package/src/theme/overrides/components/timeline.js +0 -2
- package/src/theme/overrides/components/toggle-button.js +0 -4
- package/src/theme/overrides/components/tooltip.js +0 -2
- package/src/theme/overrides/components/tree-view.js +0 -2
- package/src/theme/overrides/components/typography.js +0 -2
- package/src/theme/overrides/default-props.jsx +4 -7
- package/src/theme/palette.js +0 -4
- package/src/theme/shadows.js +0 -2
- package/src/theme/typography.js +0 -4
- package/src/utils/flatten-array.js +0 -2
- package/src/utils/format-number.js +0 -2
- package/src/utils/format-time.js +0 -2
- package/src/utils/storage-available.js +0 -2
- package/src/widgets/Login/Login.jsx +0 -2
- package/src/widgets/error/not-found-view.jsx +0 -2
- package/project/.eslintrc.cjs +0 -22
- package/project/config.js +0 -18
- package/project/config.menu.js +0 -39
- package/project/config.template.js +0 -31
- package/project/cypress/e2e/layouts.cy.js +0 -170
- package/project/cypress/e2e/login.cy.js +0 -35
- package/project/cypress/e2e/selectbar.cy.js +0 -80
- package/project/cypress/fixtures/CONFIG/MENU_CONFIG.js +0 -39
- package/project/cypress/fixtures/EMPEROR/EMPERORS_GET.json +0 -51
- package/project/cypress/fixtures/EMPEROR/EMPERORS_POST.json +0 -9
- package/project/cypress/fixtures/OAUTH/GITHUB/user.json +0 -46
- package/project/cypress/fixtures/example.json +0 -5
- package/project/cypress/support/commands.js +0 -104
- package/project/cypress/support/e2e.js +0 -1
- package/project/cypress.config.js +0 -10
- package/project/index.html +0 -12
- 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 +0 -22434
- package/project/package.json +0 -42
- 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 +0 -1
- package/project/routes.jsx +0 -47
- package/project/server/mock.json +0 -110
- package/project/server/oauthMock.js +0 -27
- package/project/server/package-lock.json +0 -1505
- package/project/server/package.json +0 -20
- package/project/server/server.js +0 -127
- package/project/src/Container.jsx +0 -7
- package/project/src/components/ActionButton.jsx +0 -18
- package/project/src/hooks/useEmperor.jsx +0 -21
- package/project/src/http/index.js +0 -39
- package/project/src/main.jsx +0 -10
- package/project/src/pages/Battles.jsx +0 -16
- package/project/src/pages/Emperor.jsx +0 -50
- package/project/src/pages/index.jsx +0 -33
- package/project/src/theme.js +0 -151
- package/project/src/widgets/ActionButton.jsx +0 -68
- package/project/src/widgets/AddNewEmperor.jsx +0 -120
- package/project/src/widgets/ProjectContainer.jsx +0 -27
- package/project/vite.config.js +0 -6
- package/project/vite.config.js.timestamp-1709564450418-45fdd27900806.mjs +0 -341
- package/src/layouts/MainLayout/footer.jsx +0 -153
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { alpha } from "@mui/material/styles";
|
|
2
2
|
import { linearProgressClasses } from "@mui/material/LinearProgress";
|
|
3
3
|
|
|
4
|
-
// ----------------------------------------------------------------------
|
|
5
|
-
|
|
6
4
|
const COLORS = ["primary", "secondary", "info", "success", "warning", "error"];
|
|
7
5
|
|
|
8
|
-
// ----------------------------------------------------------------------
|
|
9
|
-
|
|
10
6
|
export function progress(theme) {
|
|
11
7
|
const rootStyles = (ownerState) => {
|
|
12
8
|
const bufferVariant = ownerState.variant === "buffer";
|
|
@@ -2,8 +2,6 @@ import { alpha } from "@mui/material/styles";
|
|
|
2
2
|
import { ratingClasses } from "@mui/material/Rating";
|
|
3
3
|
import { svgIconClasses } from "@mui/material/SvgIcon";
|
|
4
4
|
|
|
5
|
-
// ----------------------------------------------------------------------
|
|
6
|
-
|
|
7
5
|
export function rating(theme) {
|
|
8
6
|
return {
|
|
9
7
|
MuiRating: {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { alpha } from "@mui/material/styles";
|
|
2
2
|
import { switchClasses } from "@mui/material/Switch";
|
|
3
3
|
|
|
4
|
-
// ----------------------------------------------------------------------
|
|
5
|
-
|
|
6
4
|
export function switches(theme) {
|
|
7
5
|
const lightMode = theme.palette.mode === "light";
|
|
8
6
|
|
|
@@ -2,8 +2,6 @@ import { alpha } from "@mui/material/styles";
|
|
|
2
2
|
import { tableCellClasses } from "@mui/material/TableCell";
|
|
3
3
|
import { tableRowClasses } from "@mui/material/TableRow";
|
|
4
4
|
|
|
5
|
-
// ----------------------------------------------------------------------
|
|
6
|
-
|
|
7
5
|
export function table(theme) {
|
|
8
6
|
return {
|
|
9
7
|
MuiTable: {
|
|
@@ -4,8 +4,6 @@ import { inputBaseClasses } from "@mui/material/InputBase";
|
|
|
4
4
|
import { inputLabelClasses } from "@mui/material/InputLabel";
|
|
5
5
|
import { outlinedInputClasses } from "@mui/material/OutlinedInput";
|
|
6
6
|
|
|
7
|
-
// ----------------------------------------------------------------------
|
|
8
|
-
|
|
9
7
|
export function textField(theme) {
|
|
10
8
|
const color = {
|
|
11
9
|
focused: theme.palette.text.primary,
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { alpha } from "@mui/material/styles";
|
|
2
2
|
import { toggleButtonClasses } from "@mui/material/ToggleButton";
|
|
3
3
|
|
|
4
|
-
// ----------------------------------------------------------------------
|
|
5
|
-
|
|
6
4
|
const COLORS = ["primary", "secondary", "info", "success", "warning", "error"];
|
|
7
5
|
|
|
8
|
-
// ----------------------------------------------------------------------
|
|
9
|
-
|
|
10
6
|
export function toggleButton(theme) {
|
|
11
7
|
const rootStyles = (ownerState) => {
|
|
12
8
|
const defaultStyle = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Iconify from "../../components/Iconify";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import SvgIcon from "@mui/material/SvgIcon";
|
|
4
|
-
// ----------------------------------------------------------------------
|
|
5
4
|
|
|
6
5
|
const ArrowDownIcon = (props) => (
|
|
7
6
|
<SvgIcon {...props}>
|
|
@@ -63,8 +62,6 @@ const TreeViewEndIcon = (props) => (
|
|
|
63
62
|
</SvgIcon>
|
|
64
63
|
);
|
|
65
64
|
|
|
66
|
-
// ----------------------------------------------------------------------
|
|
67
|
-
|
|
68
65
|
export function defaultProps(theme) {
|
|
69
66
|
return {
|
|
70
67
|
MuiAlert: {
|
|
@@ -111,8 +108,8 @@ export function defaultProps(theme) {
|
|
|
111
108
|
subheader: {
|
|
112
109
|
variant: "body2",
|
|
113
110
|
marginTop: theme.spacing(0.5),
|
|
114
|
-
}
|
|
115
|
-
}
|
|
111
|
+
},
|
|
112
|
+
},
|
|
116
113
|
},
|
|
117
114
|
},
|
|
118
115
|
MuiChip: {
|
|
@@ -144,8 +141,8 @@ export function defaultProps(theme) {
|
|
|
144
141
|
|
|
145
142
|
secondary: {
|
|
146
143
|
component: "span",
|
|
147
|
-
}
|
|
148
|
-
}
|
|
144
|
+
},
|
|
145
|
+
},
|
|
149
146
|
},
|
|
150
147
|
},
|
|
151
148
|
MuiPaper: {
|
package/src/theme/palette.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { alpha } from "@mui/material/styles";
|
|
2
2
|
|
|
3
|
-
// ----------------------------------------------------------------------
|
|
4
|
-
|
|
5
3
|
// SETUP COLORS
|
|
6
4
|
|
|
7
5
|
export const grey = {
|
|
@@ -99,8 +97,6 @@ const base = {
|
|
|
99
97
|
action,
|
|
100
98
|
};
|
|
101
99
|
|
|
102
|
-
// ----------------------------------------------------------------------
|
|
103
|
-
|
|
104
100
|
export function palette(mode) {
|
|
105
101
|
const light = {
|
|
106
102
|
...base,
|
package/src/theme/shadows.js
CHANGED
|
@@ -2,8 +2,6 @@ import { alpha } from "@mui/material/styles";
|
|
|
2
2
|
|
|
3
3
|
import { common, grey } from "./palette";
|
|
4
4
|
|
|
5
|
-
// ----------------------------------------------------------------------
|
|
6
|
-
|
|
7
5
|
export function shadows(mode) {
|
|
8
6
|
const color = mode === "light" ? grey[500] : common.black;
|
|
9
7
|
|
package/src/theme/typography.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// ----------------------------------------------------------------------
|
|
2
|
-
|
|
3
1
|
export function remToPx(value) {
|
|
4
2
|
return Math.round(parseFloat(value) * 16);
|
|
5
3
|
}
|
|
@@ -25,8 +23,6 @@ export function responsiveFontSizes({ sm, md, lg }) {
|
|
|
25
23
|
export const primaryFont = "Public Sans, sans-serif";
|
|
26
24
|
export const secondaryFont = "Barlow, sans-serif";
|
|
27
25
|
|
|
28
|
-
// ----------------------------------------------------------------------
|
|
29
|
-
|
|
30
26
|
export const typography = {
|
|
31
27
|
fontFamily: primaryFont,
|
|
32
28
|
fontSecondaryFamily: secondaryFont,
|
package/src/utils/format-time.js
CHANGED
|
@@ -8,8 +8,6 @@ import { storage } from "@nucleoidjs/webstorage";
|
|
|
8
8
|
import { useEffect } from "react";
|
|
9
9
|
import { useNavigate } from "react-router-dom";
|
|
10
10
|
|
|
11
|
-
// ----------------------------------------------------------------------
|
|
12
|
-
|
|
13
11
|
export default function Auth0LoginView() {
|
|
14
12
|
const { name, project } = config();
|
|
15
13
|
|
|
@@ -7,8 +7,6 @@ import { motion } from "framer-motion";
|
|
|
7
7
|
|
|
8
8
|
import { MotionContainer, varBounce } from "../../components/animate";
|
|
9
9
|
|
|
10
|
-
// ----------------------------------------------------------------------
|
|
11
|
-
|
|
12
10
|
export default function NotFoundView() {
|
|
13
11
|
return (
|
|
14
12
|
<MotionContainer>
|
package/project/.eslintrc.cjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
};
|
package/project/config.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
package/project/config.menu.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
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;
|
|
@@ -1,31 +0,0 @@
|
|
|
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;
|
|
@@ -1,170 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
});
|