debian-mirror-gitlab/spec/support/helpers/features/top_nav_spec_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
819 B
Ruby
Raw Normal View History

2021-09-04 01:27:46 +05:30
# frozen_string_literal: true
2021-09-30 23:02:18 +05:30
# These helpers help you interact within the Source Editor (single-file editor, snippets, etc.).
2021-09-04 01:27:46 +05:30
#
module Spec
module Support
module Helpers
module Features
module TopNavSpecHelpers
def open_top_nav
find('.js-top-nav-dropdown-toggle').click
end
def within_top_nav
2021-10-27 15:23:28 +05:30
within('.js-top-nav-dropdown-menu') do
yield
2021-09-04 01:27:46 +05:30
end
end
def open_top_nav_projects
2021-10-27 15:23:28 +05:30
open_top_nav
2021-09-04 01:27:46 +05:30
2021-10-27 15:23:28 +05:30
within_top_nav do
click_button('Projects')
2021-09-04 01:27:46 +05:30
end
end
def open_top_nav_groups
open_top_nav
within_top_nav do
click_button('Groups')
end
end
end
end
end
end
end