AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): Make clickable area bigger (#9080)
Aarushi71310a1b4906
diff --git a/autogpt_platform/frontend/src/components/agptui/NavbarLink.tsx b/autogpt_platform/frontend/src/components/agptui/NavbarLink.tsxindex 25b59ff986..8d4094b40c 100644--- a/autogpt_platform/frontend/src/components/agptui/NavbarLink.tsx+++ b/autogpt_platform/frontend/src/components/agptui/NavbarLink.tsx@@ -20,34 +20,34 @@ export const NavbarLink = ({ name, href }: NavbarLinkProps) => {const activeLink = "/" + (parts.length > 2 ? parts[2] : parts[1]);return (- <div- className={`h-[48px] px-5 py-4 ${- activeLink === href- ? "rounded-2xl bg-neutral-800 dark:bg-neutral-200"- : ""- } flex items-center justify-start gap-3`}- >- {href === "/store" && (- <IconShoppingCart- className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}- />- )}- {href === "/build" && (- <IconBoxes- className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}- />- )}- {href === "/monitor" && (- <IconLaptop- className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}- />- )}- {href === "/monitoring" && (- <IconLibrary- className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}- />- )}- <Link href={href}>+ <Link href={href} data-testid={`navbar-link-${name.toLowerCase()}`}>+ <div+ className={`h-[48px] px-5 py-4 ${+ activeLink === href+ ? "rounded-2xl bg-neutral-800 dark:bg-neutral-200"+ : ""+ } flex items-center justify-start gap-3`}+ >+ {href === "/store" && (+ <IconShoppingCart+ className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}+ />+ )}+ {href === "/build" && (+ <IconBoxes+ className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}+ />+ )}+ {href === "/monitor" && (+ <IconLaptop+ className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}+ />+ )}+ {href === "/monitoring" && (+ <IconLibrary+ className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}+ />+ )}<divclassName={`font-poppins text-[20px] font-medium leading-[28px] ${activeLink === href@@ -57,7 +57,7 @@ export const NavbarLink = ({ name, href }: NavbarLinkProps) => {>{name}</div>- </Link>- </div>+ </div>+ </Link>);};diff --git a/autogpt_platform/frontend/src/tests/pages/navbar.page.ts b/autogpt_platform/frontend/src/tests/pages/navbar.page.tsindex b95c852059..8ef56353eb 100644--- a/autogpt_platform/frontend/src/tests/pages/navbar.page.ts+++ b/autogpt_platform/frontend/src/tests/pages/navbar.page.ts@@ -9,15 +9,15 @@ export class NavBar {}async clickMonitorLink() {- await this.page.getByRole("link", { name: "Library" }).click();+ await this.page.getByTestId("navbar-link-library").click();}async clickBuildLink() {- await this.page.locator('a[href="/build"] div').click();+ await this.page.getByTestId("navbar-link-build").click();}async clickMarketplaceLink() {- await this.page.locator('a[href="/store"]').click();+ await this.page.getByTestId("navbar-link-marketplace").click();}async getUserMenuButton() {@@ -25,7 +25,7 @@ export class NavBar {}async clickUserMenu() {- await this.page.getByTestId("profile-popout-menu-trigger").click();+ await (await this.getUserMenuButton()).click();}async logout() {@@ -35,7 +35,9 @@ export class NavBar {async isLoggedIn(): Promise<boolean> {try {- await this.page.getByTestId("profile-popout-menu-trigger").waitFor({+ await (+ await this.getUserMenuButton()+ ).waitFor({state: "visible",timeout: 10_000,});