diff --git a/src/components/Copier/Copier.test.tsx b/src/components/Copier/Copier.test.tsx index d341668bf3..316561a58c 100644 --- a/src/components/Copier/Copier.test.tsx +++ b/src/components/Copier/Copier.test.tsx @@ -33,9 +33,9 @@ describe("Copier component test:", () => { ); // Expects the button to change appearance once clicked - expect(await screen.findByTitle("Copied!")).toBeInTheDocument(); + expect(await screen.findByLabelText(/copied/i)).toBeInTheDocument(); // Expects the button to revert back to it's original appearance - expect(await screen.findByTitle("Copy Address")).toBeInTheDocument(); + expect(await screen.findByLabelText(/copy address/i)).toBeInTheDocument(); }); }); diff --git a/src/components/Copier/Copier.tsx b/src/components/Copier/Copier.tsx index dbca135081..67cf01d3ab 100644 --- a/src/components/Copier/Copier.tsx +++ b/src/components/Copier/Copier.tsx @@ -16,22 +16,32 @@ export default function Copier({ text, classes, size, children }: Props) { const { handleCopy, copied } = useCopier(text); const { container, icon } = unpack(classes); return ( - );