Failure in integration-geo-ee QA job
The integration-geo-ee
job has been failing since #99980158 in the nightly pipelines:
Capybara::ElementNotFound: Unable to find visible checkbox "Use hashed storage paths for newly created and renamed projects" that is not disabled within #<Capybara::Node::Element tag="section" path="/html/body/div/div[2]/div[3]/div/section[5]">
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/finders.rb:314:in `block in synced_resolve'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/base.rb:81:in `synchronize'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/finders.rb:302:in `synced_resolve'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/finders.rb:37:in `find'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/actions.rb:300:in `block in _check_with_label'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/base.rb:85:in `synchronize'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/actions.rb:298:in `_check_with_label'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/node/actions.rb:140:in `check'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/session.rb:810:in `block (2 levels) in <class:Session>'
/usr/local/bundle/gems/capybara-2.16.1/lib/capybara/dsl.rb:50:in `block (2 levels) in <module:DSL>'
/home/qa/qa/page/admin/settings/repository_storage.rb:13:in `enable_hashed_storage'
/home/qa/qa/factory/settings/hashed_storage.rb:14:in `block (2 levels) in fabricate!'
Unfortunately the framework hasn't captured a screenshot there (probably because it's not within a test) but when I run the tests locally I get the same error. The expected checkbox isn't there because it's loading the terms of service settings:
qa/qa/factory/settings/hashed_storage.rb
:
module QA
module Factory
module Settings
class HashedStorage < Factory::Base
def fabricate!(*traits)
raise ArgumentError unless traits.include?(:enabled)
Page::Main::Login.act { sign_in_using_credentials }
Page::Menu::Main.act { go_to_admin_area }
Page::Menu::Admin.act { go_to_settings }
Page::Admin::Settings::Main.perform do |setting|
setting.expand_repository_storage do |page|
page.enable_hashed_storage
page.save_settings
end
end
QA::Page::Menu::Main.act { sign_out }
end
end
end
end
end
Page::Menu::Admin.act { go_to_settings }
goes to the main settings page. Looks like we need to go to Admin > Settings > Repository
And qa/qa/page/admin/settings/main.rb
module QA
module Page
module Admin
module Settings
class Main < Page::Base
include QA::Page::Settings::Common
view 'app/views/admin/application_settings/show.html.haml' do
element :terms_settings
end
def expand_repository_storage(&block)
expand_section(:terms_settings) do
RepositoryStorage.perform(&block)
end
end
end
end
end
end
end
Looks like the repository storage settings page object is looking in the wrong place. I think we need a new page object for Repository settings. There is qa/qa/page/admin/settings/repository_storage.rb
but that's more of a component - it represents the repository storage section of the Repository Settings page, but it's the latter page that doesn't seem to be prepresented.