Commit 76b7a0e8 authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'provide-have-aliases-for-completed-jobs' into 'master'

Provide has aliases for completed jobs/pipelines

See merge request gitlab-org/gitlab!28975
parents b88f6835 a7b3f452
......@@ -13,6 +13,10 @@ module QA
timeout ? completed?(timeout: timeout) : completed?
status_badge == status
end
# has_passed? => passed?
# has_failed? => failed?
alias_method :"has_#{status}?", :"#{status}?"
end
# e.g. def pending?; status_badge == 'pending'; end
......
......@@ -32,7 +32,7 @@ module QA
parent_pipeline.click_linked_job(project.name)
expect(parent_pipeline).to have_job("child_job")
expect(parent_pipeline).to be_passed
expect(parent_pipeline).to have_passed
end
end
......@@ -44,7 +44,7 @@ module QA
parent_pipeline.click_linked_job(project.name)
expect(parent_pipeline).to have_job("child_job")
expect(parent_pipeline).to be_failed
expect(parent_pipeline).to have_failed
end
end
......
......@@ -32,7 +32,7 @@ module QA
parent_pipeline.click_linked_job(project.name)
expect(parent_pipeline).to have_job("child_job")
expect(parent_pipeline).to be_passed
expect(parent_pipeline).to have_passed
end
end
......@@ -44,7 +44,7 @@ module QA
parent_pipeline.click_linked_job(project.name)
expect(parent_pipeline).to have_job("child_job")
expect(parent_pipeline).to be_passed
expect(parent_pipeline).to have_passed
end
end
......
......@@ -85,7 +85,7 @@ module QA
end
Page::Project::Pipeline::Show.perform do |show|
expect(show).to be_passed
expect(show).to have_passed
expect(show).to have_no_job("downstream_job")
show.click_linked_job(downstream_project_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment