All my dev sites have $CFG->loginhttps enabled (just to detect if there is any problem with that setting along the time).
If I execute the behat tests with that setting enabled, it seems that all the steps performing a login are failing badly (bot headless and with selenium).
More yet, if I change the setting in config.php... it seems that next executions of the tests continue trying the https urls... so I'm not sure where/how that is stored between executions.
Note I'm not sure whether the solution is to add support for them or to enforce the setting to false.
Just reporting it looking for a solution. Ciao