@decocms/parity 0.15.1 → 0.16.0
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 +6 -0
- package/dist/cli.js +15 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.16.0](https://github.com/decocms/parity/compare/v0.15.1...v0.16.0) (2026-07-28)
|
|
11
|
+
|
|
10
12
|
### Added
|
|
11
13
|
|
|
12
14
|
* **Configurable `minicartPanel` selector for open-minicart reveal detection (issue #149).** `isCartUiVisible` and the title-scope sweep in `validateCartContainsTitleQuick` used a hardcoded list of name-based patterns (`[role='dialog']`, `[class*='minicart']`, etc.) to detect that the cart drawer was open. Any site built with utility-CSS (Tailwind) and `data-qa-*` testing attributes — a common modern stack — has no class/attribute those patterns can match, so detection always returns `null` and the step reports "failed" even when the drawer is genuinely open. The new `minicartPanel` selector key (`.parityrc.json`) is tried first, ahead of all hardcoded patterns. Built-in defaults cover `[data-qa-minicart]`, `[data-minicart]`, `[data-minicart-drawer]`, `[data-testid='minicart']` and common class patterns — so the `data-qa-*` case is handled out-of-the-box. Override with a single selector that matches the drawer root for your specific site.
|
|
13
15
|
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
* **`dismissOverlays` stall in `openMinicart` (issue #151).** The named-selector sweep inside `dismissOverlays` used a 400ms per-selector cap; with 12+ selectors none of which match, that's ~5s minimum before `openMinicart` could proceed — and on heavy pages the CDP calls could stall much longer, causing 50-100s gaps with zero debug output. Fixed by: (1) tightening the per-selector probe to 80ms (fast-failing `count()=0` before any `isVisible` call), (2) adding `dlog` at the entry of `dismissOverlays` and `openMinicart` so slow sweeps show up in `DEBUG_PARITY=1` output, and (3) wrapping the `dismissOverlays` call inside `openMinicart` with a 4s hard cap so it degrades gracefully instead of silently consuming the step budget.
|
|
19
|
+
|
|
14
20
|
## [0.15.0](https://github.com/decocms/parity/compare/v0.14.0...v0.15.0) (2026-07-27)
|
|
15
21
|
|
|
16
22
|
### Added
|
package/dist/cli.js
CHANGED
|
@@ -50719,15 +50719,21 @@ async function dismissBlockingOverlay(page, ctx, target) {
|
|
|
50719
50719
|
function describe(b) {
|
|
50720
50720
|
return `${b.tag}${b.id ? `#${b.id}` : ""}${b.className ? `.${b.className.split(/\s+/)[0]}` : ""}`;
|
|
50721
50721
|
}
|
|
50722
|
+
var OVERLAY_PROBE_CAP_MS = 80;
|
|
50722
50723
|
async function dismissOverlays(page, ctx) {
|
|
50724
|
+
const sels = overlaySelectorsFor(ctx.rc);
|
|
50725
|
+
dlog2(ctx, ` dismissOverlays: checking ${sels.length} selector(s)…`);
|
|
50723
50726
|
const dismissals = [];
|
|
50724
|
-
for (const sel of
|
|
50727
|
+
for (const sel of sels) {
|
|
50725
50728
|
try {
|
|
50726
50729
|
const overlay = page.locator(sel).first();
|
|
50727
|
-
|
|
50730
|
+
const cnt = await withCap(overlay.count(), OVERLAY_PROBE_CAP_MS, 0);
|
|
50731
|
+
if (cnt === 0)
|
|
50732
|
+
continue;
|
|
50733
|
+
if (!await withCap(overlay.isVisible({ timeout: OVERLAY_PROBE_CAP_MS }).catch(() => false), OVERLAY_PROBE_CAP_MS, false))
|
|
50728
50734
|
continue;
|
|
50729
50735
|
const closer = overlay.locator(CLOSE_BUTTON_SELECTOR).first();
|
|
50730
|
-
if (await withCap(closer.isVisible({ timeout:
|
|
50736
|
+
if (await withCap(closer.isVisible({ timeout: OVERLAY_PROBE_CAP_MS }).catch(() => false), OVERLAY_PROBE_CAP_MS, false)) {
|
|
50731
50737
|
await closer.click({ timeout: 1500 }).catch(() => {
|
|
50732
50738
|
return;
|
|
50733
50739
|
});
|
|
@@ -50897,7 +50903,12 @@ async function waitForCartHydration(page) {
|
|
|
50897
50903
|
}
|
|
50898
50904
|
async function openMinicart(page, trigger, ctx, expectedProductTitle) {
|
|
50899
50905
|
const beforeUrl = page.url();
|
|
50900
|
-
|
|
50906
|
+
dlog2(ctx, ` openMinicart: starting — trigger=${trigger.selector} title=${expectedProductTitle?.slice(0, 40) ?? "none"}`);
|
|
50907
|
+
await Promise.race([
|
|
50908
|
+
dismissOverlays(page, ctx),
|
|
50909
|
+
new Promise((resolve) => setTimeout(resolve, 4000))
|
|
50910
|
+
]);
|
|
50911
|
+
dlog2(ctx, " openMinicart: dismissOverlays done — checking alreadyOpen…");
|
|
50901
50912
|
await page.waitForTimeout(800);
|
|
50902
50913
|
const alreadyOpen = await isCartRevealed(page, expectedProductTitle, ctx);
|
|
50903
50914
|
if (alreadyOpen) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/parity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "E2E parity validator for site migrations. Compares prod vs cand and reports UI, functional, SEO, visual, and Web Vitals deltas with an LLM-ranked HTML report.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|