Skip to content
Snippets Groups Projects
Unverified Commit 03b02dab authored by John McDonnell's avatar John McDonnell Committed by GitLab
Browse files

E2E: Always expand breadcrumbs prior to checking for text

In some situations the breadcrumbs may be condensed if the full path
cannot be rendered in a limited amount of space. Certain tests execute
checks against text in the breadcrumbs and so in these situations if
the part of the component that is expected is hidden the test would
fail. It should be safe to expand the breadcrumb prior to checking for
text, which should still result in the the check has_breadcrumb?(text)
returnign the same true/false value.

Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/497758
parent 290cd04f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment