mdk
mdk copied to clipboard
Have MDK specify alternate Behat browsers
It would be handy if we could more easily allow for selection of a different browser.
In terms of config, we just need something like:
$CFG->behat_profiles = [
'chrome' => [
'browser' => 'chrome',
],
'firefox' => [
'browser' => 'firefox',
],
];
$CFG->behat_profiles['default'] = $CFG->behat_profiles['chrome'];
And then to run, we need to specify an additional argument when running behat:
--profile chrome
The existing behat addConfig commands in MDK only deal with a line at a time.
I'd like to suggest we perhaps add a line to require_once
another config file (stored within MDK somewhere) to help with this.
I agree, I've ran into that as well.
Would be particularly nice if this could allow us to avoid selenium completely & use ChromeDriver (ideally by default).
I'm working on improving his in Moodle more generally to improve support. When I get that over the line (i.e. when I have some time) I also intend to consider shipping some defaults, and to consider how these fit into MDK.
Oh, hi :) That was quick! Yeah, I've just been looking at it and it does rather look like https://tracker.moodle.org/browse/MDL-58948 doesn't quite go far enough for this to be done "nicely" with MDK, and https://tracker.moodle.org/browse/MDL-59479 probably needs some love. I can probably justify spending some time on this at the moment, so if there's anything I can do now to help, let me know.
Yup - take a look at MDL-66979 instead. I'm trying to migrate to W3C WebDriver so we can ditch the JsonWire webdriver we currently use. That opens things up massively for other browsers (Edge, Firefox, Safari).
A quick look at that looks like you've got the basics working and now going through all the tests to fix up anything that needs updating to make sure they still pass?
In fact it looks like you're nearly done - is there any particular area that it would be helpful to try out/look at/beat into submission?