Commit 993ee13f authored by Imre Farkas's avatar Imre Farkas

Merge branch 'ek-minor-refactor-remaining-vsa-specs' into 'master'

Minor refactor analytics/cycle_analytics feature specs

See merge request gitlab-org/gitlab!44412
parents 4660b823 52f0ee7d
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
RSpec.describe 'Group Value Stream Analytics', :js do RSpec.describe 'Multiple value streams', :js do
let_it_be(:group) { create(:group, name: 'CA-test-group') } let_it_be(:group) { create(:group, name: 'CA-test-group') }
let_it_be(:project) { create(:project, :repository, namespace: group, group: group, name: 'Cool fun project') } let_it_be(:project) { create(:project, :repository, namespace: group, group: group, name: 'Cool fun project') }
let_it_be(:user) do let_it_be(:user) do
...@@ -15,6 +15,9 @@ RSpec.describe 'Group Value Stream Analytics', :js do ...@@ -15,6 +15,9 @@ RSpec.describe 'Group Value Stream Analytics', :js do
duration_stage_selector = '.js-dropdown-stages' duration_stage_selector = '.js-dropdown-stages'
value_stream_selector = '[data-testid="dropdown-value-streams"]' value_stream_selector = '[data-testid="dropdown-value-streams"]'
let(:value_stream_dropdown) { page.find(value_stream_selector) }
let!(:default_value_stream) { create(:cycle_analytics_group_value_stream, group: group, name: 'default') }
3.times do |i| 3.times do |i|
let_it_be("issue_#{i}".to_sym) { create(:issue, title: "New Issue #{i}", project: project, created_at: 2.days.ago) } let_it_be("issue_#{i}".to_sym) { create(:issue, title: "New Issue #{i}", project: project, created_at: 2.days.ago) }
end end
...@@ -57,10 +60,6 @@ RSpec.describe 'Group Value Stream Analytics', :js do ...@@ -57,10 +60,6 @@ RSpec.describe 'Group Value Stream Analytics', :js do
wait_for_requests wait_for_requests
end end
describe 'Multiple value streams', :js do
let(:value_stream_dropdown) { page.find(value_stream_selector) }
let!(:default_value_stream) { create(:cycle_analytics_group_value_stream, group: group, name: 'default') }
describe 'Create value stream' do describe 'Create value stream' do
before do before do
select_group select_group
...@@ -106,5 +105,4 @@ RSpec.describe 'Group Value Stream Analytics', :js do ...@@ -106,5 +105,4 @@ RSpec.describe 'Group Value Stream Analytics', :js do
expect(page).to have_text(_("'%{name}' Value Stream deleted") % { name: custom_value_stream_name }) expect(page).to have_text(_("'%{name}' Value Stream deleted") % { name: custom_value_stream_name })
end end
end 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