@decocms/parity 0.26.12 → 0.26.13
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/dist/cli.js +17 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -44738,12 +44738,17 @@ var PRODUCT_CARD_HEURISTIC_SELECTORS = [
|
|
|
44738
44738
|
".product-card"
|
|
44739
44739
|
];
|
|
44740
44740
|
async function countProductCards(page) {
|
|
44741
|
-
|
|
44742
|
-
|
|
44743
|
-
|
|
44744
|
-
|
|
44745
|
-
|
|
44746
|
-
|
|
44741
|
+
return await measureProductCards(page) ?? 0;
|
|
44742
|
+
}
|
|
44743
|
+
async function measureProductCards(page) {
|
|
44744
|
+
return withCap(page.evaluate((selectors) => {
|
|
44745
|
+
for (const sel of selectors) {
|
|
44746
|
+
const n = document.querySelectorAll(sel).length;
|
|
44747
|
+
if (n > 0)
|
|
44748
|
+
return n;
|
|
44749
|
+
}
|
|
44750
|
+
return 0;
|
|
44751
|
+
}, PRODUCT_CARD_HEURISTIC_SELECTORS).catch(() => null), 2500, null);
|
|
44747
44752
|
}
|
|
44748
44753
|
|
|
44749
44754
|
// src/engine/flows/purchase-journey.ts
|
|
@@ -45858,9 +45863,12 @@ async function waitForCardGrowth(page, before2, capMs) {
|
|
|
45858
45863
|
const deadline = Date.now() + capMs;
|
|
45859
45864
|
let cur = before2;
|
|
45860
45865
|
while (Date.now() < deadline) {
|
|
45861
|
-
|
|
45862
|
-
if (
|
|
45863
|
-
|
|
45866
|
+
const measured = await measureProductCards(page).catch(() => null);
|
|
45867
|
+
if (measured !== null) {
|
|
45868
|
+
cur = measured;
|
|
45869
|
+
if (cur > before2)
|
|
45870
|
+
return cur;
|
|
45871
|
+
}
|
|
45864
45872
|
await page.waitForTimeout(400);
|
|
45865
45873
|
}
|
|
45866
45874
|
return cur;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/parity",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.13",
|
|
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",
|