diff --git a/src/App.spec.tsx b/src/App.spec.tsx index 3b3a122..00b8147 100644 --- a/src/App.spec.tsx +++ b/src/App.spec.tsx @@ -1,5 +1,5 @@ import "./installSesLockdown.js"; -import { render, screen, within } from "@testing-library/react"; +import { render, screen } from "@testing-library/react"; import App from "./App"; import { ContextProviders } from "./contexts/providers.tsx"; @@ -37,12 +37,10 @@ describe("App.tsx", () => { , ); - const navElement = screen.getAllByRole("navigation")[0]; - const selectElement = within(navElement).getByRole("button", { - name: "Select", - expanded: false, + const selectElements = screen.getAllByRole("button", { + name: "Select Chain", }); - expect(selectElement).toBeTruthy(); + expect(selectElements.length).toBeGreaterThan(0); describe.todo("selecting value puts chain in pathname"); describe.todo("changing value resets the network dropdown value"); @@ -55,12 +53,10 @@ describe("App.tsx", () => { , ); - const navElement = screen.getAllByRole("navigation")[0]; - const selectElement = within(navElement).getByRole("button", { + const selectElements = screen.getAllByRole("button", { name: "Select Network", - expanded: false, }); - expect(selectElement).toBeTruthy(); + expect(selectElements.length).toBeGreaterThan(0); }); it("renders list of chains as tiles", async () => { @@ -87,5 +83,8 @@ describe("App.tsx", () => { const footerEl = await screen.findByRole("contentinfo"); expect(footerEl.querySelectorAll("a").length).toBe(3); + + const sponsoredText = await screen.findByText("Sponsored by"); + expect(sponsoredText).toBeTruthy(); }); }); diff --git a/src/components/DepositSection.tsx b/src/components/DepositSection.tsx index 8150609..c57ac50 100644 --- a/src/components/DepositSection.tsx +++ b/src/components/DepositSection.tsx @@ -55,7 +55,7 @@ export const DepositSection: React.FC = () => { className="block w-full rounded-md border-0 py-3 text-gray-900 shadow-sm ring-1 ring-inset ring-light placeholder:text-gray-400 focus:ring-1 focus:ring-inset focus:ring-red max-w-[250px]" /> -

+

= () => {
-

+
); diff --git a/src/components/LayoutFooter.tsx b/src/components/LayoutFooter.tsx index fe320e7..d087ffb 100644 --- a/src/components/LayoutFooter.tsx +++ b/src/components/LayoutFooter.tsx @@ -2,7 +2,7 @@ import { Footer } from "./Footer.tsx"; const LayoutFooter = () => { return ( -
+
@@ -56,7 +56,7 @@ const LayoutFooter = () => {
- + ); }; diff --git a/src/components/Nav.tsx b/src/components/Nav.tsx index c9aadf8..c50b837 100644 --- a/src/components/Nav.tsx +++ b/src/components/Nav.tsx @@ -26,14 +26,11 @@ const Nav = ({ title, showLogo, rightContent }: NavProps) => ( ) : null}

- -
- {title} -
+ + {title}