Commit 00fcd482 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'ek-address-minor-vsa-tech-debt' into 'master'

Re-instate missing padding for stage popovers

See merge request gitlab-org/gitlab!69831
parents c4553d30 6a64fc67
...@@ -132,7 +132,8 @@ export default { ...@@ -132,7 +132,8 @@ export default {
<div class="gl-display-flex gl-flex-direction-column gl-md-flex-direction-row"> <div class="gl-display-flex gl-flex-direction-column gl-md-flex-direction-row">
<path-navigation <path-navigation
v-if="displayPathNavigation" v-if="displayPathNavigation"
class="js-path-navigation gl-w-full gl-pb-2" data-testid="vsa-path-navigation"
class="gl-w-full gl-pb-2"
:loading="isLoading || isLoadingStage" :loading="isLoading || isLoadingStage"
:stages="pathNavigationData" :stages="pathNavigationData"
:selected-stage="selectedStage" :selected-stage="selectedStage"
......
...@@ -61,7 +61,8 @@ export default { ...@@ -61,7 +61,8 @@ export default {
<template> <template>
<div class="gl-mt-3 gl-py-2 gl-px-3 bg-gray-light border-top border-bottom"> <div class="gl-mt-3 gl-py-2 gl-px-3 bg-gray-light border-top border-bottom">
<filter-bar <filter-bar
class="js-filter-bar filtered-search-box gl-display-flex gl-mb-2 gl-mr-3 gl-border-none" data-testid="vsa-filter-bar"
class="filtered-search-box gl-display-flex gl-mb-2 gl-mr-3 gl-border-none"
:group-path="groupPath" :group-path="groupPath"
/> />
<div <div
......
...@@ -166,7 +166,8 @@ export default { ...@@ -166,7 +166,8 @@ export default {
<div v-if="!shouldRenderEmptyState" class="gl-max-w-full"> <div v-if="!shouldRenderEmptyState" class="gl-max-w-full">
<path-navigation <path-navigation
v-if="selectedStageReady" v-if="selectedStageReady"
class="js-path-navigation gl-w-full gl-pb-2" data-testid="vsa-path-navigation"
class="gl-w-full gl-pb-2"
:loading="isLoading" :loading="isLoading"
:stages="pathNavigationData" :stages="pathNavigationData"
:selected-stage="selectedStage" :selected-stage="selectedStage"
......
...@@ -29,6 +29,23 @@ ...@@ -29,6 +29,23 @@
} }
} }
// Since backend wraps event description in a paragraph
// we need to remove common styles, i.e., spacing
.stage-item-popover {
.stage-event-description p {
margin: 0 !important;
}
.popover-body {
padding-left: 0 !important;
padding-right: 0 !important;
}
.metric-label {
flex: 0 0 20%;
}
}
.stage-list-move { .stage-list-move {
transition: transform 0.15s; transition: transform 0.15s;
} }
...@@ -17,9 +17,8 @@ RSpec.describe 'Group value stream analytics filters and data', :js do ...@@ -17,9 +17,8 @@ RSpec.describe 'Group value stream analytics filters and data', :js do
let(:mr) { create_merge_request_closing_issue(user, project, issue, commit_message: "References #{issue.to_reference}") } let(:mr) { create_merge_request_closing_issue(user, project, issue, commit_message: "References #{issue.to_reference}") }
let(:pipeline) { create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha, head_pipeline_of: mr) } let(:pipeline) { create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha, head_pipeline_of: mr) }
stage_nav_selector = '.stage-nav' path_nav_selector = '[data-testid="vsa-path-navigation"]'
path_nav_selector = '.js-path-navigation' filter_bar_selector = '[data-testid="vsa-filter-bar"]'
filter_bar_selector = '.js-filter-bar'
card_metric_selector = '[data-testid="vsa-time-metrics"] .gl-single-stat' card_metric_selector = '[data-testid="vsa-time-metrics"] .gl-single-stat'
new_issues_count = 3 new_issues_count = 3
...@@ -29,7 +28,7 @@ RSpec.describe 'Group value stream analytics filters and data', :js do ...@@ -29,7 +28,7 @@ RSpec.describe 'Group value stream analytics filters and data', :js do
def select_stage(name) def select_stage(name)
string_id = "CycleAnalyticsStage|#{name}" string_id = "CycleAnalyticsStage|#{name}"
within '[data-testid="gl-path-nav"]' do within '[data-testid="vsa-path-navigation"]' do
page.find('li', text: s_(string_id), match: :prefer_exact).click page.find('li', text: s_(string_id), match: :prefer_exact).click
end end
...@@ -124,12 +123,6 @@ RSpec.describe 'Group value stream analytics filters and data', :js do ...@@ -124,12 +123,6 @@ RSpec.describe 'Group value stream analytics filters and data', :js do
end end
end end
context 'vertical navigation' do
it 'does not show the vertical stage navigation' do
expect(page).not_to have_selector(stage_nav_selector)
end
end
context 'navigation' do context 'navigation' do
before do before do
select_group(selected_group) select_group(selected_group)
...@@ -302,7 +295,7 @@ RSpec.describe 'Group value stream analytics filters and data', :js do ...@@ -302,7 +295,7 @@ RSpec.describe 'Group value stream analytics filters and data', :js do
[].concat(stages_without_data, stages_with_data).each do |stage| [].concat(stages_without_data, stages_with_data).each do |stage|
select_stage(stage[:title]) select_stage(stage[:title])
stage_name = page.find('.js-path-navigation .gl-path-active-item-indigo').text stage_name = page.find("#{path_nav_selector} .gl-path-active-item-indigo").text
expect(stage_name).to include(stage[:title]) expect(stage_name).to include(stage[:title])
expect(stage_name).to include(stage[:time]) expect(stage_name).to include(stage[:time])
end end
......
...@@ -38,7 +38,7 @@ RSpec.describe 'Multiple value streams', :js do ...@@ -38,7 +38,7 @@ RSpec.describe 'Multiple value streams', :js do
end end
def path_nav_elem def path_nav_elem
page.find('[data-testid="gl-path-nav"]') page.find('[data-testid="vsa-path-navigation"]')
end end
def click_action_button(action, index) def click_action_button(action, index)
......
...@@ -71,12 +71,12 @@ module CycleAnalyticsHelpers ...@@ -71,12 +71,12 @@ module CycleAnalyticsHelpers
save_value_stream(custom_value_stream_name) save_value_stream(custom_value_stream_name)
end end
def wait_for_stages_to_load(selector = '.js-path-navigation') def wait_for_stages_to_load(selector = '[data-testid="vsa-path-navigation"]')
expect(page).to have_selector selector expect(page).to have_selector selector
wait_for_requests wait_for_requests
end end
def select_group(target_group, ready_selector = '.js-path-navigation') def select_group(target_group, ready_selector = '[data-testid="vsa-path-navigation"]')
visit group_analytics_cycle_analytics_path(target_group) visit group_analytics_cycle_analytics_path(target_group)
wait_for_stages_to_load(ready_selector) wait_for_stages_to_load(ready_selector)
......
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