Skip to content

fix: Playgrounds: align webdriverio version, fix null attributes, update visual-snapshots images#2099

Merged
dprevost-LMI merged 4 commits into
webdriverio:mainfrom
dprevost-LMI:fix-playgrounds
May 3, 2026
Merged

fix: Playgrounds: align webdriverio version, fix null attributes, update visual-snapshots images#2099
dprevost-LMI merged 4 commits into
webdriverio:mainfrom
dprevost-LMI:fix-playgrounds

Conversation

@dprevost-LMI
Copy link
Copy Markdown
Contributor

Playgrounds were failing

  • Align webdriverio to use the same as the main project, so 9.25.0
  • Fix support of null for getAttributes in unit test
  • Update main heading image for visual-tests

@dprevost-LMI dprevost-LMI marked this pull request as ready for review May 3, 2026 12:16
@dprevost-LMI dprevost-LMI changed the title fix: Playgrounds, align webdriverio version, fix null attributes, update visual-snapshots images fix: Playgrounds: align webdriverio version, fix null attributes, update visual-snapshots images May 3, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Greptile Summary

This PR fixes the playground test suites by pinning webdriverio to 9.25.0 via npm overrides in all three playground package.json files, guarding against null returns from getAttribute('href') in the test specs, and refreshing DOM snapshots and visual baseline images to match the current WebdriverIO docs site.

Confidence Score: 4/5

Safe to merge; all changes are confined to playground test infrastructure with no impact on the library itself.

Only P2 findings present (exact version pin in overrides, truthy vs null check). No logic errors or security concerns in the core library.

The three package.json overrides fields use an exact version pin that may drift if the main project updates webdriverio.

Important Files Changed

Filename Overview
playgrounds/jasmine/package.json Adds npm overrides to pin webdriverio to 9.25.0; version is hardcoded rather than a range.
playgrounds/jest/package.json Adds npm overrides to pin webdriverio to 9.25.0; version is hardcoded rather than a range.
playgrounds/mocha/package.json Adds npm overrides to pin webdriverio to 9.25.0; version is hardcoded rather than a range.
playgrounds/jasmine/test/specs/basic-matchers.test.ts Adds null guard for getAttribute('href') before pushing into typed array — fixes TypeScript type error and runtime issue.
playgrounds/jasmine/test/specs/jasmine-specific.test.ts Applies the same null guard for getAttribute('href') as in basic-matchers.
playgrounds/jest/test/specs/basic-matchers.test.ts Applies the same null guard for getAttribute('href') as in jasmine playground.
playgrounds/mocha/test/specs/basic-matchers.test.ts Applies the same null guard for getAttribute('href') as in other playgrounds.
playgrounds/jest/test/specs/snapshots/snapshot.test.ts.snap CSS class names updated in DOM snapshot to reflect updated WebdriverIO site markup.
playgrounds/mocha/test/specs/snapshots/snapshot.test.ts.snap CSS class names updated in DOM snapshot to reflect updated WebdriverIO site markup.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[playground test run] --> B{webdriverio version conflict?}
    B -- yes, before PR --> C[test failure]
    B -- no, after overrides pin to 9.25.0 --> D[proceed with tests]
    D --> E[getAttribute href for nav links]
    E --> F{href null?}
    F -- null, before PR --> G[push null into string array → type error / test failure]
    F -- null, after fix --> H[skip / do not push]
    F -- string --> I[push href into array]
    H --> J[assertions run on valid hrefs only]
    I --> J
    J --> K[snapshots compared against updated baselines]
    K --> L[tests pass]
Loading

Reviews (1): Last reviewed commit: "Align playground with webdriverio 9.25.0..." | Re-trigger Greptile

Comment thread playgrounds/jasmine/package.json
Comment thread playgrounds/jasmine/test/specs/basic-matchers.test.ts Outdated
@dprevost-LMI dprevost-LMI merged commit 21cb060 into webdriverio:main May 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant