Commit b3a52448 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'rs-transient-mini-pipeline-graph-failure' into 'master'

Fix a transient failure in mini_pipeline_graph_spec

Closes #34323

See merge request !13844
parents 1a09c207 8d72f097
require 'rails_helper' require 'rails_helper'
feature 'Mini Pipeline Graph in Commit View', :js do feature 'Mini Pipeline Graph in Commit View', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
before do
sign_in(user)
end
context 'when commit has pipelines' do context 'when commit has pipelines' do
let(:pipeline) do let(:pipeline) do
create(:ci_empty_pipeline, create(:ci_empty_pipeline,
...@@ -15,21 +10,14 @@ feature 'Mini Pipeline Graph in Commit View', :js do ...@@ -15,21 +10,14 @@ feature 'Mini Pipeline Graph in Commit View', :js do
ref: project.default_branch, ref: project.default_branch,
sha: project.commit.sha) sha: project.commit.sha)
end end
let(:build) { create(:ci_build, pipeline: pipeline) }
let(:build) do it 'displays a mini pipeline graph' do
create(:ci_build, pipeline: pipeline)
end
before do
build.run build.run
visit project_commit_path(project, project.commit.id) visit project_commit_path(project, project.commit.id)
end
it 'should display a mini pipeline graph' do
expect(page).to have_selector('.mr-widget-pipeline-graph') expect(page).to have_selector('.mr-widget-pipeline-graph')
end
it 'should show the builds list when stage is clicked' do
first('.mini-pipeline-graph-dropdown-toggle').click first('.mini-pipeline-graph-dropdown-toggle').click
wait_for_requests wait_for_requests
...@@ -38,6 +26,8 @@ feature 'Mini Pipeline Graph in Commit View', :js do ...@@ -38,6 +26,8 @@ feature 'Mini Pipeline Graph in Commit View', :js do
expect(page).to have_selector('.ci-status-icon-running') expect(page).to have_selector('.ci-status-icon-running')
expect(page).to have_content(build.stage) expect(page).to have_content(build.stage)
end end
build.drop
end end
end end
......
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