@pega/sdk 0.0.13 → 0.0.15
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/README.md +46 -6
- package/dist/index.js +50 -24
- package/package.json +42 -3
- package/templates/angular-sdk-reference/extra-webpack.config.cjs +23 -0
- package/templates/angular-sdk-reference/index.html +12 -0
- package/templates/angular-sdk-reference/src/app/pconnect-renderer.component.ts +153 -0
- package/templates/angular-sdk-reference/src/components/component-map.ts +90 -0
- package/templates/angular-sdk-reference/src/components/fields/auto-complete/auto-complete.component.ts +304 -0
- package/templates/angular-sdk-reference/src/components/fields/checkbox/checkbox.component.ts +89 -0
- package/templates/angular-sdk-reference/src/components/fields/currency/currency.component.ts +112 -0
- package/templates/angular-sdk-reference/src/components/fields/date-input/date-input.component.ts +101 -0
- package/templates/angular-sdk-reference/src/components/fields/dropdown/dropdown.component.ts +118 -0
- package/templates/angular-sdk-reference/src/components/fields/email/email.component.ts +104 -0
- package/templates/angular-sdk-reference/src/components/fields/integer/integer.component.ts +106 -0
- package/templates/angular-sdk-reference/src/components/fields/phone/phone.component.ts +104 -0
- package/templates/angular-sdk-reference/src/components/fields/radio-buttons/radio-buttons.component.ts +113 -0
- package/templates/angular-sdk-reference/src/components/fields/text-area/text-area.component.ts +111 -0
- package/templates/angular-sdk-reference/src/components/fields/text-input/text-input.component.ts +110 -0
- package/templates/angular-sdk-reference/src/components/fields/url-input/url-input.component.ts +113 -0
- package/templates/angular-sdk-reference/src/components/helpers/sdk-helpers.ts +93 -0
- package/templates/angular-sdk-reference/src/components/infra/assignment/assignment.component.ts +206 -0
- package/templates/angular-sdk-reference/src/components/infra/case-summary/case-summary.component.ts +75 -0
- package/templates/angular-sdk-reference/src/components/infra/case-view/case-view.component.ts +126 -0
- package/templates/angular-sdk-reference/src/components/infra/flow-container/flow-container.component.ts +411 -0
- package/templates/angular-sdk-reference/src/components/infra/reference/reference.component.ts +158 -0
- package/templates/angular-sdk-reference/src/components/infra/region/region.component.ts +39 -0
- package/templates/angular-sdk-reference/src/components/infra/root-container/root-container.component.ts +199 -0
- package/templates/angular-sdk-reference/src/components/infra/stages/stages.component.ts +89 -0
- package/templates/angular-sdk-reference/src/components/infra/view/view.component.ts +144 -0
- package/templates/angular-sdk-reference/src/components/infra/view-container/view-container.component.ts +191 -0
- package/templates/angular-sdk-reference/src/components/templates/default-form/default-form.component.ts +105 -0
- package/templates/angular-sdk-reference/src/components/templates/narrow-wide/narrow-wide.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/one-column/one-column.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/two-column/two-column.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/wide-narrow/wide-narrow.component.ts +37 -0
- package/templates/angular-sdk-reference/tsconfig.app.json +13 -0
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +75 -34
- package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +74 -38
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +33 -1
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +57 -22
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +25 -10
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +40 -19
- package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +62 -1
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +26 -4
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +84 -33
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +46 -26
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +28 -15
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-infra-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/identify-components.md +2 -0
- package/templates/react-sdk-reference/.ai-common/prompts/replace-design-system.md +44 -17
- package/templates/react-sdk-reference/.ai-common/skills/connect-pega-server.md +14 -1
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AssignmentHeader.md +79 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Toast.md +96 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +56 -35
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +29 -3
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +97 -37
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +91 -60
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +88 -30
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +133 -101
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedData.md +385 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedDataMulti.md +506 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +549 -86
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +181 -83
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +13 -1
- package/templates/react-sdk-reference/.ai-common/skills/portal-flow/run-and-verify-portal.md +290 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +13 -1
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +125 -153
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +90 -81
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +13 -1
- package/templates/react-sdk-reference/assets/icons/trash.svg +3 -0
- package/templates/react-sdk-reference/index.html +0 -1
- package/templates/react-sdk-reference/package.json +2 -2
- package/templates/react-sdk-reference/package.minimal.json +2 -2
- package/templates/react-sdk-reference/sdk-config.json +3 -3
- package/templates/react-sdk-reference/src/FallbackComponent.tsx +1 -1
- package/templates/react-sdk-reference/src/MashupApp.tsx +33 -78
- package/templates/react-sdk-reference/src/PortalApp.tsx +23 -100
- package/templates/react-sdk-reference/src/components/component-map.ts +15 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/AssignmentHeader.tsx +15 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +1 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +1 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +16 -4
- package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/ModalDialog.tsx +26 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/Toast.tsx +35 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +362 -24
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +3 -1
- package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +6 -3
- package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +4 -3
- package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +2 -0
- package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/EmbeddedDataMulti.tsx +121 -0
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +40 -20
- package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +554 -49
- package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +111 -20
- package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +4 -3
- package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +1 -1
- package/templates/react-sdk-reference/src/components/helpers/field-utils.ts +44 -0
- package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +19 -7
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/DataViewActionButtons.tsx +97 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +53 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +3 -1
- package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +4 -4
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +1 -1
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +7 -3
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +173 -99
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +63 -56
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +1 -1
- package/templates/react-sdk-reference/vite.config.ts +26 -4
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +0 -47
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +0 -50
- package/templates/react-sdk-reference/.ai-common/instructions/infra-component.md +0 -76
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +0 -43
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +0 -45
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +0 -311
- package/templates/react-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
# Skill: Run and Verify the Portal
|
|
2
|
+
|
|
3
|
+
Prove that the generated portal actually runs — by building it, signing in, opening every page, walking a case to its end, and comparing the result with the same portal running on the Pega server — and repair what breaks.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
A passing build is not a working portal. A portal can compile cleanly and still show a placeholder instead of its header, a blank widget, a broken case step, or a form whose layout drifts from Pega's. This skill closes that gap so the user is not the one who discovers the failure.
|
|
10
|
+
|
|
11
|
+
Use this at the end of every portal flow, after the calling prompt's build step passes. It is the terminal step of that prompt.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Rules for this skill
|
|
16
|
+
|
|
17
|
+
**Portal projects only.** This skill verifies an application that renders a full Pega portal. If the project instead hosts an embedded case flow inside an existing application, use `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration{{SKILL_EXT}}` and stop here.
|
|
18
|
+
|
|
19
|
+
**Resolve, never assume.** Every command comes from the project — its script manifest, its toolchain configuration, its own output. Do not assume a package manager, a framework, a build tool, a port, a route, or a script name. If a needed capability has no script entry, derive the invocation from the tool the project already depends on rather than adding a script.
|
|
20
|
+
|
|
21
|
+
**Assert behaviour, not implementation.** The stages below describe _what must be true_. Write the checks in whatever form suits the project. Do not treat any wording here as a template to transcribe.
|
|
22
|
+
|
|
23
|
+
**Never handle credentials.** A human signs in, in a browser window you open. Credentials are never requested, captured, logged, echoed, or written to any file by the agent, in any stage, under any failure condition.
|
|
24
|
+
|
|
25
|
+
**Tell the user where you are, in plain words.** Announce each stage as it starts, counting only the stages that run — "Trying it out — part 4 of 7: Checking every page". Use these names: Stage 1 "Checking the code", Stage 2 "Opening your app", Stage 3 "Signing in", Stage 4 "Checking every page", Stage 5 "Walking through a case", Stage 6 "Comparing with your Pega portal", Stage 7 "Fixing what failed".
|
|
26
|
+
|
|
27
|
+
**You run every stage yourself, in this conversation.** Start right after the build passes, without asking first. Open the browser, drive the portal, check the results, and repair what fails. The human's only parts are signing in, answering the case question in Stage 5, and supplying a value a case step needs that you cannot invent. Never hand a stage back to the user and end your turn, and never ask them to open the portal in their own browser to try it.
|
|
28
|
+
|
|
29
|
+
**Never lighten a stage.** Do not replace a stage with a smaller or cheaper check because the run is long, the component count is large, or a stage needs a human for a moment. Stop early only for the reasons listed in [Stopping early](#stopping-early).
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Inputs from the calling prompt
|
|
34
|
+
|
|
35
|
+
Use whatever the calling prompt hands over; none of it is required.
|
|
36
|
+
|
|
37
|
+
- **The generated components**, and for each one the landing page or case type it came from — used for the coverage report in Stage 4
|
|
38
|
+
- **The portal** chosen from the server — used in Stage 1 and Stage 6
|
|
39
|
+
- **The case types** the user selected — used in Stage 5 instead of asking which ones to try
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Stage 1 — Static gates
|
|
44
|
+
|
|
45
|
+
No browser, no credentials.
|
|
46
|
+
|
|
47
|
+
1. **Production build.** Resolve and run the project's production build.
|
|
48
|
+
2. **Type check.** Run the project's type-check entry point. If it has none, invoke the type checker the project already depends on in a no-emit mode using the project's own compiler configuration. Do not add a script entry for this.
|
|
49
|
+
3. **Lint.** If the project has a lint entry point, run it over every file the calling prompt created or edited and fix every error in those files. If many still remain after one repair pass, list them grouped by rule and ask the user whether to keep fixing or to continue with them noted in the summary. If the project has no lint entry point, note that and move on.
|
|
50
|
+
4. **Configuration coherence.** Read the served SDK configuration file and assert that the Pega server address and `portalClientId` are present and non-empty, and that `appPortal` is set. When the calling prompt chose a portal from the server, assert `appPortal` equals that portal's value. An empty `portalClientId` makes the redirect sign-in hang with no network activity and no error.
|
|
51
|
+
|
|
52
|
+
All of these must pass before continuing, apart from lint errors the user chose to note rather than fix.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Stage 2 — Pre-authentication browser checks
|
|
57
|
+
|
|
58
|
+
### Choosing a browser driver
|
|
59
|
+
|
|
60
|
+
Use either of these, in this order of preference:
|
|
61
|
+
|
|
62
|
+
1. A browser automation library already present in the project's dependency manifest.
|
|
63
|
+
2. Your AI tool's own browser control, if it has one that can show a window the human can sign in to and keep watching the page while they do.
|
|
64
|
+
|
|
65
|
+
Only when neither is available, add a browser automation library as a development dependency. Ask before adding it, in plain words — "I need a browser-testing tool to try the portal. Can I add one to your project?" If the user declines, stop per [Stopping early](#stopping-early).
|
|
66
|
+
|
|
67
|
+
### Starting the application
|
|
68
|
+
|
|
69
|
+
Start the project's development server and **discover its address from the server's own startup output**. Do not assume a port. Find the route that renders the portal from the project's own router or entry module — the route whose root starts the Pega runtime in portal mode.
|
|
70
|
+
|
|
71
|
+
If the Pega server named in the SDK configuration is unreachable from this environment, stop here. Report that verification is limited to Stage 1, state which host could not be reached, and do not present the run as a failure of the portal.
|
|
72
|
+
|
|
73
|
+
### Checking the Pega server accepts this application's address
|
|
74
|
+
|
|
75
|
+
Run the same CORS preflight check as `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration{{SKILL_EXT}}`, Stage 2 — an `OPTIONS` request with no credentials, the application's real origin as `Origin`, against the SDK's bootstrap API path. If it fails, stop before Stage 3 and report it as a server setting — see [What must only be reported](#what-must-only-be-reported).
|
|
76
|
+
|
|
77
|
+
### Checks
|
|
78
|
+
|
|
79
|
+
Load the portal route **in the browser** and assert:
|
|
80
|
+
|
|
81
|
+
1. The route renders — no server-render failure, no error overlay
|
|
82
|
+
2. The browser console and page-error channels are clean; collect anything that appears
|
|
83
|
+
3. The SDK configuration file, the runtime shell (`/constellation/bootstrap-shell.js`), and the library manifest (`/constellation/lib_asset.json`) resolve as JSON, a script, and JSON — **not as the application's HTML**
|
|
84
|
+
4. The page navigates to the Pega sign-in page. If Pega answers with an error about the redirect address instead, that is a server setting — report it, never change the application for it
|
|
85
|
+
|
|
86
|
+
Fetching the route over plain HTTP is a useful quick pre-check, but it never satisfies this stage.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Stage 3 — Authentication handoff
|
|
91
|
+
|
|
92
|
+
The portal signs in by redirecting the whole window to Pega and back.
|
|
93
|
+
|
|
94
|
+
1. Run the browser in a mode the human can see and interact with
|
|
95
|
+
2. When the Pega sign-in page appears, print a clear, unmissable instruction — for example: "Please sign in to Pega in the window that just opened. I'll carry on by myself once you're signed in."
|
|
96
|
+
3. Wait for the window to return to the application's origin and the portal to move past its loading state, with a timeout generous enough for a person to find credentials and complete any second factor. Keep waiting in this same turn
|
|
97
|
+
4. Persist the browser session state afterwards to `.pega-verify/` at the project root, so later runs may skip this stage
|
|
98
|
+
|
|
99
|
+
⚠️ **The saved file contains live session tokens.** Before writing it, add an ignore rule for `.pega-verify/` to the project's version-control ignore file and confirm the rule is in place. Never commit the file, and never print its contents.
|
|
100
|
+
|
|
101
|
+
Session-state reuse is best-effort. If Pega asks to sign in again, run this stage again — that is not a failure. **At least one full pass must start from a session with no saved state**, because only a first sign-in exercises the redirect and the return to the portal.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Stage 4 — Checking every page
|
|
106
|
+
|
|
107
|
+
### The portal frame
|
|
108
|
+
|
|
109
|
+
Assert the frame the portal draws around every page is present: the header, the application name or logo, the signed-in user's initials or avatar, and the navigation. A placeholder in place of any of these is a missing frame component — see the fallback check below.
|
|
110
|
+
|
|
111
|
+
### Every page
|
|
112
|
+
|
|
113
|
+
Open the home page, then every page in the portal's navigation, one by one, using the navigation itself. On each page assert:
|
|
114
|
+
|
|
115
|
+
1. **No fallback markers.** An element carrying the `data-pega-fallback` attribute is a placeholder for a component the runtime requested but could not resolve; the attribute's value names it. If the project's fallback component predates that attribute, look for a block showing a bare component name followed by a dump of its properties. Assert there are none
|
|
116
|
+
2. **Console clean.** No errors, including a "maximum update depth" error or any other sign of a render loop
|
|
117
|
+
3. **No failed Pega calls.** No Pega API request answered with a 4xx or 5xx status, and no single request repeated over and over
|
|
118
|
+
4. **No endless loading.** Every loading indicator resolves
|
|
119
|
+
5. **No broken images.** Every image on the page loaded
|
|
120
|
+
6. **No raw values on screen.** No visible text such as `@L`, `@P`, `undefined`, `null`, or `[object Object]`
|
|
121
|
+
7. **Widgets show something.** Every widget shows its data or its own empty state — never a blank box
|
|
122
|
+
8. **The look checks hold** — see [Look checks](#look-checks)
|
|
123
|
+
|
|
124
|
+
After the last page, reload the portal and assert it returns to the portal without asking to sign in again and without a redirect loop.
|
|
125
|
+
|
|
126
|
+
### Coverage
|
|
127
|
+
|
|
128
|
+
When the calling prompt handed over where each generated component came from, report every generated component whose page was never opened, or whose case type is not walked in Stage 5, as **not exercised**. Not exercised is a gap in the run, not a failure.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Stage 5 — Walking through a case
|
|
133
|
+
|
|
134
|
+
### Choosing the case types
|
|
135
|
+
|
|
136
|
+
- If the calling prompt passed the case types the user selected, use those.
|
|
137
|
+
- Otherwise, read the case types the portal offers — its Create menu or its quick-create tiles — and ask the user, as a checkbox list, which ones to walk through. Allow choosing none.
|
|
138
|
+
|
|
139
|
+
Ask once, in the same question, for consent: "This creates real test cases on your Pega server." If the user chooses none or declines, mark this stage **not run** with that reason.
|
|
140
|
+
|
|
141
|
+
### For each chosen case type
|
|
142
|
+
|
|
143
|
+
1. **Start it from the portal.** Use the portal's own create entry — the Create menu or a quick-create tile — never a direct API call. Assert the first step renders with its title, its fields, and its action buttons, and no fallback markers
|
|
144
|
+
2. **Check validation once.** On the first step, submit with a required field empty and assert the validation message appears. Run the [Look checks](#look-checks) with the message showing
|
|
145
|
+
3. **Fill the step.** Fill every visible required field with a plausible test value: valid for the field's type and format, the first available option for a list, today's date for a date. Never use real personal data. Assert each value is still there after the field loses focus
|
|
146
|
+
4. **Submit and follow the case.** After each submit, the portal shows one of three things:
|
|
147
|
+
- **The next form opens directly** (perform mode) — the next assignment is yours. Fill it and continue
|
|
148
|
+
- **The case opens in review mode with an assignment that offers a Go button** — the next assignment is routed elsewhere. Select Go and continue
|
|
149
|
+
- **A confirmation, or the case shows as resolved** — the case is complete
|
|
150
|
+
5. **Check read-only screens.** Wherever the case shows entered values back — review screens, summaries, the confirmation — assert they show what was entered, not empty slots
|
|
151
|
+
6. **Run the look checks on every step** — see [Look checks](#look-checks)
|
|
152
|
+
|
|
153
|
+
Stop a case early, record where it stopped and why, and continue with the next case type when:
|
|
154
|
+
|
|
155
|
+
- No Go action is offered, or the server refuses access to the next assignment
|
|
156
|
+
- A step needs a file or a specific value you cannot invent. Ask the user once for it; if they cannot supply it, stop that case
|
|
157
|
+
- The case has passed twenty steps without completing
|
|
158
|
+
|
|
159
|
+
After every case type, return to the home page and continue.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Stage 6 — Comparing with your Pega portal
|
|
164
|
+
|
|
165
|
+
Open the same portal on the Pega server, in a second window of the same browser: `{infinityRestServerUrl}/app/{appAlias}/`, using both values from the SDK configuration. Confirm it is the same portal by its application name and navigation. If `appAlias` is empty, or the portal that opens is a different one, ask the user for the address they normally open this portal from. If Pega asks to sign in, run the Stage 3 handoff in that window.
|
|
166
|
+
|
|
167
|
+
Compare every page opened in Stage 4, and the first step of every case type walked in Stage 5, at the **same viewport width** in both windows — first at a desktop width, then at the narrow width used by the look checks.
|
|
168
|
+
|
|
169
|
+
### Content must match
|
|
170
|
+
|
|
171
|
+
The application name, the navigation labels and their order, page headings, the widgets on each page, the case types offered for creation, and for each case step its title, field labels and their order, and action button labels. A difference that comes from a generated component dropping or adding something is a defect — repair it per Stage 7. A difference that comes from data — counts, dates, list contents — is reported only.
|
|
172
|
+
|
|
173
|
+
### Layout must match
|
|
174
|
+
|
|
175
|
+
Pair each element in the generated portal with the same element in the Pega portal by its visible label or text: fields, section headings, widgets, and action buttons. Elements that exist on only one side are already covered by the content check — skip them here.
|
|
176
|
+
|
|
177
|
+
- **Structure — must match.** The number of columns in each region, which fields share a row, the order of widgets on a page, and which side the action buttons sit on. A difference is a defect — repair it per Stage 7
|
|
178
|
+
- **Gaps — must be within tolerance.** Measure the gap between each pair of neighbours — field to field, label to input, section to section, widget to widget, button to button — on both sides. The tolerance is the larger of 4px and 25% of Pega's gap. A gap outside the tolerance is a defect — repair it per Stage 7 and measure again. A gap inside it is reported only
|
|
179
|
+
- **Sizes and widths — report only.** List each difference with both values
|
|
180
|
+
|
|
181
|
+
### Visual differences — report only
|
|
182
|
+
|
|
183
|
+
Capture side-by-side screenshots of each compared page and step, and list differences in font size, colour, border, and corner radius with both values. These come from the chosen design system and are never forced.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Look checks
|
|
188
|
+
|
|
189
|
+
Run these on every page in Stage 4 and every case step in Stage 5, first at a desktop width and then at a narrow width of about 375px.
|
|
190
|
+
|
|
191
|
+
- **Must match — one font family and one base text colour across the whole portal,** and both equal to the values the design system's theme sets. Generated components inherit both, so a difference is a defect — repair it per Stage 7
|
|
192
|
+
- **Must hold:**
|
|
193
|
+
- No two visible elements overlap
|
|
194
|
+
- Nothing is wider than its area, so no horizontal scrolling appears
|
|
195
|
+
- Fields in the same column share a left edge
|
|
196
|
+
- At the narrow width, multi-column layouts stack into one column and the navigation collapses into a menu
|
|
197
|
+
- The header never covers page content
|
|
198
|
+
- Action buttons are fully visible and not clipped
|
|
199
|
+
|
|
200
|
+
A failure is a defect — repair it per Stage 7
|
|
201
|
+
|
|
202
|
+
- **Report only:** font sizes, accent colours, borders, corner radius, and spacing, each with its measured value. Gaps are enforced only by the comparison in Stage 6
|
|
203
|
+
- **Quick accessibility checks — report only:** every input has a visible or programmatic label, keyboard focus is visible, and the action buttons can be reached with the keyboard
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Stage 7 — Triage and repair
|
|
208
|
+
|
|
209
|
+
### What may be fixed
|
|
210
|
+
|
|
211
|
+
Only code the calling prompt generated or edited, the component map, and the design system's provider and global styles.
|
|
212
|
+
|
|
213
|
+
| Symptom | Cause | Fix |
|
|
214
|
+
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
215
|
+
| A fallback marker appears | The named component is absent from the registry | Add the registry entry, generating the component if it does not exist |
|
|
216
|
+
| Type or lint failure in a generated component | Generated code does not satisfy the project's toolchain | Correct the generated file |
|
|
217
|
+
| A widget is blank, or a page or step stays loading | A generated component reads the wrong input or skips its own empty state | Correct the generated component against its skill file |
|
|
218
|
+
| A value is lost after the field loses focus | The generated field holds local state without committing it | Correct the commit inside the generated field |
|
|
219
|
+
| Different font family or base text colour | A generated component sets its own, or the design system's provider or global styles are missing | Remove the override, or add the provider or global styles |
|
|
220
|
+
| Elements overlap, overflow, or misalign, or fail to stack when narrow | A generated field adds its own margins, fixed sizes, or positioning, or a layout template stacks incorrectly | Correct the generated field or layout template |
|
|
221
|
+
| Column count, row grouping, widget order, or button side differs from Pega | A generated layout template arranges its children differently from its skill file | Correct the generated layout template |
|
|
222
|
+
| A gap differs from Pega's by more than the tolerance | A generated layout template or field sets the wrong spacing | Correct the spacing using the design system's spacing tokens; use a fixed pixel value only when the design system has no spacing tokens |
|
|
223
|
+
| A label, heading, or button from Pega is missing or extra | A generated component drops or adds content | Correct the generated component against its skill file |
|
|
224
|
+
|
|
225
|
+
After every fix, run Stage 1 again, then re-run the check that failed.
|
|
226
|
+
|
|
227
|
+
### What must only be reported
|
|
228
|
+
|
|
229
|
+
**Never fix these. Stop and hand back.**
|
|
230
|
+
|
|
231
|
+
- Anything requiring credentials or server configuration — the server address, the application alias, the client identifier, the portal name, a case type that does not exist, authorization refused
|
|
232
|
+
- **A Pega CORS policy that does not allow this application's address.** Report it exactly as `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration{{SKILL_EXT}}` describes under "What must only be reported", including the plain message for the user
|
|
233
|
+
- **A redirect address the Pega server does not accept** for this client. Tell the user, in plain words, to ask their Pega administrator to add the application's address to that client's allowed redirect addresses
|
|
234
|
+
- Case routing, permissions, and server-side validation or data rules
|
|
235
|
+
- Images or other files the Pega server itself fails to serve
|
|
236
|
+
- Anything in the SDK adapter package, the authentication or bootstrap code, or the event helper module. Report the file, the symptom, and the likely cause
|
|
237
|
+
- Any visual difference beyond the must-match and must-hold checks above
|
|
238
|
+
|
|
239
|
+
### The loop
|
|
240
|
+
|
|
241
|
+
Fix, re-run the stage that failed, continue. Cap the number of repair cycles at three attempts per failing check. On exhausting the cap, or on reaching any report-only class, hand back with the captured evidence and a specific diagnosis rather than continuing to try variations.
|
|
242
|
+
|
|
243
|
+
Capture a screenshot and the collected console output for every failed check, and store them in `.pega-verify/`.
|
|
244
|
+
|
|
245
|
+
### Stopping early
|
|
246
|
+
|
|
247
|
+
Stop before Stage 4 has run only for one of these reasons, and always finish with the verification summary:
|
|
248
|
+
|
|
249
|
+
- The Pega server is unreachable from this environment (Stage 2)
|
|
250
|
+
- The Pega server does not allow this application's address, or does not accept its redirect address (Stage 2, or after sign-in)
|
|
251
|
+
- No browser can be used: the tool's own browser cannot show the sign-in and the user declined adding a browser automation library
|
|
252
|
+
- The sign-in was not completed before the Stage 3 timeout
|
|
253
|
+
- A report-only failure was reached, or the repair cap was exhausted
|
|
254
|
+
|
|
255
|
+
Anything else — the run being long, many pages, many components, a stage needing a human for a moment — is not a reason to stop.
|
|
256
|
+
|
|
257
|
+
### Signing off
|
|
258
|
+
|
|
259
|
+
After everything else, sign out through the portal's own menu and assert the window returns to the Pega sign-in page. Report the result; do not repair it.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Verification summary
|
|
264
|
+
|
|
265
|
+
Always finish by reporting, whatever the outcome:
|
|
266
|
+
|
|
267
|
+
- Which stages ran and which passed — mark each stage **passed**, **fixed**, or **not run**, with the reason for any stage not run
|
|
268
|
+
- The pages opened, and each case type walked with how far it got and why it stopped, if it stopped early
|
|
269
|
+
- Every fix applied, with the file and the reason
|
|
270
|
+
- The components not exercised
|
|
271
|
+
- The report-only differences from Stage 6 and the look checks, with the screenshots' location
|
|
272
|
+
- Everything that needs the user or their Pega administrator, stated as a concrete action
|
|
273
|
+
- The furthest stage reached, so "done" is never ambiguous between _generated_ and _verified_. If Stage 4 or Stage 5 did not run, say plainly "**Not verified yet**", give the reason, and say what the user can do next
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Common failures in portals
|
|
278
|
+
|
|
279
|
+
| Symptom | Cause |
|
|
280
|
+
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
281
|
+
| A placeholder named `AppShell` instead of the header and navigation | The portal frame components were not generated or not registered |
|
|
282
|
+
| The header shows but the navigation or Create menu is empty | The frame component keeps its own copy of the page or case type list instead of passing its inputs through |
|
|
283
|
+
| Stuck on loading after sign-in, with a CORS error on a Pega call | The Pega CORS policy for the most specific matching endpoint does not list the application's origin — a server setting |
|
|
284
|
+
| Pega shows an error about the redirect address instead of the sign-in | The application's address is not an allowed redirect address for the client — a server setting |
|
|
285
|
+
| Sign-in hangs with no network activity | `portalClientId` is empty |
|
|
286
|
+
| A different portal opens | `appPortal` does not match the portal chosen from the server |
|
|
287
|
+
| A widget is a blank box | The widget's data request failed, or the generated widget skips its empty state |
|
|
288
|
+
| Broken image icons on tiles or in the header | The image address is built wrongly by a generated component, or the Pega server does not serve that image |
|
|
289
|
+
| Fields line up in a different number of columns from Pega | The generated layout template ignores its column configuration |
|
|
290
|
+
| Gaps between fields or sections are visibly tighter or looser than Pega | The generated layout template or field sets its own spacing instead of the design system's spacing tokens |
|
|
@@ -48,7 +48,7 @@ This pattern is design-system agnostic — the grid/flex section must be replace
|
|
|
48
48
|
>
|
|
49
49
|
> **Use plain CSS grid** (`display: grid; grid-template-columns; width: 100%`) for all layout templates. The `templateCol` input value (e.g., `'1fr 1fr'`, `'2fr 1fr'`) maps directly to `grid-template-columns`. Do NOT use DS grid components — they may have max-width constraints.
|
|
50
50
|
|
|
51
|
-
**1. Check the component-specific skill file** — `{{SKILL_DIR}}/template-skills/<ComponentName
|
|
51
|
+
**1. Check the component-specific skill file** — `{{SKILL_DIR}}/template-skills/<ComponentName>{{SKILL_EXT}}` contains a **Design System Mapping** section where available. Use it as a starting point.
|
|
52
52
|
|
|
53
53
|
**2. If the chosen design system is not covered** — use the **component purpose** description to identify the appropriate DS layout primitive (grid, flex, columns).
|
|
54
54
|
|
|
@@ -109,6 +109,18 @@ Used for: CaseView, DefaultPage, ObjectPage, AppShell, Confirmation
|
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
112
|
+
## Visual Preservation
|
|
113
|
+
|
|
114
|
+
When replacing an existing implementation, the replacement must look the same as the original:
|
|
115
|
+
|
|
116
|
+
1. **Read the component's companion style file first** (for example a `.css` file in its folder). Note every class's visual intent — spacing, sizing, colours, and layout.
|
|
117
|
+
2. Reproduce that intent through the new design system's layout inputs, inline styles, or by keeping the style import — whichever gives the closest match.
|
|
118
|
+
3. Never silently drop legacy layout utility classes — map each one to an equivalent style, keeping column gaps, padding, and alignment.
|
|
119
|
+
|
|
120
|
+
In the embedded flow there is no original to preserve: the customer's look, recorded in the Design Profile, decides instead.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
112
124
|
## Rendering Children
|
|
113
125
|
|
|
114
126
|
Templates use three patterns to render child components:
|