debian-mirror-gitlab/spec/support/helpers/merge_request_helpers.rb

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

25 lines
632 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2016-09-13 17:45:13 +05:30
module MergeRequestHelpers
def visit_merge_requests(project, opts = {})
2017-09-10 17:25:29 +05:30
visit project_merge_requests_path project, opts
2016-09-13 17:45:13 +05:30
end
def first_merge_request
page.all('ul.mr-list > li').first.text
end
def last_merge_request
page.all('ul.mr-list > li').last.text
end
2017-08-17 22:00:37 +05:30
def expect_mr_list_count(open_count, closed_count = 0)
all_count = open_count + closed_count
expect(page).to have_issuable_counts(open: open_count, closed: closed_count, all: all_count)
page.within '.mr-list' do
expect(page).to have_selector('.merge-request', count: open_count)
end
end
2016-09-13 17:45:13 +05:30
end