From 90690f21ba5ef50b255d76b8aabdc11b3f562c6c Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Tue, 23 Apr 2024 09:52:38 -0400 Subject: [PATCH] Snapshot testing --- .../addons/tests/AddOnListItem.test.ts | 2 + .../__snapshots__/AddOnListItem.test.ts.snap | 315 ++++++++++++++++++ 2 files changed, 317 insertions(+) create mode 100644 src/lib/components/addons/tests/__snapshots__/AddOnListItem.test.ts.snap diff --git a/src/lib/components/addons/tests/AddOnListItem.test.ts b/src/lib/components/addons/tests/AddOnListItem.test.ts index c8f19b013..b3a1c2d7e 100644 --- a/src/lib/components/addons/tests/AddOnListItem.test.ts +++ b/src/lib/components/addons/tests/AddOnListItem.test.ts @@ -6,6 +6,8 @@ import { addon, premiumAddon } from "@/test/fixtures/addons"; test("AddOnListItem", () => { const result = render(AddOnListItem, { addon }); expect(result.getByRole("heading")).toHaveTextContent(addon.name); + expect(result.container).toMatchSnapshot(); const premium = render(AddOnListItem, { addon: premiumAddon }); expect(premium.getByRole("status")).toHaveTextContent("Premium"); + expect(premium.container).toMatchSnapshot(); }); diff --git a/src/lib/components/addons/tests/__snapshots__/AddOnListItem.test.ts.snap b/src/lib/components/addons/tests/__snapshots__/AddOnListItem.test.ts.snap new file mode 100644 index 000000000..b716b20e9 --- /dev/null +++ b/src/lib/components/addons/tests/__snapshots__/AddOnListItem.test.ts.snap @@ -0,0 +1,315 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`AddOnListItem 1`] = ` + +
+ +
+ + +
+ This will update document information for all documents in your current search. Please be sure you have edit access to these documents before running this add-on. +
+
+ + +
+ +`; + +exports[`AddOnListItem 2`] = ` + +
+ +
+ + +
+ This will update document information for all documents in your current search. Please be sure you have edit access to these documents before running this add-on. +
+
+ + +
+
+ +
+ + +
+

+ This Add-On uses Azure’s Document Intelligence API to OCR documents. The document(s) must be public to be processed. This Add-On uses 1 AI Credit per page. +

+
+
+ + +
+ +`;