diff --git a/qa/qa/page/component/breadcrumbs.rb b/qa/qa/page/component/breadcrumbs.rb index 08faea0c7607fc2701bbe0c39bbfbabe57043146..e3c9f0c48d609f6a206d7fb407403ee0fa794614 100644 --- a/qa/qa/page/component/breadcrumbs.rb +++ b/qa/qa/page/component/breadcrumbs.rb @@ -15,6 +15,12 @@ def self.included(base) end def has_breadcrumb?(text) + # In some situations the length of the breadcrumbs may lead to it being condensed. For these situations + # open the dropdown toggle which should allow us to see the all components of the breadcrumb. + if has_no_element?('breadcrumb-links', text: text, wait: 0) + within_element('breadcrumb-links') { click_element('base-dropdown-toggle') } + end + has_element?('breadcrumb-links', text: text) end end diff --git a/qa/qa/specs/features/browser_ui/9_data_stores/group/transfer_project_spec.rb b/qa/qa/specs/features/browser_ui/9_data_stores/group/transfer_project_spec.rb index 5b510b5aadf7e1ec0b7b268cebcf66044a13723e..284dd221251a6aed5fce528982662a3d561aac09 100644 --- a/qa/qa/specs/features/browser_ui/9_data_stores/group/transfer_project_spec.rb +++ b/qa/qa/specs/features/browser_ui/9_data_stores/group/transfer_project_spec.rb @@ -31,11 +31,7 @@ module QA Page::Project::Menu.perform(&:click_project) Page::Project::Show.perform do |project| - # TODO breadcrumb test should be updated. - # I'm commenting it out for now. I will create a follow-up issue to fix this. - # https://gitlab.com/gitlab-org/gitlab/-/issues/497758#note_2145018495 - # expect(project).to have_breadcrumb(target_group.path) - + expect(project).to have_breadcrumb(target_group.path) expect(project).to have_readme_content(readme_content) end end