mirror of https://github.com/vector-im/riot-web
parent
f3ef9e6602
commit
d0fea745bb
|
@ -17,7 +17,9 @@ describe("<VerificationQRCode />", () => {
|
|||
});
|
||||
|
||||
it("renders a QR code", async () => {
|
||||
const { container, getAllByAltText } = render(<VerificationQRCode qrCodeBytes={Buffer.from("asd")} />);
|
||||
const { container, getAllByAltText } = render(
|
||||
<VerificationQRCode qrCodeBytes={new Uint8ClampedArray(Buffer.from("asd"))} />,
|
||||
);
|
||||
// wait for the spinner to go away
|
||||
await waitFor(() => getAllByAltText("QR Code").length === 1);
|
||||
expect(container).toMatchSnapshot();
|
||||
|
|
|
@ -46,7 +46,7 @@ describe("<VerificationPanel />", () => {
|
|||
const request = makeMockVerificationRequest({
|
||||
phase: Phase.Ready,
|
||||
});
|
||||
request.generateQRCode.mockResolvedValue(Buffer.from("test", "utf-8"));
|
||||
request.generateQRCode.mockResolvedValue(new Uint8ClampedArray(Buffer.from("test", "utf-8")));
|
||||
const container = renderComponent({
|
||||
request: request,
|
||||
layout: "dialog",
|
||||
|
@ -71,7 +71,7 @@ describe("<VerificationPanel />", () => {
|
|||
const request = makeMockVerificationRequest({
|
||||
phase: Phase.Ready,
|
||||
});
|
||||
request.generateQRCode.mockResolvedValue(Buffer.from("test", "utf-8"));
|
||||
request.generateQRCode.mockResolvedValue(new Uint8ClampedArray(Buffer.from("test", "utf-8")));
|
||||
const container = renderComponent({
|
||||
request: request,
|
||||
member: new User("@other:user"),
|
||||
|
|
Loading…
Reference in New Issue