-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(vitest): headless mode not working when using webdriverio (fix #3930) #3996
fix(vitest): headless mode not working when using webdriverio (fix #3930) #3996
Conversation
|
✅ Deploy Preview for fastidious-cascaron-4ded94 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Please, don't remove PR checklist when creating PR. One of the points there is to not push pnpm-lockfile changes. |
Sorry, I should've read it. |
Just noticed I mistakenly ran I'll revert this soon |
I just noticed that |
webdriverio doesn't seem to have complete documentation for the options for
I thought it was weird so I decided to test it myself, and yeah I can confirm it doesn't work (at least without Sauce Labs) |
Ok, no problem 👍🏻 |
@sheremet-va I'm not sure how to proceed since we're getting the |
Sorry, since you added a new package, you can update the lockfile. But make sure it only includes the new package there (example of good lockfile update in #4027). |
Looks like it's still broken |
I'm having some trouble trying to update only I also found a recent issue from someone with the same problem as me. |
The jus updating it should be fine I think |
Not sure what you meant but I'm assuming you asked me to just run the previous install command and commit so that's what I did (it does look like there are some unrelated packages being updated in the lockfile though) |
a52d4d5
to
63d5fe5
Compare
Fixed the types and ran all CI commands on my machine, not sure why |
I don't understand why your CI fails when main doesn't 🤔 |
The errors are weird because they don't seem to have much to do with what I think caused it, but basically I didn't need to add some mapping keys in the lockfile because they were already there. I thought |
Browser tests fail now 😄 (Because of the changes here looks like) |
This PR is making me feel silly lol. |
…dow/vitest into fix-headless-browser
This is weird... I ran the failed CI commands on Windows and they all passed, the lockfile looks fine, and everything else hasn't |
Replace karma, chai, mocha, puppeteer, and sinon with vitest, @vitest/browser and webdriverio Remove `^` from all dependencies and update their version to the locked version `@vitest/browser` is an experimental package with some "bugs" so a patch to fix headless flag and add support for custom browser binary was needed in order to run the test in Github Actions Closes: #250 Closes: #180 Rel: https://github.com/karma-runner/karma#karma-is-deprecated-and-is-not-accepting-new-features-or-general-bug-fixes Rel: https://vitest.dev/guide/ Rel: vitest-dev/vitest#3996
Replace karma, chai, mocha, puppeteer, and sinon with vitest, @vitest/browser and webdriverio Remove `^` from all dependencies and update their version to the locked version `@vitest/browser` is an experimental package with some "bugs" so a patch to fix headless flag and add support for custom browser binary was needed in order to run the test in Github Actions Closes: #250 Closes: #180 Rel: https://github.com/karma-runner/karma#karma-is-deprecated-and-is-not-accepting-new-features-or-general-bug-fixes Rel: https://vitest.dev/guide/ Rel: vitest-dev/vitest#3996
webdriverBrowserExtensionMap[this.browser].value.args.push('-headless') | ||
break | ||
case 'edge': | ||
webdriverBrowserExtensionMap[this.browser].value.args.push('--headless') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use same configuration for chrome
I skimmed through the v6, v7, and v8 docs for
webdriverio
but I didn't really find any documentation for thewdio:devtoolsOptions
key on the current code causing this issue:IMPORTANT:
I couldn't reproduce this issue, I realize this was my mistake and I should've tried that before starting to write the code.
I have a suggestion regarding reproductions (let me know if I should open a discussion for this): they should be made mandatory and the issue should be automatically (and/or manually) closed until a repro that actually works is provided, otherwise false-positives made by user error may become very common, but that's just my take on it, let me know what you think!
This fixes #3930 (if it's confirmed to be an issue)