Skip to content
代码片段 群组 项目
提交 abf110e2 编辑于 作者: John McDonnell's avatar John McDonnell
浏览文件

[E2E] Add RSpec Matcher for be_mergeable

上级 4a521f50
No related branches found
No related tags found
无相关合并请求
......@@ -311,13 +311,14 @@ def merged?
end
end
# Check if the MR is able to be merged
# Waits up 10 seconds and returns false if the MR can't be merged
def mergeable?
# The merge button is enabled via JS, but `has_element?` calls
# `wait_for_requests`, which should ensure the disabled/enabled
# state of the element is reliable
has_element?(:merge_button, disabled: false)
RSpec::Matchers.define :be_mergeable do
match do |page|
page.has_element?(:merge_button, disabled: false)
end
match_when_negated do |page|
page.has_no_element?(:merge_button, disabled: false)
end
end
# Waits up 10 seconds and returns false if the Revert button is not enabled
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册