@decocms/parity 0.17.3 → 0.17.5
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 +28 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -38635,12 +38635,26 @@ async function launchBrowser(opts = {}) {
|
|
|
38635
38635
|
const doLaunch = () => chromium.launch({
|
|
38636
38636
|
headless: opts.headless ?? true,
|
|
38637
38637
|
slowMo: opts.slowMo ?? 0,
|
|
38638
|
-
|
|
38638
|
+
timeout: 30000,
|
|
38639
|
+
args: [
|
|
38640
|
+
"--disable-blink-features=AutomationControlled",
|
|
38641
|
+
"--no-sandbox",
|
|
38642
|
+
"--disable-gpu"
|
|
38643
|
+
]
|
|
38639
38644
|
});
|
|
38640
38645
|
try {
|
|
38641
38646
|
return await doLaunch();
|
|
38642
38647
|
} catch (err) {
|
|
38643
38648
|
const msg = err.message ?? "";
|
|
38649
|
+
if (msg.includes("Timeout") || msg.includes("timed out")) {
|
|
38650
|
+
throw new Error([
|
|
38651
|
+
"Chromium timed out while launching (30 s).",
|
|
38652
|
+
"On macOS, try reinstalling the browser binaries:",
|
|
38653
|
+
" npx playwright install chromium chromium-headless-shell",
|
|
38654
|
+
"Or set PARITY_SKIP_PLAYWRIGHT_INSTALL=1 and install manually."
|
|
38655
|
+
].join(`
|
|
38656
|
+
`));
|
|
38657
|
+
}
|
|
38644
38658
|
if (!msg.includes("Executable doesn't exist"))
|
|
38645
38659
|
throw err;
|
|
38646
38660
|
if (process.env.PARITY_SKIP_PLAYWRIGHT_INSTALL === "1") {
|
|
@@ -52091,15 +52105,19 @@ async function flowPurchaseJourney(ctx) {
|
|
|
52091
52105
|
if (expectedProductTitle && cartOpenMethod !== "failed") {
|
|
52092
52106
|
let v = await validateCartContainsTitle(page, expectedProductTitle, ctx);
|
|
52093
52107
|
if (cartOpenMethod === "already-open" && !v.found) {
|
|
52094
|
-
const
|
|
52095
|
-
|
|
52096
|
-
|
|
52097
|
-
|
|
52098
|
-
|
|
52099
|
-
|
|
52100
|
-
|
|
52101
|
-
|
|
52102
|
-
|
|
52108
|
+
const triggerSels = selFor(ctx, "minicartTrigger");
|
|
52109
|
+
for (const sel of triggerSels) {
|
|
52110
|
+
const el = page.locator(sel).first();
|
|
52111
|
+
if (await el.count()) {
|
|
52112
|
+
dlog2(ctx, "step 7: already-open drawer empty — force-clicking minicartTrigger (collapsed inside daisyUI drawer-content)");
|
|
52113
|
+
miniHit = { locator: el, selector: sel };
|
|
52114
|
+
await el.click({ force: true, timeout: 3000 }).catch(() => {
|
|
52115
|
+
return;
|
|
52116
|
+
});
|
|
52117
|
+
await waitForCartHydration(page);
|
|
52118
|
+
v = await validateCartContainsTitle(page, expectedProductTitle, ctx);
|
|
52119
|
+
break;
|
|
52120
|
+
}
|
|
52103
52121
|
}
|
|
52104
52122
|
}
|
|
52105
52123
|
let reasonText;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/parity",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.5",
|
|
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",
|