diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-02 18:09:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-02 18:09:42 +0300 |
commit | f5f72042cbd7cf07f6a621de495f053d576fa752 (patch) | |
tree | 267aaf3ee2225ab4468b30ca4ac5d5e8648fc635 /spec/frontend/fixtures/pipeline_header.rb | |
parent | e9570ea27e2dc549962b9b318af369e9363fd1c4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/fixtures/pipeline_header.rb')
-rw-r--r-- | spec/frontend/fixtures/pipeline_header.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/fixtures/pipeline_header.rb b/spec/frontend/fixtures/pipeline_header.rb index a4fba7e8675..d25bf12623f 100644 --- a/spec/frontend/fixtures/pipeline_header.rb +++ b/spec/frontend/fixtures/pipeline_header.rb @@ -51,6 +51,8 @@ RSpec.describe "GraphQL Pipeline Header", '(JavaScript fixtures)', type: :reques ) end + let_it_be(:build) { create(:ci_build, :running, pipeline: pipeline, ref: 'master') } + it "graphql/pipelines/pipeline_header_running.json" do query = get_graphql_query_as_string(query_path) @@ -59,4 +61,29 @@ RSpec.describe "GraphQL Pipeline Header", '(JavaScript fixtures)', type: :reques expect_graphql_errors_to_be_empty end end + + context 'with failed pipeline' do + let_it_be(:pipeline) do + create( + :ci_pipeline, + project: project, + sha: commit.id, + ref: 'master', + user: user, + status: :failed, + started_at: 1.hour.ago, + finished_at: Time.current + ) + end + + let_it_be(:build) { create(:ci_build, :canceled, pipeline: pipeline, ref: 'master') } + + it "graphql/pipelines/pipeline_header_failed.json" do + query = get_graphql_query_as_string(query_path) + + post_graphql(query, current_user: user, variables: { fullPath: project.full_path, iid: pipeline.iid }) + + expect_graphql_errors_to_be_empty + end + end end |