Discovery integration tests broken due to Selenium

Hello,

looks like something changed in core, this is a regression I don’t know how to solve. The error is:

Selenium::WebDriver::Error::ElementNotInteractableError: element not interactable: Element is not currently visible and may not be manipulated
  (Session info: headless chrome=73.0.3683.86)
  (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 3.10.0-957.10.1.el7.x86_64 x86_64)
    /home/jenkins/workspace/foreman_discovery-pull-request/database/sqlite3/label/fast/ruby/2.5/plugin/test/integration/discovered_hosts_test.rb:153:in `select_from'
    /home/jenkins/workspace/foreman_discovery-pull-request/database/sqlite3/label/fast/ruby/2.5/plugin/test/integration/discovered_hosts_test.rb:75:in `block (3 levels) in <class:DiscoveredHostsTest>' (Selenium::WebDriver::Error::ElementNotInteractableError)

It also takes ages to run the tests. It’s a major bummer because I have a blocker bugs to solve for Discovery and I need to get tests passing. Any help is very appreciated.

I believe this is related to the change from phantomjs to chrome headless that was merged earlier this week. @ezr-ondrej - sounds familiar?

It doesn’t sound familiar, but I believe the headless chrome is the cause anyway. I am going to investigate :slight_smile:

Thanks let me know if you need more info, but all you need to do is checkout develop branches for core and discovery, enable it in bundler and then simply bundle exec test:discovery and that’s all.

All tests are finally green, thanks @ezr-ondrej for integration test fixes. We are ready to go.

https://github.com/theforeman/foreman_discovery/pull/482

I urge for promoting discovery to the same level as Katello and including it with the core test suite. It’s getting broken too often to my taste and there are not many people involved in its development :frowning: