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

Safari test run breaks in Sauce Lab due to missing W3C WebDriver support #380

Closed
fatso83 opened this issue May 20, 2021 · 21 comments · Fixed by #395
Closed

Safari test run breaks in Sauce Lab due to missing W3C WebDriver support #380

fatso83 opened this issue May 20, 2021 · 21 comments · Fixed by #395
Labels
dependencies Pull requests that update a dependency file help wanted infrastructure Stuff relating to CircleCI, test setup, GH Actions, .. stale

Comments

@fatso83
Copy link
Contributor

fatso83 commented May 20, 2021

Full background: sinonjs/sinon#2372.

Basically, Safari tests breaks with v12 and up. This needs to be fixed in min-wd (mantoni/min-webdriver#31).

@benjamingr
Copy link
Member

Would it make sense to just migrate to WebDriverIO?

@christian-bromann given the visibility and popularity of this project is this something you can assist with?
(feel free to say "no", no intention to pressure)

Ideally someone looking to contribute more ( @itayperry ) could take this if you can mentor them on the migration.

@christian-bromann
Copy link

Would it make sense to just migrate to WebDriverIO?

I don't think so. WebdriverIO has no capabilities to run Mocha, Jasmine and Cucumber in a browser for unit test purposes. However given that many libraries still would like to do such things I will look into supporting this. Short term I believe fixing the protocol bug in min-webdriver makes the most sense IMO.

@benjamingr
Copy link
Member

@christian-bromann thanks for the quick response it's appreciated! 🙏

The logic for running mocha tests in browsers isn't in min-webdriver it's in mochify. That could (at least optionally?) just use WebdriverIO right?

@christian-bromann
Copy link

Yes it could. Then easiest would be to implement a browserify plugin compatible interface into webdriverio similar as min-wd does it.

@benjamingr
Copy link
Member

Great, @itayperry is this something you'd be interested in contributing? It could be a good chance to contribute to another project too (WebdriverIO)

@fatso83 fatso83 added help wanted dependencies Pull requests that update a dependency file infrastructure Stuff relating to CircleCI, test setup, GH Actions, .. labels May 31, 2021
@itayperry
Copy link
Contributor

itayperry commented May 31, 2021

Hi @benjamingr :) Yes, I'd be happy - I'm still working on 375 and I also wanna contribute to 374.
I've been slow lately, so if no one takes this one, I definitely will :) I don't wanna stall you.

@itayperry
Copy link
Contributor

... to implement a browserify plugin compatible interface into webdriverio similar as min-wd does it

I'd be happy to do it - how / where can I get started? I never did this before but it sounds interesting! :)

@mantoni
Copy link
Member

mantoni commented Aug 31, 2021

I'm actually working on a Mochify rewrite (https://github.com/mantoni/mochify.js has a rewrite branch), and the current state seems to work fine. I just don't have enough free time to get it across the finish line.

@itayperry
Copy link
Contributor

I just don't have enough free time to get it across the finish line.

@mantoni anything I can help with? (with some guidance).

@mantoni
Copy link
Member

mantoni commented Sep 3, 2021

@itayperry You could start by checking out this branch and see if you can run Safari tests for fake-timers with it: mantoni/mochify.js#241

@itayperry
Copy link
Contributor

Hi @mantoni, I saw that you just merged rewrite-tests to rewrite branch - which made it easier for me to check out! So thank you - I couldn't find a way to check out an unmerged PR code (I read a guide but had too many issues - https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally - nevermind).

I'll be honest, I don't really know how to activate it - I tried deleting mochify from fake-timers and then using npm-link to package-link my local mochify rewrite branch. I had a few errors and I seem to be stuck.

In fact, I even tried to npm-link the basic master branch of my local mochify clone just to see if things work normally - and that also didn't work, I think I'm doing something wrong.

One more question - How do get it running? I saw this node cli --reporter nyan but couldn't quite understand it.

@mantoni
Copy link
Member

mantoni commented Sep 4, 2021

Thanks for looking into it. There is clearly not enough documentation yet. I managed to run tests by invoking the new Mochify CLI locally using a relative path.

However, I will make a 0.1.0 release this afternoon and send a PR here. We can then iterate on that together. It's a lot easier when we have a running example to talk about.

@itayperry
Copy link
Contributor

Sounds great! I'll wait for the PR.
Thank you for being patient and helpful about all of it.

@mantoni mantoni mentioned this issue Sep 4, 2021
@mantoni
Copy link
Member

mantoni commented Sep 4, 2021

@itayperry It tried all evening, and it works for Safari, but not for any other browser 🙈. Your help on the above PR and / or the Mochify rewrite would be highly appreciated.

@itayperry
Copy link
Contributor

itayperry commented Sep 5, 2021

@mantoni I'd be very happy to help! Where should I start? (I might ask for some advice/tips).

@mantoni
Copy link
Member

mantoni commented Sep 6, 2021

I figured it out for this project and have a fix in mantoni/mochify.js#244 (spoiler: there's a very subtle bug in the geckodriver).

I'm happy to provide assistance for anyone who is willing to help. I'm sorry for the lack of documentation. A good way to start is to read through the initial "Mochify Rewrite" issue: mantoni/mochify.js#229

Issues for the rewite can be found here: https://github.com/mantoni/mochify.js/milestone/1

@fatso83
Copy link
Contributor Author

fatso83 commented Nov 22, 2022

Getting this over the finish line is basically #395, for anyone interested.

@fatso83
Copy link
Contributor Author

fatso83 commented Mar 30, 2023

WebDriverIO just merged the fix for "Allow to run unit tests within the browser #6928". Not sure if this makes any difference to this stale issue, but thought I would just mention it 😄

@christian-bromann
Copy link

Ha! Yeah, WebdriverIO now supports running tests in the browser. It would be ideal for sinonjs but the Mochify PR seems to be almost ready to ship I guess.

@fatso83
Copy link
Contributor Author

fatso83 commented Mar 30, 2023

Yeah, all that PR needs to finish is someone that is not pre-occupied with feeding and putting kids to bed in their few allowable hours off 😄 Could perhaps put a 💵 bounty on it to get it proper tested and finished?

Copy link

stale bot commented Dec 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 27, 2023
@SimenB SimenB linked a pull request Dec 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file help wanted infrastructure Stuff relating to CircleCI, test setup, GH Actions, .. stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants