Fix Main::Menu locators
Fix the locators to not use a regex Add requirement
This commit is contained in:
parent
390e0d8906
commit
98fc3f23db
2 changed files with 4 additions and 4 deletions
|
@ -64,7 +64,7 @@
|
|||
.dropdown-menu.dropdown-menu-right
|
||||
= render 'layouts/header/help_dropdown'
|
||||
- if header_link?(:user_dropdown)
|
||||
%li.nav-item.header-user.dropdown{ data: { track_label: "profile_dropdown", track_event: "click_dropdown" } }
|
||||
%li.nav-item.header-user.dropdown{ data: { track_label: "profile_dropdown", track_event: "click_dropdown", qa_selector: 'user_menu' } }
|
||||
= link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do
|
||||
= image_tag avatar_icon_for_user(current_user, 23), width: 23, height: 23, class: "header-user-avatar qa-user-avatar"
|
||||
= sprite_icon('angle-down', css_class: 'caret-down')
|
||||
|
|
|
@ -12,7 +12,7 @@ module QA
|
|||
view 'app/views/layouts/header/_default.html.haml' do
|
||||
element :navbar, required: true
|
||||
element :user_avatar, required: true
|
||||
element :user_menu, '.dropdown-menu' # rubocop:disable QA/ElementWithPattern
|
||||
element :user_menu, required: true
|
||||
end
|
||||
|
||||
view 'app/views/layouts/nav/_dashboard.html.haml' do
|
||||
|
@ -82,7 +82,7 @@ module QA
|
|||
private
|
||||
|
||||
def within_top_menu
|
||||
page.within('.qa-navbar') do
|
||||
within_element(:navbar) do
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
@ -91,7 +91,7 @@ module QA
|
|||
within_top_menu do
|
||||
click_element :user_avatar
|
||||
|
||||
page.within('.dropdown-menu') do
|
||||
within_element(:user_menu) do
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue