diff --git a/webui2/src/components/bugs/IssueRow.test.tsx b/webui2/src/components/bugs/IssueRow.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..ff1afa31d572b1a455415015850af8b2d94b85c1 --- /dev/null +++ b/webui2/src/components/bugs/IssueRow.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./IssueRow.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`IssueRow/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/bugs/LabelBadge.test.tsx b/webui2/src/components/bugs/LabelBadge.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..125e61b5736e82756436ff6622004b5266ead5ed --- /dev/null +++ b/webui2/src/components/bugs/LabelBadge.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./LabelBadge.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`LabelBadge/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/bugs/StatusBadge.test.tsx b/webui2/src/components/bugs/StatusBadge.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..1c8ca50f030c5ffa53306e743b327e49f66b0d95 --- /dev/null +++ b/webui2/src/components/bugs/StatusBadge.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./StatusBadge.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`StatusBadge/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/bugs/__snapshots__/IssueRow.test.tsx.snap b/webui2/src/components/bugs/__snapshots__/IssueRow.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..a618fcd5bd78a6067f17fefb75586a9d66257178 --- /dev/null +++ b/webui2/src/components/bugs/__snapshots__/IssueRow.test.tsx.snap @@ -0,0 +1,444 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`IssueRow/ClosedIssue matches snapshot 1`] = ` +
+
+ +
+
+ + Add dark mode support + + + enhancement + +
+

+ #d4e5f6 opened + about 1 hour ago +

+
+
+ + 12 +
+
+
+`; + +exports[`IssueRow/List matches snapshot 1`] = ` +
+
+
+ +
+ +

+ #a1b2c3 opened + about 1 hour ago + by Jane Doe +

+
+
+ + 3 +
+
+
+ +
+
+ + Add dark mode support + + + enhancement + +
+

+ #d4e5f6 opened + about 1 hour ago + by Bob +

+
+
+
+ +
+ +

+ #g7h8i9 opened + about 1 hour ago + by Alice +

+
+
+ + 7 +
+
+
+
+`; + +exports[`IssueRow/NoLabelsNoComments matches snapshot 1`] = ` +
+
+ +
+ +

+ #abc123 opened + about 1 hour ago + by + + Bob + +

+
+
+
+`; + +exports[`IssueRow/OpenIssue matches snapshot 1`] = ` +
+
+ +
+
+ + Fix login page crash on empty email + + + bug + + + priority + +
+

+ #a1b2c3 opened + about 1 hour ago + by + + Jane Doe + +

+
+
+ + 3 +
+
+
+`; diff --git a/webui2/src/components/bugs/__snapshots__/LabelBadge.test.tsx.snap b/webui2/src/components/bugs/__snapshots__/LabelBadge.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..d54d2b8d284b79c91ecda074a6a7cbde2c387ca8 --- /dev/null +++ b/webui2/src/components/bugs/__snapshots__/LabelBadge.test.tsx.snap @@ -0,0 +1,90 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`LabelBadge/AllColors matches snapshot 1`] = ` +
+
+ + bug + + + enhancement + + + documentation + + + help wanted + + + wontfix + + + priority + +
+
+`; + +exports[`LabelBadge/Clickable matches snapshot 1`] = ` +
+ + feature + +
+`; + +exports[`LabelBadge/DarkBackground matches snapshot 1`] = ` +
+ + documentation + +
+`; + +exports[`LabelBadge/Default matches snapshot 1`] = ` +
+ + bug + +
+`; + +exports[`LabelBadge/LightBackground matches snapshot 1`] = ` +
+ + enhancement + +
+`; diff --git a/webui2/src/components/bugs/__snapshots__/StatusBadge.test.tsx.snap b/webui2/src/components/bugs/__snapshots__/StatusBadge.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..2c870df37bdc455d702d66c615bc17697efaea5a --- /dev/null +++ b/webui2/src/components/bugs/__snapshots__/StatusBadge.test.tsx.snap @@ -0,0 +1,67 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`StatusBadge/Closed matches snapshot 1`] = ` +
+ + + Closed + +
+`; + +exports[`StatusBadge/Open matches snapshot 1`] = ` +
+ + + Open + +
+`; diff --git a/webui2/src/components/code/CodeBreadcrumb.test.tsx b/webui2/src/components/code/CodeBreadcrumb.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e011e6291090bd52aa6119f8d476fd7f65a9bc14 --- /dev/null +++ b/webui2/src/components/code/CodeBreadcrumb.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./CodeBreadcrumb.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`CodeBreadcrumb/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/code/FileTree.test.tsx b/webui2/src/components/code/FileTree.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..0d8d6edbbe190461b6a3046c929c24ef42ea0341 --- /dev/null +++ b/webui2/src/components/code/FileTree.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./FileTree.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`FileTree/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/code/FileViewer.test.tsx b/webui2/src/components/code/FileViewer.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..92cfe25a9f7bac65d3ee3e284e48caea42a361b8 --- /dev/null +++ b/webui2/src/components/code/FileViewer.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./FileViewer.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`FileViewer/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/code/RefSelector.test.tsx b/webui2/src/components/code/RefSelector.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..3fbf1ef03434d96c0b884e2c7ebc506b72b90de5 --- /dev/null +++ b/webui2/src/components/code/RefSelector.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./RefSelector.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`RefSelector/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/code/__snapshots__/CodeBreadcrumb.test.tsx.snap b/webui2/src/components/code/__snapshots__/CodeBreadcrumb.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..52ffdcd17da96ea7567464673424002520f3a9de --- /dev/null +++ b/webui2/src/components/code/__snapshots__/CodeBreadcrumb.test.tsx.snap @@ -0,0 +1,305 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`CodeBreadcrumb/DeepPath matches snapshot 1`] = ` +
+
+ + git-bug + + + + + src + + + + + + components + + + + + + bugs + + + + + + timeline + + + + + + CommentItem.tsx + + + + @ + feature/auth + +
+
+`; + +exports[`CodeBreadcrumb/FilePath matches snapshot 1`] = ` +
+
+ + git-bug + + + + + src + + + + + + components + + + + + + ui + + + + + + button.tsx + + + + @ + main + +
+
+`; + +exports[`CodeBreadcrumb/RootPath matches snapshot 1`] = ` +
+
+ + git-bug + + + @ + main + +
+
+`; diff --git a/webui2/src/components/code/__snapshots__/FileTree.test.tsx.snap b/webui2/src/components/code/__snapshots__/FileTree.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..d4abc1467f3f2df6cbf9c8c93c646b70f6c0c980 --- /dev/null +++ b/webui2/src/components/code/__snapshots__/FileTree.test.tsx.snap @@ -0,0 +1,423 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`FileTree/RootDirectory matches snapshot 1`] = ` +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + docs + +
+ + + + src + +
+ + + + .gitignore + +
+ + + + package.json + +
+ + + + README.md + +
+
+
+`; + +exports[`FileTree/SubDirectory matches snapshot 1`] = ` +
+
+ + + + + + + + + + + + + + + + + + +
+ + + + .. + + +
+ + + + components + +
+ + + + index.ts + +
+
+
+`; diff --git a/webui2/src/components/code/__snapshots__/FileViewer.test.tsx.snap b/webui2/src/components/code/__snapshots__/FileViewer.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..0e53868cd9037a08ed4ba537ab24e690495d81b2 --- /dev/null +++ b/webui2/src/components/code/__snapshots__/FileViewer.test.tsx.snap @@ -0,0 +1,346 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`FileViewer/BinaryFile matches snapshot 1`] = ` +
+
+
+ + 0 + lines · + 24.0 KB + + +
+
+ Binary file — + 24.0 KB +
+
+
+`; + +exports[`FileViewer/Loading matches snapshot 1`] = ` +
+
+
+
+
+
+
+
+
+
+`; + +exports[`FileViewer/TruncatedFile matches snapshot 1`] = ` +
+
+
+ + 4 + lines · + 1.0 MB + · truncated + + +
+
+ +
+        
+          line 
+          
+            1
+          
+          
+line 
+          
+            2
+          
+          
+line 
+          
+            3
+          
+          
+... (truncated)
+        
+      
+
+
+
+`; + +exports[`FileViewer/TypeScriptFile matches snapshot 1`] = ` +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/webui2/src/components/code/__snapshots__/RefSelector.test.tsx.snap b/webui2/src/components/code/__snapshots__/RefSelector.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..d066c7408d427b11f3cc2865fdd1078d2455bbba --- /dev/null +++ b/webui2/src/components/code/__snapshots__/RefSelector.test.tsx.snap @@ -0,0 +1,187 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`RefSelector/BranchesOnly matches snapshot 1`] = ` +
+ +
+`; + +exports[`RefSelector/Default matches snapshot 1`] = ` +
+ +
+`; + +exports[`RefSelector/OnTag matches snapshot 1`] = ` +
+ +
+`; diff --git a/webui2/src/components/content/Markdown.test.tsx b/webui2/src/components/content/Markdown.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2d642da37b90ae1a52377c812d979a5884d1aeb3 --- /dev/null +++ b/webui2/src/components/content/Markdown.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./Markdown.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Markdown/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/content/__snapshots__/Markdown.test.tsx.snap b/webui2/src/components/content/__snapshots__/Markdown.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..b20ad4a5411364fdfab61627e2403ee48dd3a64d --- /dev/null +++ b/webui2/src/components/content/__snapshots__/Markdown.test.tsx.snap @@ -0,0 +1,413 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Markdown/BasicFormatting matches snapshot 1`] = ` +
+
+

+ Heading 1 + +

+ + +

+ Heading 2 + +

+ + +

+ Heading 3 + +

+ + +

+ This is a paragraph with + + bold + + , + + italic + + , and + + inline code + + . +

+ + +
    + + +
  • + Unordered list item 1 +
  • + + +
  • + Unordered list item 2 + +
      + + +
    • + Nested item +
    • + + +
    + + +
  • + + +
+ + +
    + + +
  1. + Ordered list item 1 +
  2. + + +
  3. + Ordered list item 2 +
  4. + + +
+ + +
+ + +

+ This is a blockquote. +

+ + +
+ + +
+ + +

+ + A link + +

+
+
+`; + +exports[`Markdown/CodeBlock matches snapshot 1`] = ` +
+
+

+ Here is a code block: +

+ + +
+      
+        interface User {
+  id: string;
+  name: string;
+  email: string;
+}
+
+function greet(user: User): string {
+  return \`Hello, \${user.name}!\`;
+}
+
+      
+    
+
+
+`; + +exports[`Markdown/Comment matches snapshot 1`] = ` +
+
+

+ Fixed the issue by updating the query builder. +

+ + +

+ The problem was that + + buildQuery() + + wasn't escaping special characters in label names containing spaces. +

+ + +
+      
+        - const q = \`label:\${name}\`;
++ const q = \`label:"\${name}"\`;
+
+      
+    
+ + +

+ Closes #42. +

+
+
+`; + +exports[`Markdown/GithubFlavored matches snapshot 1`] = ` +
+
+

+ Task list + +

+ + +
    + + +
  • + + Completed task +
  • + + +
  • + + Incomplete task +
  • + + +
  • + + Another task +
  • + + +
+ + +

+ Table + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Feature + + Status + + Priority +
+ Auth + + Done + + High +
+ Search + + WIP + + Medium +
+ Export + + Todo + + Low +
+ + +

+ Strikethrough + +

+ + +

+ This is + + deleted + + text. +

+ + +

+ Emoji + +

+ + +

+ 🚀 🐛 ✨ +

+
+
+`; diff --git a/webui2/src/components/ui/__snapshots__/avatar.test.tsx.snap b/webui2/src/components/ui/__snapshots__/avatar.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..9999b3598a0db079c08a38db9210ff54c20ee780 --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/avatar.test.tsx.snap @@ -0,0 +1,57 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Avatar/Large matches snapshot 1`] = ` +
+ + + CN + + +
+`; + +exports[`Avatar/Small matches snapshot 1`] = ` +
+ + + AB + + +
+`; + +exports[`Avatar/WithFallback matches snapshot 1`] = ` +
+ + + JD + + +
+`; + +exports[`Avatar/WithImage matches snapshot 1`] = ` +
+ + + CN + + +
+`; diff --git a/webui2/src/components/ui/__snapshots__/badge.test.tsx.snap b/webui2/src/components/ui/__snapshots__/badge.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..071202c3fd7c6bc163d757dd3cd7d8dc59848290 --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/badge.test.tsx.snap @@ -0,0 +1,41 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Badge/Default matches snapshot 1`] = ` +
+
+ Badge +
+
+`; + +exports[`Badge/Destructive matches snapshot 1`] = ` +
+
+ Destructive +
+
+`; + +exports[`Badge/Outline matches snapshot 1`] = ` +
+
+ Outline +
+
+`; + +exports[`Badge/Secondary matches snapshot 1`] = ` +
+
+ Secondary +
+
+`; diff --git a/webui2/src/components/ui/__snapshots__/input.test.tsx.snap b/webui2/src/components/ui/__snapshots__/input.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..30885d314672e89505f692c5663c1154446a50a5 --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/input.test.tsx.snap @@ -0,0 +1,39 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Input/Default matches snapshot 1`] = ` +
+ +
+`; + +exports[`Input/Disabled matches snapshot 1`] = ` +
+ +
+`; + +exports[`Input/Password matches snapshot 1`] = ` +
+ +
+`; + +exports[`Input/WithValue matches snapshot 1`] = ` +
+ +
+`; diff --git a/webui2/src/components/ui/__snapshots__/query-input.test.tsx.snap b/webui2/src/components/ui/__snapshots__/query-input.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..3421de7555fdcaa2957bec4b94d00cc4d2ebb148 --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/query-input.test.tsx.snap @@ -0,0 +1,266 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`QueryInput/AsyncCompletions matches snapshot 1`] = ` +
+
+
+ +
+ +
+`; + +exports[`QueryInput/Default matches snapshot 1`] = ` +
+
+
+ +
+ + +
+
+`; + +exports[`QueryInput/SyntaxOnly matches snapshot 1`] = ` +
+
+
+ +
+ + +
+
+`; + +exports[`QueryInput/WithFilters matches snapshot 1`] = ` +
+
+
+ +
+ + +
+
+`; diff --git a/webui2/src/components/ui/__snapshots__/separator.test.tsx.snap b/webui2/src/components/ui/__snapshots__/separator.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..66dbdd59abca171cd4e4a0752e85c480f06f650b --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/separator.test.tsx.snap @@ -0,0 +1,49 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Separator/Horizontal matches snapshot 1`] = ` +
+
+

+ Above +

+
+

+ Below +

+
+
+`; + +exports[`Separator/Vertical matches snapshot 1`] = ` +
+
+ + Left + +
+ + Right + +
+
+`; diff --git a/webui2/src/components/ui/__snapshots__/skeleton.test.tsx.snap b/webui2/src/components/ui/__snapshots__/skeleton.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..e73eead707d45fa69d8ff44af2f83f1cb3d4d0e1 --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/skeleton.test.tsx.snap @@ -0,0 +1,39 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Skeleton/Card matches snapshot 1`] = ` +
+
+
+
+
+
+
+
+
+`; + +exports[`Skeleton/Circle matches snapshot 1`] = ` +
+
+
+`; + +exports[`Skeleton/Default matches snapshot 1`] = ` +
+
+
+`; diff --git a/webui2/src/components/ui/__snapshots__/status-tabs.test.tsx.snap b/webui2/src/components/ui/__snapshots__/status-tabs.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..e55762d983c2334eee8d445483a68ab8c9090d99 --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/status-tabs.test.tsx.snap @@ -0,0 +1,76 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`StatusTabs/Default matches snapshot 1`] = ` +
+
+ + +
+
+`; diff --git a/webui2/src/components/ui/__snapshots__/textarea.test.tsx.snap b/webui2/src/components/ui/__snapshots__/textarea.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..23fc03004b1fc7944aa9c8afd73af4d120475878 --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/textarea.test.tsx.snap @@ -0,0 +1,30 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Textarea/Default matches snapshot 1`] = ` +
+ +
+`; diff --git a/webui2/src/components/ui/__snapshots__/write-preview.test.tsx.snap b/webui2/src/components/ui/__snapshots__/write-preview.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..db8073ee64f4d3568816144aed62d103c57c750b --- /dev/null +++ b/webui2/src/components/ui/__snapshots__/write-preview.test.tsx.snap @@ -0,0 +1,86 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`WritePreview/Controlled matches snapshot 1`] = ` +
+
+
+ + +
+ +
+
+`; diff --git a/webui2/src/components/ui/avatar.test.tsx b/webui2/src/components/ui/avatar.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..fed8e7d078279af90c96b59cb31e1e13fc10a273 --- /dev/null +++ b/webui2/src/components/ui/avatar.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./avatar.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Avatar/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/badge.test.tsx b/webui2/src/components/ui/badge.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..bb317870314d8839749fc2b6d706af13f4888cc4 --- /dev/null +++ b/webui2/src/components/ui/badge.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./badge.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Badge/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/input.test.tsx b/webui2/src/components/ui/input.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..9db660a42b6b4b61b5cf220027582fab730e03e8 --- /dev/null +++ b/webui2/src/components/ui/input.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./input.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Input/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/query-input.test.tsx b/webui2/src/components/ui/query-input.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..7c457b126c5c0a92ebc4540808409310ba2c2c4c --- /dev/null +++ b/webui2/src/components/ui/query-input.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./query-input.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`QueryInput/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/separator.test.tsx b/webui2/src/components/ui/separator.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..63c3566e3f5cc2d049ad56aa8ddb1324d11ae8d2 --- /dev/null +++ b/webui2/src/components/ui/separator.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./separator.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Separator/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/skeleton.test.tsx b/webui2/src/components/ui/skeleton.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..ca0f5fb28518a642141eb97cd4ab2f9bf793d952 --- /dev/null +++ b/webui2/src/components/ui/skeleton.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./skeleton.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Skeleton/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/status-tabs.test.tsx b/webui2/src/components/ui/status-tabs.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..8d23089426fa9d1e1745b00e0ad3dcb91f81f5cf --- /dev/null +++ b/webui2/src/components/ui/status-tabs.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./status-tabs.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`StatusTabs/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/textarea.test.tsx b/webui2/src/components/ui/textarea.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..12fd1309ddd2b3b0c192a5641e85ab7f68c0d61e --- /dev/null +++ b/webui2/src/components/ui/textarea.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./textarea.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Textarea/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/ui/write-preview.test.tsx b/webui2/src/components/ui/write-preview.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..648e23d95ec851dcdc1fcd0b56f65a6383bd8e63 --- /dev/null +++ b/webui2/src/components/ui/write-preview.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./write-preview.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`WritePreview/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +}