Welcome to mirror list, hosted at ThFree Co, Russian Federation.

top_nav_spec_helpers.rb « features « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ecc05189fb4e2486beab47e6bc5ededafdcd4b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

# These helpers help you interact within the Source Editor (single-file editor, snippets, etc.).
#
module Features
  module TopNavSpecHelpers
    def open_top_nav
      find('.js-top-nav-dropdown-toggle').click
    end

    def within_top_nav
      within('.js-top-nav-dropdown-menu') do
        yield
      end
    end

    def open_top_nav_projects
      open_top_nav

      within_top_nav do
        click_button('Projects')
      end
    end

    def open_top_nav_groups
      open_top_nav

      within_top_nav do
        click_button('Groups')
      end
    end
  end
end