Conversation
Ports the v9 Percy fixes (#210, #228) to the v8 line: - Route web `snapshot` to @percy/webdriverio instead of @percy/selenium-webdriver (whose Selenium-only APIs a WebdriverIO browser does not provide), and add @percy/webdriverio ^3.3.4 (3.3.3 shipped without _iframe_shim.js and failed to load; fixed in 3.3.4). - Bump @percy/selenium-webdriver to ^2.2.8 so the Automate percyScreenshot path stops resolving to the broken 2.2.6/2.2.7, which added an unguarded top-level require('selenium-webdriver') and silently disabled Percy on WebdriverIO. - Wrap all Percy entry points so their errors are logged rather than thrown into the user's test; PERCY_RAISE_ERROR=true restores throwing. - Document the percy / percyCaptureMode options in the README. SDK-7756 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited), Workspace UI (inherited) Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
RUN_TESTS |
|
🔴 Blocking findings — fix required [Graceful Degradation] Change map (generated deterministically from the diff)graph LR
subgraph nwdio_service["wdio-service"]
npackages_browserstack_service_src_Percy_PercySDK_ts["PercySDK.ts<br/>~78 lines"]
n_changeset_pr_231_md["pr-231.md<br/>~18 lines"]
npackages_browserstack_service_README_md["README.md<br/>~18 lines"]
npackages_browserstack_service_package_json["package.json<br/>~3 lines"]
end
↻ This verdict comment is the review anchor — it's updated in place on each run (the gate posts its status separately). — SDK PR Review Agent |
What is this about?
Ports the v9 Percy fixes (#210 + #228) to the v8 line. Percy captured nothing on WebdriverIO — both the screenshot and the snapshot paths were dead — and this restores both, matching v9.
Two silent bugs (same as v9):
percyScreenshot).@percy/selenium-webdriver2.2.6 added an unguarded top-levelrequire('selenium-webdriver'), which it ships only as a devDependency — so in a WebdriverIO project it throwsMODULE_NOT_FOUND, ourtryRequireswallowed it, and every Percy call became a no-op loggingUnsupported driver for percy. v8's floating^2.0.3had locked to the broken 2.2.6 in the lockfile. Bumped to^2.2.8(Percy's fix) so it resolves to the loadable 2.2.8.snapshotpath.snapshotwas wired to@percy/selenium-webdriver, which drives the browser with Selenium-only APIs (executeScript(script),By,switchTo()) a WebdriverIO browser does not have — it never worked at any version. Rerouted to@percy/webdriverio(the WebdriverIO-native port), added as^3.3.4. (3.3.3 shipped without its_iframe_shim.jsfile and failed to load; Percy fixed it in 3.3.4.)Also: all Percy entry points now run through a
runPercywrapper that logs Percy's errors instead of throwing them into the user's test;PERCY_RAISE_ERROR=truerestores throwing. README documents thepercy/percyCaptureModeoptions.PercySDK.tsis the same implementation shipped in v9 #210. No proto/gRPC changes.Related Jira task/s
Release (mandatory for every PR — required for the
ready-for-reviewlabel)Version bump: (required — tick exactly one)
Release notes type: (optional)
Release notes (customer-facing): (optional but encouraged)
Release notes (internal): (required — engineer-facing; what actually changed / why)
snapshotfrom@percy/selenium-webdriverto@percy/webdriverio(added^3.3.4); the selenium SDK uses Selenium-only browser APIs WDIO lacks, so snapshots never worked.@percy/selenium-webdriver^2.0.3→^2.2.8; the lockfile had locked to the broken 2.2.6 (unguardedrequire('selenium-webdriver')→MODULE_NOT_FOUNDin WDIO), silently disabling the AutomatepercyScreenshotpath.runPercywrapper so Percy errors are logged not thrown (PERCY_RAISE_ERROR=trueto fail). Ports v9 fix(percy): restore Percy capture on WebdriverIO (screenshot + snapshot) #210 + fix(percy): float @percy/webdriverio to ^3.3.4 (SDK-7711) #228.Checklist
PR Validations
Run Tests: Comment RUN_TESTS to trigger sanity tests.