A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.
PCF testing
PCF work is done only when the evidence matches the claim. Build-green is useful; it is not proof that the control imports, binds or renders in the target host.
Sources: debugging custom controls, best practices, paging, refresh, solution checker.
Evidence levels
| Level | Meaning | Typical proof |
|---|---|---|
built |
Production build completed locally. | pcf-build.js or equivalent production build output. |
gated |
All pcf-gates.js gates passed, including manifest, host, source, lint, unit tests and the production build. |
pcf-gates.js JSON or test output. |
registered |
Dataverse has the expected custom control and manifest version. | Registration read-back after push/import. |
bound(draft) |
Draft form or grid metadata contains the expected binding. | verify-pcf.js draft read. |
bound(published) |
Published metadata contains the expected binding. | Published layer read after publish. |
runtime-verified |
The target host loaded the control and the required user journey worked. | Browser/Playwright/manual smoke with outcome recorded. |
If a run stops at metadata, report runtime-not-checked. Do not round it up.
verify-pcf.js treats clients as the required client set to prove. Omitted clients default to web, but an explicit empty or whitespace-only intent client list is invalid because it cannot prove control identity or parameter binding for any client.
Test pyramid
Unit tests
Unit tests cover pure rendering, parsing, adapters and state transitions without depending on the PCF host.
- Test missing parameter objects,
security.readable=false,security.editable=false, null values and permission failures. - Test two instances on one page: no shared singleton state or duplicate ids.
- Test current-record recipes with missing
entityIdas an unsaved-record disabled state. - For lookup outputs, assert the
LookupValue[]shape, and an empty array[]as the clear value:undefinedreads as no new value and can leave the previous lookup in place. - For grid customizers, assert renderers return elements or
null/undefined, and never mutate grid data.
Harness tests
The browser harness is fast for visual and input iteration. Learn documents important limitations: WebAPI, paging, sorting, filtering, complex datatypes, model-driven field security, selection and navigation can be missing or throw in the harness: debugging.
Use harness tests for:
- Initial rendering and null-first states.
- Basic input/output flow.
- CSS containment and resizing smoke.
- Keyboard and accessible names.
Do not delete deployed-only code merely to satisfy harness limitations.
Deployed smoke
Run deployed smoke when behavior depends on Dataverse, model-driven forms, published metadata, Pages, Web API, security or dataset paging.
The Pages guard check is a conservative static heuristic over source text, not a JavaScript parser. It recognizes context or context-named variables/fields (_context, ctx, pcfContext, ...), including this._context and props.context. Any value under such a name is treated as the context, except a function- or block-local const bound to an object literal that holds only literals, nested such literals and functions whose body at most returns such a value, and that is used only to call those functions through its own keys, as in function render() { const ctx = { device: { captureImage() { return 1; } } }; ctx.device.captureImage(); }. A literal whose functions run or return anything else, or that is passed, aliased, changed, declared at the top of a file, or in a file using eval or with, keeps the name rule (fail closed). Calls must be in the true-branch if block of a positive method-level guard; calls after early-return guards and calls in else branches are reported by design. This is a deliberate fail-closed limit: code that runs between such a check and the call, such as a later operand of the same condition, a helper, Object.assign or an alias, can remove the method in a way the analyzer cannot see. Rewrite if (typeof context.device?.captureImage !== 'function') return; context.device.captureImage(); as a positive guard block: if (typeof context.device?.captureImage === 'function') { context.device.captureImage(); }. Proofs cover recognized nested callbacks with root-free heads that do not rebind the guarded name. Shadowing blocks inherited proofs; writing to the guarded name or a protected prefix in a form the analyzer recognizes before the call ends the proof, even in nested functions and classes. This static heuristic can miss unusual write forms. Detected calls it cannot prove guarded and unrecognized forms of guards are reported rather than assumed safe (fail closed). If the analyzer or lexer cannot finish a file, the combined gate reports one PCF_CODE_UNPARSEABLE warning per file and treats that file's detected Pages API calls as unguarded. After a lexer failure, calls inside comments or strings may also be reported conservatively. Calls through parenthesized receivers, template-literal member names without substitutions and dispatch through .call, .apply, .bind or Reflect.apply are detected like direct calls, also when a file falls back. A known limit, in the safe direction: after an optional call with type arguments, as in factory?.<T>(context.device).captureImage(), the parenthesis is still read as a grouped receiver, so that call is reported as a Pages call (an over-report, never a missed call). Dynamic computed member names, including template-literal member names with a substitution, aliasing such as const d = context.device; d.captureImage(), and other dynamic dispatch (a comma group such as (0, context.device.captureImage)(), or the method passed to another function) may evade detection, so runtime verification on the target Power Pages site stays required.
Recommended smoke assertions:
- Control loads without console errors.
- Existing record renders the current value.
- New unsaved record shows an intentional disabled or empty state.
- Save → reload round-trips bound output.
- A user without field/table permission sees the expected safe state.
- Two instances on the same form do not interfere.
- For Pages, permitted and denied web roles behave differently as expected. This release supports Power Pages only for standard field controls: the form-field journey and the standalone Liquid journey (
{% codecomponent %}), both guided. Dataset controls on Pages (form sub-grid and list) are not supported in this release. Do not run sub-grid or list paging and selection as a Pages test.
Dataset-specific tests
Dataset controls need additional coverage because paging and refresh mistakes are common.
| Case | Expected behavior |
|---|---|
| Loading | Shows a loading state while dataset data is unavailable. |
| Empty | Shows an empty state without throwing. |
| Error | Shows a recoverable error state; no refresh loop. |
| Next/previous page | Calls one paging method at a time. Learn says paging calls do not support parallel execution. |
| Sort/search/filter change | Resets intentionally and tells the user when the current page changes. |
| Refresh | Uses refresh() only on explicit changes; remembers that refresh resets to page 1. |
Accessibility checks
- Keyboard path reaches every interactive element.
- Focus is visible and trapped only when a modal pattern requires it.
- Inputs have accessible names.
- Color is not the only status signal.
- High contrast and reduced motion are considered for custom visuals.
- RTL layout is tested when the control renders text, icons or directional layouts.
Performance checks
- Production bundle size is under the policy threshold.
updateViewdoes not issue repeated network calls for unchanged inputs.- Web API calls use
$selectand page/cap results rather than reading whole tables. - Dataset refresh is serialized and explicit.
- The control disposes external handlers in
destroy.
Captured-agent corpus for skill evals
The first /pcf eval corpus should include captured projects from:
- Fresh control creation.
- Repair of a seeded broken project.
- Version migration.
- A Power Pages incompatibility request.
Each capture should preserve the prompt, intent, plan, gates, produced project and final evidence level. Scrub environment names, tenant ids, user names and internal paths before committing fixtures.
Reporting template
When finishing a PCF run, report:
- Host(s) and control identity.
- Version and dependency baseline.
- Evidence level reached.
- Gates run and result.
- Deploy target only as a placeholder or user-confirmed public-safe label.
- Runtime checks performed or explicitly
runtime-not-checked. - Inventory warning: where-used output is registered solution dependencies only — not proof of Liquid or text references; an empty result is not "safe to delete".