Skip to content

Transient failure in qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb

https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/327460773

Found in !16172 (merged)

  1) Create Download merge request patch and diff views the merge request email patches
     Failure/Error: Runtime::Browser.visit(:gitlab, Page::Main::Login)
     
     QA::Page::Validatable::PageValidationError:
       login_page did not appear on QA::Page::Main::Login as expected
     # ./qa/page/validatable.rb:16:in `block in validate_elements_present!'
     # ./qa/page/validatable.rb:11:in `each'
     # ./qa/page/validatable.rb:11:in `validate_elements_present!'
     # ./qa/runtime/browser.rb:149:in `perform'
     # ./qa/runtime/browser.rb:34:in `visit'
     # ./qa/runtime/browser.rb:38:in `visit'
     # ./qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb:7:in `block (3 levels) in <module:QA>'

It failed right at the start of the test. It didn't retry because it failed in before(:context)

The next test also failed and shows the projects page in the screenshot:

projects

That suggests the capybara session wasn't reset successfully after the previous test, which was qa/qa/specs/features/ee/browser_ui/1_manage/group/group_file_template_spec.rb.

That test has an after block that leaves the test logged in:

      after(:all) do
        login unless Page::Main::Menu.perform { |p| p.has_personal_area?(wait: 0) }

        remove_group_file_template_if_set
      end

A likely fix is to log out inside that after block.

The tests ran with seed 41443.

Edited by Mark Lapierre