Commit 33c2a94c authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch '33008-fix-failure-in-create-snippet-spec' into 'master'

Resolve "Failure in qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb"

Closes #33008

See merge request gitlab-org/gitlab!17871
parents 1f2f4d52 7e42bb0d
......@@ -21,7 +21,7 @@
- if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets])
%li.header-more.dropdown
%a{ href: "#", data: { toggle: "dropdown" } }
%a{ href: "#", data: { toggle: "dropdown", qa_selector: 'more_dropdown' } }
= _('More')
= sprite_icon('angle-down', css_class: 'caret-down')
.dropdown-menu
......@@ -42,7 +42,7 @@
- if dashboard_nav_link?(:snippets)
= nav_link(controller: 'dashboard/snippets') do
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets qa-snippets-link' do
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', data: { qa_selector: 'snippets_link' } do
= _('Snippets')
= render_if_exists 'layouts/nav/sidebar/analytics_more_link'
......
......@@ -20,6 +20,7 @@ module QA
element :admin_area_link
element :projects_dropdown, required: true
element :groups_dropdown, required: true
element :more_dropdown, required: true
element :snippets_link
end
......@@ -52,6 +53,13 @@ module QA
end
end
def go_to_snippets
within_top_menu do
click_element :more_dropdown
click_element :snippets_link
end
end
def click_admin_area
within_top_menu { click_element :admin_area_link }
end
......@@ -80,10 +88,6 @@ module QA
end
end
def click_snippets_link
click_element :snippets_link
end
def search_for(term)
fill_element :search_term_field, "#{term}\n"
end
......
......@@ -7,7 +7,7 @@ module QA
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
Page::Main::Menu.perform(&:click_snippets_link)
Page::Main::Menu.perform(&:go_to_snippets)
Resource::Snippet.fabricate_via_browser_ui! do |snippet|
snippet.title = 'Snippet title'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment