Skip to content

Make executeWorkbench work after VSCode restarts#106

Merged
christian-bromann merged 3 commits intowebdriverio-community:mainfrom
ilia-db:improve-exec-workbench
Feb 15, 2024
Merged

Make executeWorkbench work after VSCode restarts#106
christian-bromann merged 3 commits intowebdriverio-community:mainfrom
ilia-db:improve-exec-workbench

Conversation

@ilia-db
Copy link
Copy Markdown
Contributor

@ilia-db ilia-db commented Feb 15, 2024

vscode.openFolder can be used to restart the VSCode under different workspace root. In that case the current socket is closed, and then the new connection appears after the VSCode is up again.

This PR clears pending message callbacks when the connection is closed and re-assigns the _promisedSocket to a new socket when new connection appears.

Fixes #62

Had to hard-code vscode version to 1.85.2 when running tests locally, since newer chromedriver versions live in a new location. Seems like there's a PR already to fix it #105

`vscode.openFolder` can be used to restart the VSCode under different
workspace root. In that case the current socket is closed, and then the new
connection appears after the VSCode is up again.

This PR clears pending message callbacks when the connection is closed, and also
re-assigns the `_promisedSocket` to a new socket when new connection appears.
Copy link
Copy Markdown
Contributor

@seanpoulter seanpoulter left a comment

Choose a reason for hiding this comment

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

Looks great!

Comment thread test/specs/workbench.e2e.ts Outdated
Copy link
Copy Markdown
Contributor

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Thanks a lot!

Copy link
Copy Markdown
Contributor

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! It seems like the added test fails in our pipeline, mind taking a look?

Comment thread test/specs/workbench.e2e.ts Outdated
Copy link
Copy Markdown
Contributor

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Let's :shipit:

Thanks!

@christian-bromann christian-bromann merged commit 45de785 into webdriverio-community:main Feb 15, 2024
@wdio-bot
Copy link
Copy Markdown
Collaborator

Hey ilia-db 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution. We've sent you an email with further instructions on how to claim your expenses from our development fund. Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at [email protected] or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

@christian-bromann
Copy link
Copy Markdown
Contributor

Released as part of v6.0.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

executeWorkbench() doesn't work after Open Folder is called

4 participants