Commit 43bce7dd authored by Nathan Friend's avatar Nathan Friend

Add basic feature specs for group DORA charts

This commit adds a few high-level feature specs for the group-level DORA
charts.
parent 2b205674
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div> <div data-testid="deployment-frequency-charts">
<dora-chart-header <dora-chart-header
:header-text="s__('DORA4Metrics|Deployment frequency')" :header-text="s__('DORA4Metrics|Deployment frequency')"
:chart-description-text="$options.chartDescriptionText" :chart-description-text="$options.chartDescriptionText"
......
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div> <div data-testid="lead-time-charts">
<dora-chart-header <dora-chart-header
:header-text="$options.i18n.chartHeaderText" :header-text="$options.i18n.chartHeaderText"
:chart-description-text="$options.chartDescriptionText" :chart-description-text="$options.chartDescriptionText"
......
...@@ -29,4 +29,24 @@ RSpec.describe 'Group CI/CD Analytics', :js do ...@@ -29,4 +29,24 @@ RSpec.describe 'Group CI/CD Analytics', :js do
expect(page).to have_content '15 Releases 67% Projects with releases' expect(page).to have_content '15 Releases 67% Projects with releases'
end end
end end
shared_examples 'a DORA chart' do |selector, title|
it "render the #{title} charts", :aggregate_failures do
click_link(title)
within selector do
expect(page).to have_content title
expect(page).to have_content 'Last week Last month Last 90 days'
expect(page).to have_content 'Date range:'
end
end
end
describe 'DORA charts' do
it_behaves_like 'a DORA chart', '[data-testid="deployment-frequency-charts"]', 'Deployment frequency'
it_behaves_like 'a DORA chart', '[data-testid="lead-time-charts"]', 'Lead time'
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