Update tests

This commit is contained in:
adilallo
2025-09-30 15:30:02 -06:00
parent b15f913a14
commit e11f333915
63 changed files with 55920 additions and 7 deletions
+35
View File
@@ -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/"
}
]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+38
View File
@@ -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
}
}
]
+3 -5
View File
@@ -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)$/);
});
});
});
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 KiB

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 KiB

After

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 KiB

After

Width:  |  Height:  |  Size: 608 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 KiB

After

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 574 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 KiB

After

Width:  |  Height:  |  Size: 613 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 KiB

After

Width:  |  Height:  |  Size: 607 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

After

Width:  |  Height:  |  Size: 608 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 KiB

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 KiB

After

Width:  |  Height:  |  Size: 633 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 778 KiB

After

Width:  |  Height:  |  Size: 779 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 KiB

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 KiB

After

Width:  |  Height:  |  Size: 331 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 574 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 56 KiB

+1 -1
View File
@@ -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");
+7 -1
View File
@@ -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", () => {