Praman 1.3.6: S/4HANA Intent Domains, Visual Regression, Playwright 1.63, and 215 Capabilities
Praman 1.3.6 is now available on npm. This release brings 4 new SAP intent domains (QM, WM, AM, HR) with 11 business functions, intent configurability via IntentOverrides, a visual regression fixture with FLP chrome masking, standalone OData and date template fixtures, multi-environment defineConfig(), Playwright 1.62 and 1.63 support with 14 new feature flags, a browser dialog fixture, SAP overlay handling, AI generator integrity, and fixes for 6 bugs including #246. The capability registry grows from 198 to 215 capabilities across 16 categories.
What changed since v1.3.4
46 commits landed between v1.3.4 and v1.3.6 (v1.3.5 was a CI-only fix release with no user-facing changes). The highlights: four new SAP intent domains with 11 business functions, intent configurability, visual regression and OData fixtures, multi-environment config, two Playwright version bumps with 14 new compat flags, four new fixtures, a two-phase AI generator overhaul, and six bug fixes.
Playwright 1.62 + 1.63 — 14 New Feature Flags
Praman now detects and gates Playwright 1.62 and 1.63 APIs via 14 new feature flags in the internal PlaywrightFeatures interface, auto-detected at runtime:
Playwright 1.62 — 6 flags:
| Feature flag | API gated | What it enables |
|---|---|---|
hasLocatorWaitForFunction | locator.waitFor(predicate) | Per-control wait predicates beyond global waitForUI5Stable |
hasWebPScreenshots | WebP screenshot format | Smaller screenshot files with lossy compression |
hasRetryStrategyIsolated | retries: { mode: 'isolated' } | Isolated retry execution in clean browser contexts |
hasAbortSignal | AbortSignal on API methods | Cancellable Playwright operations with abort controller |
hasApiResponseTiming | Resource Timing on API responses | Native timing replaces Date.now() deltas in OData tracing |
hasScrollOption | locator.click({ scroll: 'none' }) | Opt out of auto-scroll before click actions |
Playwright 1.63 — 8 flags:
| Feature flag | API gated | What it enables |
|---|---|---|
hasTestLocks | test({ lock: 'name' }) | Named test locks for parallel isolation of shared SAP state |
hasSubtreeFrameLocator | locator.frameLocator() | Scoped frame locators for nested iframe content |
hasVisibleLocator | locator.visible() | Boolean visibility check without assertion |
hasStepParams | test.step(title, fn, { params }) | Structured parameters on test steps for reporting |
hasAriaSnapshotJSON | ariaSnapshot() JSON output | Machine-readable accessibility snapshots for AI grounding |
hasDialogClosedEvent | page.on('dialogclosed') | Detect-only observation of native browser dialogs |
hasOpfsStorageState | storageState({ opfs: true }) | Origin-private filesystem storage state persistence |
hasHttpCredentialsArray | httpCredentials array form | Multiple HTTP credential sets per browser context |
All flags are auto-detected at runtime. On older Playwright versions, all return false with zero behavior change. The peer dependency range remains ">=1.57.0 <2.0.0".
A new ceiling drift detector fails CI when an uncatalogued Playwright release is detected, ensuring new APIs are flagged before they ship uncovered.
Browser Dialog Fixture
Native alert/confirm/prompt/beforeunload dialogs were invisible to Praman — these are the browser's own dialogs, not sap.m.Dialog. SAP's "unsaved changes" warning on navigation is a native beforeunload dialog that Playwright auto-dismissed silently.
Two methods with different risk profiles:
| Method | Event | Risk | Gate |
|---|---|---|---|
observe() | dialogclosed | None — purely observational | Playwright 1.63+, degrades to silence |
register() | dialog | Changes behavior by existing | All Playwright versions |
import { test, expect } from 'playwright-praman';
test('detect unsaved changes dialog', async ({ ui5Navigation, nativeDialogs }) => {
nativeDialogs.observe();
await ui5Navigation.navigateToHash('Shell-home');
expect(nativeDialogs.records).toContainEqual(expect.objectContaining({ type: 'beforeunload' }));
});
SAP Overlay Handler
SAP applications show overlays — BusyIndicator, MessageToast, confirmation dialogs — that interrupt test actions. The new overlays fixture detects and handles these automatically using Playwright's addLocatorHandler.
Design principle: detect, don't dismiss. Handlers report overlays by default. Dismissal is opt-in per rule and logged at warn, because silently answering a dialog turns a real failure into a passing test.
UI5 Diagnostics on Failure
Failing tests now automatically capture and attach console output, page errors, and network requests. The opt-in clock fixture is available but never auto-installed — SAP session and token validity are time-sensitive.
AI Generator Integrity
A two-phase overhaul ensures generated artifacts are deterministic and auditable:
- Phase A (#261): Each generated artifact now has exactly one owner script — no more "last writer wins" races.
- Phase B (#264): Removed
new Date()stamps; output is now a pure function of input. CI drift gate (npm run validate:generated) fails if any artifact is stale.
Test Locks for Shared SAP State
Playwright 1.63 adds lock to test options for concurrent execution control. Praman adds a runtime guard and conventional lock names for SAP-specific shared state. The guard is fail-closed: on Playwright < 1.63, using lock throws with upgrade guidance rather than silently ignoring.
Bug Fixes
| Issue | PR | Fix |
|---|---|---|
| #246 | #256 | agents/ and seeds/ not shipped in npm package — files[] guard prevents recurrence |
| — | #296 | Reporter step classification: title-prefix → structural (80% → 0% misclassification) |
| — | #300 | Malformed OData body crash guard + Resource Timing replaces Date.now() |
| — | #226 | npx praman init now actually scaffolds a project |
| — | #228 | Agent-asset validation now runs; Prettier no longer corrupts it |
| — | #268 | Stale security overrides refreshed to current advisory ranges |
Dependency Updates
| Category | Change |
|---|---|
| Playwright | @playwright/test 1.61.1 → 1.63.0 |
| Testing | vitest + @vitest/coverage-v8 4.x → 5.x |
| Linting | eslint → 10.12.0, eslint-plugin-n → 18.4.1 |
| Docs | Docusaurus suite to latest, docusaurus-plugin-llms 0.6.1 |
| Security | http-proxy-middleware override 2.0.10, stale overrides refreshed |
| CI Actions | codeql-action v4.37.8 → v4.38.2, actions/checkout 7.0.0 → 7.0.1 |
14 dependency-related commits in total.
Upgrade Guide
No configuration changes required. All new features are either:
- Auto-detected (feature flags activate when Playwright 1.62/1.63 is detected)
- Opt-in (browser dialog fixture, overlay handler, clock fixture only activate when destructured in a test)
If you're on Playwright < 1.62, everything continues to work unchanged. To access the new fixtures:
npm install @playwright/test@latest
S/4HANA Gap Analysis — 4 New Intent Domains
Based on real-world usage analysis of SAP S/4HANA test suites (specifically the sap-s4-playwright-praman project), we identified 12 gaps where Praman could better support enterprise test automation. All 12 findings are addressed in this release.
New domains
| Domain | SAP Module | Functions |
|---|---|---|
| Quality Management | QM | createInspectionLot, recordResults, createQualityNotification |
| Warehouse Management | WM | createGoodsMovement, createTransferOrder |
| Asset Management | AM | acquireAsset, retireAsset, transferAsset |
| Human Resources | HR | createEmployee, recordTime, requestAbsence |
Each domain includes vocabulary JSON, fixture delegation, and full TSDoc coverage. The intent fixture now exposes 9 domain namespaces (up from 5).
IntentOverrides — portable tests across SAP landscapes
All 9 intent domains now accept overrides in IntentOptions:
await procurement.createPurchaseOrder(ui5, ui5Nav, vocab, poData, {
overrides: {
appId: 'ZMM_PO-create', // Custom Fiori Launchpad hash
saveButtonText: 'Sichern', // Localized button label
fields: { Vendor: 'Lieferant' }, // Localized field labels
},
});
This eliminates hardcoded FLP semantic objects and labels — tests work across DEV/QA/PROD systems with different configurations or languages.
Visual Regression Fixture
Screenshot comparison with automatic FLP chrome masking — the SAP shell header, user menu, and navigation bar change between sessions and break pixel comparisons:
test('purchase order form', async ({ visualRegression }) => {
await visualRegression.compareScreenshot('po-form', {
mask: visualRegression.maskFLPChrome(),
maxDiffPixelRatio: 0.01,
});
});
Wraps Playwright's toHaveScreenshot() with SAP-specific defaults.
Standalone OData Fixture
odata is now a top-level fixture alongside ui5.odata:
test('check entity count', async ({ odata }) => {
const count = await odata.getEntityCount('/sap/opu/odata/sap/ZMM_PO_SRV/PurchaseOrders');
expect(count).toBeGreaterThan(0);
});
Reporter Enhancements
Compliance reporter annotations: Tests can tag SAP process metadata via Playwright annotations:
test(
'create purchase order',
{
annotation: [
{ type: 'process', description: 'Procure-to-Pay' },
{ type: 'tcode', description: 'ME21N' },
],
},
async ({ ui5 }) => {
/* ... */
},
);
Allure SAP categories: ALLURE_SAP_CATEGORIES provides pre-defined failure categories mapping Praman error codes to Allure-compatible objects.
Date Template Placeholders
The testData fixture supports {{today}}, {{tomorrow}}, {{yesterday}}, {{date+N}}, and {{date-N}} placeholders — resolved to ISO 8601 dates matching SAP date fields.
Multi-Environment defineConfig
export default defineConfig(
{ baseURL: 'https://dev.example.com' },
{
ci: { baseURL: 'https://ci.example.com', headless: true },
staging: { baseURL: 'https://staging.example.com' },
},
);
// PRAMAN_ENV=ci → uses ci overrides
fill() + waitForUI5
fill() now automatically calls waitForUI5() after setValue + fireChange, matching documented behavior. Opt out with skipPostFillWait: true in config.
What's Next
- WebAuthn credentials fixture — passkey/FIDO2 testing for SAP systems
expect.soft.poll()wrapper — non-blocking assertions with retry- Overlay handler rule library — pre-built rules for common SAP overlays
- Playwright 1.64 tracking — compat layer ready for the next release cycle
