Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade WebdriverIO to v9, drop JWP capabilities #2852

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

web-padawan
Copy link
Contributor

@web-padawan web-padawan commented Dec 24, 2024

What I did

  1. Upgraded webdriverio to v9 and changed the saucelabs launcher accordingly
  2. Removed logic and docs related to JWP capabilities as these have been dropped

Note

Tested locally by running tests for @web/test-runner-webdriver package. These don't currently run in CI as they were skipped long ago, in particular due to webdriverio/selenium-standalone#788 - that issue is now fixed but unfortunately the fix landed in a version that dropped Node 18 support.

Copy link

changeset-bot bot commented Dec 24, 2024

🦋 Changeset detected

Latest commit: 7203a0e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@web/test-runner-saucelabs Minor
@web/test-runner-webdriver Minor
@web/test-runner-browserstack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@web-padawan web-padawan force-pushed the feat/wdio-v9 branch 5 times, most recently from fbc632d to 7203a0e Compare December 28, 2024 10:11
Copy link
Member

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me. Two questions and then likely good to go.

'@web/test-runner-webdriver': minor
---

Upgrade WebdriverIO to v9, drop JWP capabilities
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Drop"ing something feels like it should be more than a minor release, but I don't know Webdriver that well...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but we are still in 0.x so technically every minor can contain breaking changes.
I wasn't sure whether I should use major for this in the changeset.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor in 0.x is practically major, so is good

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Thanks for clarifying.


function getPlatform(c: WebDriver.DesiredCapabilities): string | undefined {
return c.platformName || c.platform;
function getPlatform(c: WebdriverIO.Capabilities): string | undefined {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this file get this type value from? If it works, it works, but confused that there is no import. The main question is if we're doing something special somewhere else, or relying on something that I can't see, then is it visible to a more experienced WebdriverIO user in a way that would prevent their consumption of this from causing them issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use this but got error "Cannot use namespace 'Capabilities' as a type".

import type { Capabilities } from '@wdio/types';

The namespace is defined here, seems like it's done for supporting custom capabilities.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it run fine in other projects this way. I'm fine with whatever works, it was just surprising to see and would be annoying if this caused some undocumented requirements on consumers.

@@ -0,0 +1,6 @@
---
'@web/test-runner-saucelabs': minor
'@web/test-runner-webdriver': minor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't other packages be updated too?
from the top of my head it's the browserstack one
https://github.com/modernweb-dev/web/blob/master/packages/test-runner-browserstack/package.json
maybe some others, good to check where else the @web/test-runner-webdriver is in deps

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, added @web/test-runner-browserstack. This is the only remaining package that needs updating (other packages only use webdriver launcher as dev dependency).

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.

3 participants