Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-15 21:09:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-15 21:09:29 +0300
commit0e5ce539275e32cfd7592362e03673807fca9cc7 (patch)
tree9d2c10afd7965a6dec4a48a36f9d0c886f55247c /spec/frontend/fixtures
parent977720d7565377672df302ecb82b1e7a221cfba6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/fixtures')
-rw-r--r--spec/frontend/fixtures/pipeline_header.rb26
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(