diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-15 21:09:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-15 21:09:29 +0300 |
commit | 0e5ce539275e32cfd7592362e03673807fca9cc7 (patch) | |
tree | 9d2c10afd7965a6dec4a48a36f9d0c886f55247c /spec/frontend/fixtures | |
parent | 977720d7565377672df302ecb82b1e7a221cfba6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/fixtures')
-rw-r--r-- | spec/frontend/fixtures/pipeline_header.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/frontend/fixtures/pipeline_header.rb b/spec/frontend/fixtures/pipeline_header.rb index 89f548caf72..3fdc45b1194 100644 --- a/spec/frontend/fixtures/pipeline_header.rb +++ b/spec/frontend/fixtures/pipeline_header.rb @@ -64,6 +64,32 @@ RSpec.describe "GraphQL Pipeline Header", '(JavaScript fixtures)', type: :reques end end + context 'with running pipeline and duration' do + let_it_be(:pipeline) do + create( + :ci_pipeline, + project: project, + sha: commit.id, + ref: 'master', + user: user, + status: :running, + duration: 7210, + created_at: 2.hours.ago, + started_at: 1.hour.ago + ) + end + + let_it_be(:build) { create(:ci_build, :running, pipeline: pipeline, ref: 'master') } + + it "graphql/pipelines/pipeline_header_running_with_duration.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 + context 'with failed pipeline' do let_it_be(:pipeline) do create( |