Update tests
@@ -0,0 +1,35 @@
|
||||
[
|
||||
{
|
||||
"name": "minScore",
|
||||
"expected": 0.8,
|
||||
"actual": 0.74,
|
||||
"values": [
|
||||
0.72,
|
||||
0.74,
|
||||
0.67
|
||||
],
|
||||
"operator": ">=",
|
||||
"passed": false,
|
||||
"auditProperty": "performance",
|
||||
"auditId": "categories",
|
||||
"level": "warn",
|
||||
"url": "http://127.0.0.1:3010/"
|
||||
},
|
||||
{
|
||||
"name": "maxNumericValue",
|
||||
"expected": 5000,
|
||||
"actual": 6335.710300000001,
|
||||
"values": [
|
||||
6443.5928,
|
||||
6335.710300000001,
|
||||
6894.002000000002
|
||||
],
|
||||
"operator": "<=",
|
||||
"passed": false,
|
||||
"auditId": "interactive",
|
||||
"level": "warn",
|
||||
"url": "http://127.0.0.1:3010/",
|
||||
"auditTitle": "Time to Interactive",
|
||||
"auditDocumentationLink": "https://developer.chrome.com/docs/lighthouse/performance/interactive/"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"url": "http://127.0.0.1:3010/",
|
||||
"isRepresentativeRun": false,
|
||||
"htmlPath": "/Users/Vinod/Documents/GitHub/community-rule/lhci-results/127_0_0_1--2025_09_30_21_09_10.report.html",
|
||||
"jsonPath": "/Users/Vinod/Documents/GitHub/community-rule/lhci-results/127_0_0_1--2025_09_30_21_09_10.report.json",
|
||||
"summary": {
|
||||
"performance": 0.74,
|
||||
"accessibility": 0.87,
|
||||
"best-practices": 1,
|
||||
"seo": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "http://127.0.0.1:3010/",
|
||||
"isRepresentativeRun": false,
|
||||
"htmlPath": "/Users/Vinod/Documents/GitHub/community-rule/lhci-results/127_0_0_1--2025_09_30_21_09_25.report.html",
|
||||
"jsonPath": "/Users/Vinod/Documents/GitHub/community-rule/lhci-results/127_0_0_1--2025_09_30_21_09_25.report.json",
|
||||
"summary": {
|
||||
"performance": 0.67,
|
||||
"accessibility": 0.87,
|
||||
"best-practices": 1,
|
||||
"seo": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "http://127.0.0.1:3010/",
|
||||
"isRepresentativeRun": true,
|
||||
"htmlPath": "/Users/Vinod/Documents/GitHub/community-rule/lhci-results/127_0_0_1--2025_09_30_21_08_52.report.html",
|
||||
"jsonPath": "/Users/Vinod/Documents/GitHub/community-rule/lhci-results/127_0_0_1--2025_09_30_21_08_52.report.json",
|
||||
"summary": {
|
||||
"performance": 0.72,
|
||||
"accessibility": 0.87,
|
||||
"best-practices": 1,
|
||||
"seo": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -166,9 +166,7 @@ test.describe("Header responsive behavior", () => {
|
||||
|
||||
// Should have outline and brand color
|
||||
expect(linkStyles.outline).not.toBe("none");
|
||||
expect(linkStyles.outlineColor).toContain(
|
||||
"var(--color-content-default-brand-primary)"
|
||||
);
|
||||
expect(linkStyles.outlineColor).toContain("254, 252, 201"); // RGB value of #fefcc9
|
||||
});
|
||||
|
||||
test("home page does not show active state for learn navigation", async ({
|
||||
@@ -188,8 +186,8 @@ test.describe("Header responsive behavior", () => {
|
||||
};
|
||||
});
|
||||
|
||||
// Should not have active outline
|
||||
expect(linkStyles.outline).toBe("none");
|
||||
// Should not have active outline (may have default browser outline)
|
||||
expect(linkStyles.outline).toMatch(/^(none|0px|rgb\(0, 0, 0\) none 0px|rgb\(0, 0, 0\) 0px)$/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 263 KiB After Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 527 KiB After Width: | Height: | Size: 506 KiB |
|
Before Width: | Height: | Size: 690 KiB After Width: | Height: | Size: 652 KiB |
|
Before Width: | Height: | Size: 349 KiB After Width: | Height: | Size: 343 KiB |
|
Before Width: | Height: | Size: 620 KiB After Width: | Height: | Size: 608 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 532 KiB After Width: | Height: | Size: 533 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 573 KiB After Width: | Height: | Size: 574 KiB |
|
Before Width: | Height: | Size: 613 KiB After Width: | Height: | Size: 613 KiB |
|
Before Width: | Height: | Size: 634 KiB After Width: | Height: | Size: 607 KiB |
|
Before Width: | Height: | Size: 632 KiB After Width: | Height: | Size: 608 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 291 KiB After Width: | Height: | Size: 341 KiB |
|
Before Width: | Height: | Size: 633 KiB After Width: | Height: | Size: 633 KiB |
|
Before Width: | Height: | Size: 778 KiB After Width: | Height: | Size: 779 KiB |
|
Before Width: | Height: | Size: 573 KiB After Width: | Height: | Size: 573 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 465 KiB After Width: | Height: | Size: 464 KiB |
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
|
Before Width: | Height: | Size: 330 KiB After Width: | Height: | Size: 331 KiB |
|
Before Width: | Height: | Size: 344 KiB After Width: | Height: | Size: 330 KiB |
|
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 345 KiB |
|
Before Width: | Height: | Size: 573 KiB After Width: | Height: | Size: 574 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 56 KiB |
@@ -227,7 +227,7 @@ describe("ContentBanner", () => {
|
||||
|
||||
// Should use thumbnail.horizontal for md+ breakpoint
|
||||
const mdBackgroundDiv = document.querySelector(
|
||||
"div[style*='test-article-horizontal.svg']"
|
||||
"div[style*='test-article-horizontal.svg'][class*='md:block']"
|
||||
);
|
||||
expect(mdBackgroundDiv).toBeInTheDocument();
|
||||
expect(mdBackgroundDiv).toHaveClass("hidden", "md:block");
|
||||
|
||||
@@ -85,7 +85,13 @@ describe("Blog Post Validation", () => {
|
||||
};
|
||||
|
||||
const sanitized = sanitizeBlogPost(post);
|
||||
expect(sanitized).toEqual(post);
|
||||
// The sanitized version will have null values for optional fields that weren't provided
|
||||
expect(sanitized).toEqual({
|
||||
...post,
|
||||
thumbnail: null,
|
||||
banner: null,
|
||||
background: null,
|
||||
});
|
||||
});
|
||||
|
||||
it("should add default values for missing optional fields", () => {
|
||||
|
||||