Fix failing tests
CI Pipeline / test (20) (pull_request) Successful in 2m28s
CI Pipeline / test (18) (pull_request) Successful in 2m36s
CI Pipeline / e2e (chromium) (pull_request) Successful in 3m41s
CI Pipeline / e2e (firefox) (pull_request) Successful in 3m55s
CI Pipeline / e2e (webkit) (pull_request) Successful in 4m10s
CI Pipeline / visual-regression (pull_request) Failing after 4m25s
CI Pipeline / storybook (pull_request) Successful in 1m33s
CI Pipeline / performance (pull_request) Successful in 2m31s
CI Pipeline / lint (pull_request) Successful in 1m2s
CI Pipeline / build (pull_request) Successful in 1m28s
@@ -1 +1 @@
|
|||||||
84350
|
68063
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ const mockPost = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const mockSlugOrder = ["sample-article", "another-article", "third-article"];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Components/ContentThumbnailTemplate",
|
title: "Components/ContentThumbnailTemplate",
|
||||||
component: ContentThumbnailTemplate,
|
component: ContentThumbnailTemplate,
|
||||||
@@ -28,9 +30,8 @@ export default {
|
|||||||
description: "Blog post object with frontmatter",
|
description: "Blog post object with frontmatter",
|
||||||
},
|
},
|
||||||
slugOrder: {
|
slugOrder: {
|
||||||
control: "number",
|
control: "object",
|
||||||
description:
|
description: "Array of slugs for consistent background cycling",
|
||||||
"Order index for cycling through different background and icon styles",
|
|
||||||
},
|
},
|
||||||
variant: {
|
variant: {
|
||||||
control: { type: "select" },
|
control: { type: "select" },
|
||||||
@@ -43,7 +44,7 @@ export default {
|
|||||||
export const Vertical = {
|
export const Vertical = {
|
||||||
args: {
|
args: {
|
||||||
post: mockPost,
|
post: mockPost,
|
||||||
slugOrder: 0,
|
slugOrder: mockSlugOrder,
|
||||||
variant: "vertical",
|
variant: "vertical",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -51,23 +52,23 @@ export const Vertical = {
|
|||||||
export const Horizontal = {
|
export const Horizontal = {
|
||||||
args: {
|
args: {
|
||||||
post: mockPost,
|
post: mockPost,
|
||||||
slugOrder: 0,
|
slugOrder: mockSlugOrder,
|
||||||
variant: "horizontal",
|
variant: "horizontal",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SecondStyle = {
|
export const SecondStyle = {
|
||||||
args: {
|
args: {
|
||||||
post: mockPost,
|
post: { ...mockPost, slug: "another-article" },
|
||||||
slugOrder: 1,
|
slugOrder: mockSlugOrder,
|
||||||
variant: "vertical",
|
variant: "vertical",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ThirdStyle = {
|
export const ThirdStyle = {
|
||||||
args: {
|
args: {
|
||||||
post: mockPost,
|
post: { ...mockPost, slug: "third-article" },
|
||||||
slugOrder: 2,
|
slugOrder: mockSlugOrder,
|
||||||
variant: "vertical",
|
variant: "vertical",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -83,7 +84,7 @@ export const LongContent = {
|
|||||||
"This is a longer description that tests how the component handles extended text content and ensures proper wrapping and display within the thumbnail.",
|
"This is a longer description that tests how the component handles extended text content and ensures proper wrapping and display within the thumbnail.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slugOrder: 0,
|
slugOrder: mockSlugOrder,
|
||||||
variant: "vertical",
|
variant: "vertical",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -380,6 +380,15 @@ test.describe("Visual Regression Tests", () => {
|
|||||||
// Navigate to blog listing page
|
// Navigate to blog listing page
|
||||||
await page.goto("/blog");
|
await page.goto("/blog");
|
||||||
await page.waitForLoadState("networkidle");
|
await page.waitForLoadState("networkidle");
|
||||||
|
|
||||||
|
// Wait for blog content to be fully rendered
|
||||||
|
await page.waitForSelector(
|
||||||
|
".grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3",
|
||||||
|
{ timeout: 10000 },
|
||||||
|
);
|
||||||
|
|
||||||
|
// Additional wait for any dynamic content to render
|
||||||
|
await page.waitForTimeout(1000);
|
||||||
await settle(page);
|
await settle(page);
|
||||||
|
|
||||||
// Take full page screenshot of blog listing
|
// Take full page screenshot of blog listing
|
||||||
@@ -393,6 +402,12 @@ test.describe("Visual Regression Tests", () => {
|
|||||||
// Navigate to a specific blog post
|
// Navigate to a specific blog post
|
||||||
await page.goto("/blog/resolving-active-conflicts");
|
await page.goto("/blog/resolving-active-conflicts");
|
||||||
await page.waitForLoadState("networkidle");
|
await page.waitForLoadState("networkidle");
|
||||||
|
|
||||||
|
// Wait for blog post content to be fully rendered
|
||||||
|
await page.waitForSelector("main", { timeout: 10000 });
|
||||||
|
|
||||||
|
// Additional wait for any dynamic content to render
|
||||||
|
await page.waitForTimeout(1000);
|
||||||
await settle(page);
|
await settle(page);
|
||||||
|
|
||||||
// Take full page screenshot of blog post
|
// Take full page screenshot of blog post
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 263 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 250 KiB |
@@ -77,7 +77,7 @@ describe("Layout Integration", () => {
|
|||||||
const aboutLink = aboutLinks[0];
|
const aboutLink = aboutLinks[0];
|
||||||
|
|
||||||
expect(useCasesLink).toHaveAttribute("href", "#");
|
expect(useCasesLink).toHaveAttribute("href", "#");
|
||||||
expect(learnLink).toHaveAttribute("href", "#");
|
expect(learnLink).toHaveAttribute("href", "/learn");
|
||||||
expect(aboutLink).toHaveAttribute("href", "#");
|
expect(aboutLink).toHaveAttribute("href", "#");
|
||||||
|
|
||||||
// Test button interactions
|
// Test button interactions
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ describe("Header", () => {
|
|||||||
extraPadding: true,
|
extraPadding: true,
|
||||||
});
|
});
|
||||||
expect(navigationItems[1]).toEqual({
|
expect(navigationItems[1]).toEqual({
|
||||||
href: "#",
|
href: "/learn",
|
||||||
text: "Learn",
|
text: "Learn",
|
||||||
});
|
});
|
||||||
expect(navigationItems[2]).toEqual({
|
expect(navigationItems[2]).toEqual({
|
||||||
|
|||||||