@sfqa/scar 0.1.0 → 0.1.1
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/CHANGELOG.md +8 -1
- package/README.md +5 -5
- package/dist/cli.js +0 -0
- package/package.json +2 -2
- package/rules/generic.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.1.
|
|
8
|
+
## [0.1.1] - 2026-11-15
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- ST-004 wording now says what Playwright does: the `timeout` option on `isVisible()` is ignored and the call returns instantly (it previously said the method takes no options).
|
|
12
|
+
- The shipped ST-008 example identifier shape and the fixtures that use it are now a neutral `SKU-A12-0042` shape instead of an organisation-specific one; replace it with your own.
|
|
13
|
+
- Page-object names in the ST-013 example pattern are generic (`OrderPage`, `ItemPage`).
|
|
14
|
+
|
|
15
|
+
## [0.1.0] - 2026-11-14
|
|
9
16
|
|
|
10
17
|
### Added
|
|
11
18
|
- Dependency-free CLI (`sfqa-scar`) for Node >= 20: `scan`, `new`, `prove`, and `harvest`.
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ npx sfqa-scar . # scan with the shipped template (or your scar-t
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
|
-
[HIGH] ST-004 - Never pass
|
|
17
|
+
[HIGH] ST-004 - Never pass a timeout to isVisible() - the option is ignored and the call returns instantly. Use waitFor({ state: 'visible', timeout }) when render timing matters.
|
|
18
18
|
where : test-pages/web/LeadPage.ts:212
|
|
19
19
|
matched: const visible = await label.isVisible({ timeout: 5000 });
|
|
20
20
|
context: All Playwright page objects (test-pages/web/**), field readers and verification helpers reading Lightning labels.
|
|
@@ -72,7 +72,7 @@ incident, because the incident is the part you already know:
|
|
|
72
72
|
That paragraph is the whole job. It becomes a rule like this:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
npx sfqa-scar new --rule "Never pass
|
|
75
|
+
npx sfqa-scar new --rule "Never pass a timeout to isVisible() - it is ignored" --scope "test-pages/**"
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
which writes three files: the rule entry, one fixture that must match, and one
|
|
@@ -477,7 +477,7 @@ that you replace:
|
|
|
477
477
|
| Detector input | Shipped example | Replace with |
|
|
478
478
|
|---|---|---|
|
|
479
479
|
| `labelRules.canonical` | `Web`, `Event`, `Referral`, `Phone`, `Email`, `SMS` | the exact labels your org renders |
|
|
480
|
-
| inventory-code shape | `
|
|
480
|
+
| inventory-code shape | `SKU-A12-0042` | the identifier shape your product uses |
|
|
481
481
|
| local-only file patterns | `local-notes-*.md`, `*.zip` | the paths your team keeps local |
|
|
482
482
|
| timeout ceiling | `< 360000` ms | your measured longest journey, minus headroom |
|
|
483
483
|
|
|
@@ -668,7 +668,7 @@ your stack, delete it rather than leave it in the file.
|
|
|
668
668
|
| ST-001 | high | Never hardcode credentials, tokens or secrets in code, config fallbacks or committed `.env` files. |
|
|
669
669
|
| ST-002 | high | Each environment config reads its own environment's variables, never a sibling's. |
|
|
670
670
|
| ST-003 | high | Picklist values match the Salesforce label exactly: case, spaces, hyphens. |
|
|
671
|
-
| ST-004 | high | `isVisible()`
|
|
671
|
+
| ST-004 | high | `isVisible()` ignores any `timeout`; use `waitFor({ state: 'visible' })`. |
|
|
672
672
|
| ST-005 | med | Never treat a success toast as the only success signal. |
|
|
673
673
|
| ST-006 | med | Record navigation tolerates Lightning URL variants; no single strict `waitForURL`. |
|
|
674
674
|
| ST-007 | med | Server-side integration fields need periodic reload, not just a deadline poll. |
|
|
@@ -859,6 +859,6 @@ spread, the rule that could never fire, the detectors that were the problem).
|
|
|
859
859
|
|
|
860
860
|
## Status
|
|
861
861
|
|
|
862
|
-
`0.1.
|
|
862
|
+
`0.1.1`. Dependency-free, Node >= 20, TypeScript types included. 18 of 19 rules
|
|
863
863
|
have a machine detector and are proven both ways; the 19th is a documented gap.
|
|
864
864
|
The public proof runs on synthetic fixtures, not a field trial. MIT licensed.
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sfqa/scar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Review code against a Salesforce test suite's scar tissue: past failures, encoded as declarative rules.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Vaishali Desarda",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"bin": {
|
|
23
|
-
"sfqa-scar": "
|
|
23
|
+
"sfqa-scar": "dist/cli.js"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
package/rules/generic.json
CHANGED
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"id": "ST-004",
|
|
104
|
-
"rule": "Never pass
|
|
104
|
+
"rule": "Never pass a timeout to isVisible() - the option is ignored and the call returns instantly. Use waitFor({ state: 'visible', timeout }) when render timing matters.",
|
|
105
105
|
"context": "All Playwright page objects (test-pages/web/**), field readers and verification helpers reading Lightning labels.",
|
|
106
106
|
"origin": {
|
|
107
107
|
"commit": null,
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"summary": "Smoke scenarios pinned concrete inventory codes; each green run CONSUMED the record and the next run failed on 'not available'. The fix introduced a sentinel so the product's search picks the freshest eligible row at runtime."
|
|
221
221
|
},
|
|
222
222
|
"severity": "high",
|
|
223
|
-
"detection_pattern": "Concrete inventory codes in feature tables or step expectations. The shape below is an EXAMPLE (
|
|
223
|
+
"detection_pattern": "Concrete inventory codes in feature tables or step expectations. The shape below is an EXAMPLE (SKU-bin-number); replace it with your org's identifier shape.",
|
|
224
224
|
"match": {
|
|
225
225
|
"pathInclude": [
|
|
226
226
|
"features/**",
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"**/node_modules/**"
|
|
231
231
|
],
|
|
232
232
|
"linePatterns": [
|
|
233
|
-
"
|
|
233
|
+
"\\bSKU-[A-Z]\\d{1,2}-\\d{3,5}\\b"
|
|
234
234
|
]
|
|
235
235
|
},
|
|
236
236
|
"recommendation": "Use a sentinel (e.g. AUTO) resolved by an availability-aware search with deterministic tie-breaking, logging what was actually selected."
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
"**/node_modules/**"
|
|
359
359
|
],
|
|
360
360
|
"linePatterns": [
|
|
361
|
-
"new\\s+(?:LeadPage|OpportunityPage|
|
|
361
|
+
"new\\s+(?:LeadPage|OpportunityPage|OrderPage|HomePage|ItemPage)\\(\\s*page\\s*,"
|
|
362
362
|
],
|
|
363
363
|
"fileExemptSignals": [
|
|
364
364
|
"activePage"
|