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:
Diffstat (limited to 'spec/features/projects/commit/mini_pipeline_graph_spec.rb')
-rw-r--r--spec/features/projects/commit/mini_pipeline_graph_spec.rb29
1 files changed, 28 insertions, 1 deletions
diff --git a/spec/features/projects/commit/mini_pipeline_graph_spec.rb b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
index d2104799e79..5bb3d1af924 100644
--- a/spec/features/projects/commit/mini_pipeline_graph_spec.rb
+++ b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe 'Mini Pipeline Graph in Commit View', :js, feature_category: :source_code_management do
let(:project) { create(:project, :public, :repository) }
- context 'when commit has pipelines' do
+ context 'when commit has pipelines and feature flag is enabled' do
let(:pipeline) do
create(
:ci_pipeline,
@@ -24,6 +24,33 @@ RSpec.describe 'Mini Pipeline Graph in Commit View', :js, feature_category: :sou
wait_for_requests
end
+ it 'displays the graphql pipeline stage' do
+ expect(page).to have_selector('[data-testid="pipeline-stage"]')
+
+ build.drop
+ end
+ end
+
+ context 'when commit has pipelines and feature flag is disabled' do
+ let(:pipeline) do
+ create(
+ :ci_pipeline,
+ status: :running,
+ project: project,
+ ref: project.default_branch,
+ sha: project.commit.sha
+ )
+ end
+
+ let(:build) { create(:ci_build, pipeline: pipeline, status: :running) }
+
+ before do
+ stub_feature_flags(ci_graphql_pipeline_mini_graph: false)
+ build.run
+ visit project_commit_path(project, project.commit.id)
+ wait_for_requests
+ end
+
it 'display icon with status' do
expect(page).to have_selector('.ci-status-icon-running')
end