Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@feature/unit tests #413

Open
wants to merge 49 commits into
base: integration
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
379c9b4
Added js unit tests boilerplating (not working currently)
dimittal Jul 29, 2024
d43b798
Fixed npm run test
dimittal Jul 31, 2024
c8cebd8
Merge branch 'main' of github.com:DrDroidLab/PlayBooks into @feature/…
dimittal Jul 31, 2024
691e085
Merge branch 'integration' of github.com:DrDroidLab/PlayBooks into @f…
dimittal Jul 31, 2024
2928363
Added configs for .tsx tests execution
dimittal Jul 31, 2024
7e594c7
Merge branch 'integration' of github.com:DrDroidLab/PlayBooks into @f…
dimittal Jul 31, 2024
09cd1d5
Added render wrapper over mocked component
dimittal Aug 1, 2024
288ec1c
Merge branch 'integration' of github.com:DrDroidLab/PlayBooks into @f…
dimittal Aug 1, 2024
972fb78
Added js unit tests framework
dimittal Aug 1, 2024
5ba5ef0
Merge branch 'integration' of https://github.com/DrDroidLab/PlayBooks…
jayeshsadhwani99 Aug 3, 2024
e6e44b7
Merge branch 'main' of https://github.com/DrDroidLab/PlayBooks into @…
jayeshsadhwani99 Aug 3, 2024
242b453
unit test for checking for unauthenticatedRoutes
jayeshsadhwani99 Aug 3, 2024
6f6de50
add basic tests for more functions and write doc strings for them
jayeshsadhwani99 Aug 3, 2024
a47ae4d
Added config for js tests
dimittal Aug 5, 2024
4a42ad6
Merge branch 'integration' of https://github.com/DrDroidLab/PlayBooks…
jayeshsadhwani99 Aug 6, 2024
15a4233
add gh workflow
jayeshsadhwani99 Aug 6, 2024
b82870c
add gh workflow yml file
jayeshsadhwani99 Aug 6, 2024
72d242f
just test for frontend
jayeshsadhwani99 Aug 6, 2024
ad4b1dc
change node version
jayeshsadhwani99 Aug 6, 2024
5c6f2a0
give write permissions
jayeshsadhwani99 Aug 6, 2024
d895dd9
remove backend files
jayeshsadhwani99 Aug 6, 2024
493b767
Merge branch 'integration' of https://github.com/DrDroidLab/PlayBooks…
jayeshsadhwani99 Aug 7, 2024
654d735
Merge branch 'integration' of https://github.com/DrDroidLab/PlayBooks…
jayeshsadhwani99 Aug 7, 2024
c98bf8e
Merge branch 'main' of https://github.com/DrDroidLab/PlayBooks into @…
jayeshsadhwani99 Aug 8, 2024
51ac767
Merge branch 'main' of https://github.com/DrDroidLab/PlayBooks into @…
jayeshsadhwani99 Aug 12, 2024
2e18692
Merge branch 'integration' of https://github.com/DrDroidLab/PlayBooks…
jayeshsadhwani99 Aug 12, 2024
21053b3
change deploying after root directory preparation
jayeshsadhwani99 Aug 12, 2024
890a66f
add a coverage folder
jayeshsadhwani99 Aug 12, 2024
080f6ac
add backend coverage
jayeshsadhwani99 Aug 12, 2024
d6559d9
install system dependencies
jayeshsadhwani99 Aug 12, 2024
cce1c3a
always generate report and continue
jayeshsadhwani99 Aug 12, 2024
38de8af
echo links for reports at the end of actions
jayeshsadhwani99 Aug 12, 2024
5443129
sidebar modified with small animations
jayeshsadhwani99 Aug 12, 2024
9a0477e
sidebar animation added
jayeshsadhwani99 Aug 12, 2024
5301317
modify button
jayeshsadhwani99 Aug 12, 2024
7c6ad38
change height
jayeshsadhwani99 Aug 12, 2024
ce8968f
version info ui changes
jayeshsadhwani99 Aug 12, 2024
471d19c
Merge pull request #450 from DrDroidLab/@enhancement/minor-ui-improve…
jayeshsadhwani99 Aug 12, 2024
f9daec7
Merge pull request #451 from DrDroidLab/integration
dimittal Aug 12, 2024
6fcdce2
change input to multi line
jayeshsadhwani99 Aug 12, 2024
f5aa9a7
Merge pull request #452 from DrDroidLab/@hotfix/kubectl-cmd-input-type
dimittal Aug 12, 2024
a0a7276
Merge branch 'main' of https://github.com/DrDroidLab/PlayBooks into @…
jayeshsadhwani99 Aug 12, 2024
ea3fd61
add links to checks and comments
jayeshsadhwani99 Aug 12, 2024
1fefcc6
remove context varibaale
jayeshsadhwani99 Aug 12, 2024
658ff1b
checks addition
jayeshsadhwani99 Aug 12, 2024
99ead7f
try to comment
jayeshsadhwani99 Aug 12, 2024
71b8f93
enable testing
jayeshsadhwani99 Aug 12, 2024
833d3dd
change reports links
jayeshsadhwani99 Aug 12, 2024
d3969b1
Merge pull request #453 from DrDroidLab/@feature/better-link-visibility
dimittal Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sidebar modified with small animations
jayeshsadhwani99 committed Aug 12, 2024
commit 544312960c9e109de9b203bcaad5d830021421a7
6 changes: 3 additions & 3 deletions web/src/components/Sidebar/SidebarButtonElement.tsx
Original file line number Diff line number Diff line change
@@ -13,12 +13,12 @@ function SidebarButtonElement({
icon,
}: SidebarButtonElementProps) {
return (
<ListItemButton
<div
onClick={onClick}
className="!flex !justify-start !p-3 !gap-3">
className="flex gap-2 mx-2 px-2 py-1 items-center max-w-full rounded text-gray-500 hover:bg-gray-50 cursor-pointer">
<div className="text-gray-500">{icon}</div>
<p className="text-sm flex-1">{label}</p>
</ListItemButton>
</div>
);
}

27 changes: 21 additions & 6 deletions web/src/components/Sidebar/SidebarElement.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ListItemIcon } from "@mui/material";
import { ReactNode } from "react";
import { NavLink } from "react-router-dom";
import { NavLink, useLocation } from "react-router-dom";
import { motion } from "framer-motion";

type SidebarElementProps = {
to: string;
@@ -9,14 +9,29 @@ type SidebarElementProps = {
};

function SidebarElement({ to, label, icon }: SidebarElementProps) {
const activeStyle = ({ isActive }) => (isActive ? "activeNavLink" : "");
const location = useLocation();
const isActive = location.pathname === to;

return (
<NavLink className={activeStyle} to={to}>
<div className={`flex gap-3 items-center`}>
<div className="text-gray-500">{icon}</div>
<NavLink className="relative flex px-2 items-center" to={to}>
<div
className={`flex gap-2 py-1 pl-2 items-center w-full rounded ${
isActive
? "bg-violet-50 text-violet-500"
: "text-gray-500 hover:bg-gray-50"
}`}>
<div className="">{icon}</div>
<p className="text-sm">{label}</p>
</div>
{isActive && (
<motion.div
layoutId="sidebar-indicator"
className="absolute left-2 h-[70%] w-1 bg-violet-500 rounded"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.3 }}
/>
)}
</NavLink>
);
}
10 changes: 5 additions & 5 deletions web/src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -25,14 +25,14 @@ function Sidebar() {
<div className="flex w-full flex-col gap-0">
<HeadElement />

<List sx={{ padding: 0 }}>
<div className="flex flex-col gap-2 my-1">
{elements.map((element, index) => (
<SidebarElement key={index} {...element} />
))}
</List>
</div>
</div>

<List className="w-full">
<div className="flex flex-col gap-2 w-full">
<SidebarButtonElement
label="Join Slack Community"
icon={
@@ -51,10 +51,10 @@ function Sidebar() {
/>
<SidebarButtonElement
label="Logout"
icon={<LogoutRounded />}
icon={<LogoutRounded fontSize="small" />}
onClick={signOut}
/>
</List>
</div>

<SlackConnectOverlay isOpen={isActionOpen} toggleOverlay={toggle} />
</div>
8 changes: 4 additions & 4 deletions web/src/index.css
Original file line number Diff line number Diff line change
@@ -169,13 +169,13 @@ input[type="number"] {
-moz-appearance: textfield;
}

.sidebar a {
/* .sidebar a {
display: flex;
align-items: center;
padding: 0.5rem;
transition: all 0.2s;
}
} */

.sidebar a:hover {
/* .sidebar a:hover {
background-color: #f3f3f3;
}
} */