diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/support/helpers/cycle_analytics_helpers.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/support/helpers/cycle_analytics_helpers.rb')
-rw-r--r-- | spec/support/helpers/cycle_analytics_helpers.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/support/helpers/cycle_analytics_helpers.rb b/spec/support/helpers/cycle_analytics_helpers.rb index 6d3ac699a7c..a90cbbf3bd3 100644 --- a/spec/support/helpers/cycle_analytics_helpers.rb +++ b/spec/support/helpers/cycle_analytics_helpers.rb @@ -3,6 +3,32 @@ module CycleAnalyticsHelpers include GitHelpers + def wait_for_stages_to_load + expect(page).to have_selector '.js-stage-table' + wait_for_requests + end + + def select_group(target_group) + visit group_analytics_cycle_analytics_path(target_group) + + wait_for_stages_to_load + end + + def toggle_dropdown(field) + page.within("[data-testid='#{field}']") do + find('.dropdown-toggle').click + + wait_for_requests + + expect(find('.dropdown-menu')).to have_selector('.dropdown-item') + end + end + + def select_dropdown_option_by_value(name, value, elem = '.dropdown-item') + toggle_dropdown name + page.find("[data-testid='#{name}'] .dropdown-menu").find("#{elem}[value='#{value}']").click + end + def create_commit_referencing_issue(issue, branch_name: generate(:branch)) project.repository.add_branch(user, branch_name, 'master') create_commit("Commit for ##{issue.iid}", issue.project, user, branch_name) |