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`] = ` +
+ #d4e5f6 opened + about 1 hour ago +
++ #a1b2c3 opened + about 1 hour ago + by Jane Doe +
++ #d4e5f6 opened + about 1 hour ago + by Bob +
++ #g7h8i9 opened + about 1 hour ago + by Alice +
++ #abc123 opened + about 1 hour ago + by + + Bob + +
++ #a1b2c3 opened + about 1 hour ago + by + + Jane Doe + +
+| + + | ++ + docs + + | + + +
| + + | ++ + src + + | + + +
| + + | ++ + .gitignore + + | + + +
| + + | ++ + package.json + + | + + +
| + + | ++ + README.md + + | + + +
| + + + + .. + + + | +|||
| + + | ++ + components + + | + + +||
| + + | ++ + index.ts + + | + + +||
+
+ line
+
+ 1
+
+
+line
+
+ 2
+
+
+line
+
+ 3
+
+
+... (truncated)
+
+
+
+ This is a paragraph with
+
+ bold
+
+ ,
+
+ italic
+
+ , and
+
+ inline code
+
+ .
+
+ + ++ + ++ This is a blockquote. +
+ + +
+ + A link + +
++ Here is a code block: +
+ + +
+
+ interface User {
+ id: string;
+ name: string;
+ email: string;
+}
+
+function greet(user: User): string {
+ return \`Hello, \${user.name}!\`;
+}
+
+
+
+ + 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. +
+| + Feature + | ++ Status + | ++ Priority + | +
|---|---|---|
| + Auth + | ++ Done + | ++ High + | +
| + Search + | ++ WIP + | ++ Medium + | +
| + Export + | ++ Todo + | ++ Low + | +
+ This is
+
+ deleted
+
+ text.
+
+ 🚀 🐛 ✨ +
++ Above +
+ ++ Below +
+