@salesforce/ui-bundle-template-app-react-sample-b2e 12.5.4 → 12.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +16 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/package.json +4 -4
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/results/CmsResultRow.tsx +4 -2
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/results/DefaultResultRow.tsx +3 -1
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/results/__tests__/CmsResultRow.test.tsx +20 -1
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/results/__tests__/DefaultResultRow.test.tsx +46 -0
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [12.5.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.5...v12.5.6) (2026-09-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [12.5.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.4...v12.5.5) (2026-09-10)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [12.5.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.3...v12.5.4) (2026-09-09)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@salesforce/platform-sdk": "^12.5.
|
|
23
|
-
"@salesforce/ui-bundle": "^12.5.
|
|
22
|
+
"@salesforce/platform-sdk": "^12.5.6",
|
|
23
|
+
"@salesforce/ui-bundle": "^12.5.6",
|
|
24
24
|
"@tailwindcss/vite": "^4.1.17",
|
|
25
25
|
"class-variance-authority": "^0.7.1",
|
|
26
26
|
"clsx": "^2.1.1",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
48
48
|
"@graphql-tools/utils": "^11.0.0",
|
|
49
49
|
"@playwright/test": "^1.49.0",
|
|
50
|
-
"@salesforce/graphiti": "^12.5.
|
|
51
|
-
"@salesforce/vite-plugin-ui-bundle": "^12.5.
|
|
50
|
+
"@salesforce/graphiti": "^12.5.6",
|
|
51
|
+
"@salesforce/vite-plugin-ui-bundle": "^12.5.6",
|
|
52
52
|
"@testing-library/jest-dom": "^6.6.3",
|
|
53
53
|
"@testing-library/react": "^16.1.0",
|
|
54
54
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -73,10 +73,12 @@ export function CmsResultRow({ node, source }: CmsResultRowProps) {
|
|
|
73
73
|
<>
|
|
74
74
|
<span className="font-medium">{item.title ?? "—"}</span>
|
|
75
75
|
{item.highlightedSnippet && (
|
|
76
|
-
<p className="text-sm text-
|
|
76
|
+
<p className="text-sm text-neutral-600 dark:text-neutral-300">{item.highlightedSnippet}</p>
|
|
77
77
|
)}
|
|
78
78
|
{subtitleParts.length > 0 && (
|
|
79
|
-
<p className="text-sm text-
|
|
79
|
+
<p className="text-sm text-neutral-600 dark:text-neutral-300">
|
|
80
|
+
{subtitleParts.join(" · ")}
|
|
81
|
+
</p>
|
|
80
82
|
)}
|
|
81
83
|
</>
|
|
82
84
|
);
|
|
@@ -86,7 +86,9 @@ export function DefaultResultRow({ node, source }: DefaultResultRowProps) {
|
|
|
86
86
|
<>
|
|
87
87
|
<span className="font-medium">{title ?? "—"}</span>
|
|
88
88
|
{subtitleParts.length > 0 && (
|
|
89
|
-
<p className="text-sm text-
|
|
89
|
+
<p className="text-sm text-neutral-600 dark:text-neutral-300">
|
|
90
|
+
{subtitleParts.join(" · ")}
|
|
91
|
+
</p>
|
|
90
92
|
)}
|
|
91
93
|
</>
|
|
92
94
|
);
|
|
@@ -70,7 +70,8 @@ describe("CmsResultRow", () => {
|
|
|
70
70
|
p.textContent?.includes("This article covers"),
|
|
71
71
|
);
|
|
72
72
|
expect(snippet).toBeTruthy();
|
|
73
|
-
expect(snippet?.className).toContain("text-
|
|
73
|
+
expect(snippet?.className).toContain("text-neutral-600");
|
|
74
|
+
expect(snippet?.className).toContain("dark:text-neutral-300");
|
|
74
75
|
});
|
|
75
76
|
|
|
76
77
|
it("renders the snippet regardless of any q param", () => {
|
|
@@ -107,6 +108,24 @@ describe("CmsResultRow", () => {
|
|
|
107
108
|
});
|
|
108
109
|
});
|
|
109
110
|
|
|
111
|
+
describe("subtitle contrast (WCAG 2.2 SC 1.4.3)", () => {
|
|
112
|
+
it("renders subtitle and snippet with a contrast-safe class, not text-muted-foreground", () => {
|
|
113
|
+
const item: CmsSearchItem = {
|
|
114
|
+
...baseItem,
|
|
115
|
+
highlightedSnippet: "Snippet text.",
|
|
116
|
+
};
|
|
117
|
+
const container = renderWithRouter(<CmsResultRow node={item} source={source} />);
|
|
118
|
+
|
|
119
|
+
const paras = Array.from(container.querySelectorAll("p"));
|
|
120
|
+
expect(paras.length).toBeGreaterThan(0);
|
|
121
|
+
for (const p of paras) {
|
|
122
|
+
expect(p.className).toContain("text-neutral-600");
|
|
123
|
+
expect(p.className).toContain("dark:text-neutral-300");
|
|
124
|
+
expect(p.className).not.toContain("text-muted-foreground");
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
110
129
|
describe("link rendering", () => {
|
|
111
130
|
it("renders as a link when routePattern is configured", () => {
|
|
112
131
|
const container = renderWithRouter(<CmsResultRow node={baseItem} source={source} />, {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { describe, it, expect } from "vitest";
|
|
8
|
+
import { render } from "@testing-library/react";
|
|
9
|
+
import { MemoryRouter } from "react-router";
|
|
10
|
+
import { DefaultResultRow } from "../DefaultResultRow";
|
|
11
|
+
import type { SObjectSourceConfig } from "../../../types";
|
|
12
|
+
|
|
13
|
+
function renderWithRouter(ui: React.ReactElement) {
|
|
14
|
+
const { container } = render(<MemoryRouter>{ui}</MemoryRouter>);
|
|
15
|
+
return container;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const source = {
|
|
19
|
+
kind: "sobject",
|
|
20
|
+
key: "accounts",
|
|
21
|
+
objectName: "Account",
|
|
22
|
+
label: "Accounts",
|
|
23
|
+
idField: "Id",
|
|
24
|
+
routePattern: "/accounts/:id",
|
|
25
|
+
searchableFields: ["Name"],
|
|
26
|
+
displayFields: ["Name", "Industry"],
|
|
27
|
+
} as SObjectSourceConfig;
|
|
28
|
+
|
|
29
|
+
describe("DefaultResultRow subtitle contrast (WCAG 2.2 SC 1.4.3)", () => {
|
|
30
|
+
it("renders the subtitle with a contrast-safe class, not text-muted-foreground", () => {
|
|
31
|
+
const container = renderWithRouter(
|
|
32
|
+
<DefaultResultRow
|
|
33
|
+
node={{ Id: "001", Name: "Acme Corp", Industry: "Technology" }}
|
|
34
|
+
source={source}
|
|
35
|
+
/>,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const subtitle = Array.from(container.querySelectorAll("p")).find((p) =>
|
|
39
|
+
p.textContent?.includes("Technology"),
|
|
40
|
+
);
|
|
41
|
+
expect(subtitle).toBeTruthy();
|
|
42
|
+
expect(subtitle?.className).toContain("text-neutral-600");
|
|
43
|
+
expect(subtitle?.className).toContain("dark:text-neutral-300");
|
|
44
|
+
expect(subtitle?.className).not.toContain("text-muted-foreground");
|
|
45
|
+
});
|
|
46
|
+
});
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
-
"version": "12.5.
|
|
3
|
+
"version": "12.5.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
9
|
-
"version": "12.5.
|
|
9
|
+
"version": "12.5.6",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-xml-parser": "^5.9.3",
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-app-react-sample-b2e",
|
|
3
|
-
"version": "12.5.
|
|
3
|
+
"version": "12.5.6",
|
|
4
4
|
"description": "Salesforce sample property rental React app",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean": "rm -rf dist"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@salesforce/ui-bundle": "^12.5.
|
|
19
|
+
"@salesforce/ui-bundle": "^12.5.6",
|
|
20
20
|
"sonner": "^1.7.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|