Function: isPramanStep()
isPramanStep(
stepOrTitle):boolean
Determines whether a step was produced by a Praman abstraction.
Parameters
stepOrTitle
string | ClassifiableStep
A step, or just its title.
Returns
boolean
true if the step was produced by a Praman abstraction.
Remarks
Two tiers, and the order matters:
- Structural (Playwright 1.63+) — when
paramsis present it is authoritative. Praman stamps{ praman: true }viabuildStepOptions; Playwright's ownpw:apisteps populateparamstoo but never that marker, so a step carrying params without it is definitively not Praman. This makes classification exact for every Praman step and everypw:apistep. It does not fix a baretest.step('Checkout flow', fn)written by a user: Playwright only fillsparamsfrom what the author passed, so with none it falls to tier 2 and'Check'still matches as a prefix. Eliminating that needs the author to passparams, which Praman cannot do on their behalf. - Title heuristic (1.57-1.62) — matchesPramanStepTitle, now
derived from
ACTION_MAPrather than a hand-maintained copy that had drifted by 10 verbs.
Accepts a bare title string as before, so existing callers are unaffected.
Example
isPramanStep('Click button'); // true
isPramanStep('ui5.table.getRows'); // true
isPramanStep({ title: 'x', params: { praman: true } }); // true
isPramanStep({ title: 'Login now', params: { locator: 'x' } }); // false
isPramanStep('page.click'); // false