Skip to content
代码片段 群组 项目
未验证 提交 03b02dab 编辑于 作者: John McDonnell's avatar John McDonnell 提交者: GitLab
浏览文件

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
上级 290cd04f
No related branches found
No related tags found
无相关合并请求
...@@ -15,6 +15,12 @@ def self.included(base) ...@@ -15,6 +15,12 @@ def self.included(base)
end end
def has_breadcrumb?(text) 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) has_element?('breadcrumb-links', text: text)
end end
end end
......
...@@ -31,11 +31,7 @@ module QA ...@@ -31,11 +31,7 @@ module QA
Page::Project::Menu.perform(&:click_project) Page::Project::Menu.perform(&:click_project)
Page::Project::Show.perform do |project| Page::Project::Show.perform do |project|
# TODO breadcrumb test should be updated. expect(project).to have_breadcrumb(target_group.path)
# 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_readme_content(readme_content) expect(project).to have_readme_content(readme_content)
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册