fix(blog): expose author role and bound FAQ heading extraction
Deploy Canina / deploy (push) Successful in 10m28s

This commit is contained in:
Canina Engineering authored and devops committed 2026-10-25 08:19:44 +00:00
1 parent 0ab2980ff4
commit 13dceaa460
4 files changed
+32 -3

No files matched your search

@@ -119,6 +119,14 @@ describe("BlogPostClient Component", () => {
expect(document.querySelectorAll("time[datetime]").length).toBe(2);
});
it("displays an explicit author role without inventing one for older articles", () => {
const props = { sanitizedContent: mockBlog.content, publishedDate: "۱۴۰۵/۸/۳", authorName: "کارشناس کنینا" };
const { rerender } = render(<BlogPostClient {...props} blog={{ ...mockBlog, authorRole: "پژوهش مراقبت گوش و نگهداری ایمن" }} />);
expect(screen.getByText("نقش نویسنده: پژوهش مراقبت گوش و نگهداری ایمن")).toBeInTheDocument();
rerender(<BlogPostClient {...props} blog={{ ...mockBlog, authorRole: " " }} />);
expect(screen.queryByText(/نقش نویسنده:/)).not.toBeInTheDocument();
});
it("registers blog view count on mount via API", async () => {
render(
<BlogPostClient