Intermittent HostgroupJSTest.test_0001_submit updates taxonomy test failures
The JS integration test in #12793 to test the multi-select behaviour intermittently fails:
NoMethodError: undefined method `click' for nil:NilClass test/integration/hostgroup_js_test.rb:43:in `select_from_list' test/integration/hostgroup_js_test.rb:10:in `block in <class:HostgroupJSTest>' (NoMethodError) /var/lib/workspace/workspace/test_develop_pr_core@3/database/postgresql/label/fast/ruby/2.0.0/test/integration/hostgroup_js_test.rb:43
fixes #14350 - replace selector to ensure Capybara wait is used
The CSS selector using .all wouldn't wait for a matching element to be
rendered, so any delay could cause it to match nothing. Since text can't
be matched in a CSS selector, it's been replaced with an XPath selector.
The test was also passing a block to Array#first, which was ignored
causing the wrong item to be selected.