mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-06-22 04:11:55 +10:00
fix: ensure Atlas Cloud sponsor logo links to website (#3170)
Prevent the sponsor logo images from intercepting clicks so the anchor reliably opens atlascloud.ai in a new tab instead of the SVG asset. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
@@ -33,12 +33,19 @@ describe("Sponsors", () => {
|
||||
expect(link).toHaveAttribute("rel", "noopener noreferrer");
|
||||
});
|
||||
|
||||
it("renders the full Atlas Cloud logo", () => {
|
||||
const { getByAltText } = renderSponsors(true);
|
||||
it("renders the full Atlas Cloud logo inside the sponsor link", () => {
|
||||
const { container, getByRole } = renderSponsors(true);
|
||||
|
||||
const logo = getByAltText("Atlas Cloud");
|
||||
expect(logo).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-black.svg");
|
||||
expect(logo).toHaveClass("h-20");
|
||||
const link = getByRole("link", { name: "Atlas Cloud" });
|
||||
const logos = container.querySelectorAll("a[aria-label='Atlas Cloud'] img");
|
||||
|
||||
expect(logos).toHaveLength(2);
|
||||
expect(logos[0]).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-black.svg");
|
||||
expect(logos[0]).toHaveClass("h-20", "pointer-events-none");
|
||||
expect(logos[0]).toHaveAttribute("draggable", "false");
|
||||
expect(logos[1]).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-white.svg");
|
||||
expect(link).toContainElement(logos[0] as HTMLElement);
|
||||
expect(link).toContainElement(logos[1] as HTMLElement);
|
||||
});
|
||||
|
||||
it("thanks sponsors and links sponsorship inquiries to email", () => {
|
||||
|
||||
@@ -28,18 +28,23 @@ export const Sponsors = ({ show }: SponsorsProps) => {
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Atlas Cloud"
|
||||
className="mt-12 block"
|
||||
className="mt-12 inline-block"
|
||||
>
|
||||
<span className="sr-only">Atlas Cloud</span>
|
||||
<img
|
||||
src="/sponsors/atlas-cloud-logo-black.svg"
|
||||
alt="Atlas Cloud"
|
||||
className="h-20 w-auto md:h-24 dark:hidden"
|
||||
alt=""
|
||||
aria-hidden="true"
|
||||
draggable={false}
|
||||
className="pointer-events-none h-20 w-auto md:h-24 dark:hidden"
|
||||
loading="lazy"
|
||||
/>
|
||||
<img
|
||||
src="/sponsors/atlas-cloud-logo-white.svg"
|
||||
alt=""
|
||||
className="hidden h-20 w-auto md:h-24 dark:block"
|
||||
aria-hidden="true"
|
||||
draggable={false}
|
||||
className="pointer-events-none hidden h-20 w-auto md:h-24 dark:block"
|
||||
loading="lazy"
|
||||
/>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user