summaryrefslogtreecommitdiff
path: root/spec/features/cycle_analytics_spec.rb
diff options
context:
space:
mode:
authorMehdi Lahmam <mehdi@lahmam.com>2017-08-10 08:42:28 +0200
committerMehdi Lahmam <mehdi@lahmam.com>2017-08-11 22:02:35 +0200
commit6e3ca79dedbe27f64d12dbf391d0823137dcc610 (patch)
tree4b9f6fe2b0fcedf950207d3f6bf59ca018a041b9 /spec/features/cycle_analytics_spec.rb
parent4e8a2feb718face21a6024540c7bfd2bccd6ea25 (diff)
downloadgitlab-ce-6e3ca79dedbe27f64d12dbf391d0823137dcc610.tar.gz
Add a `Last 7 days` option for Cycle Analytics view
Diffstat (limited to 'spec/features/cycle_analytics_spec.rb')
-rw-r--r--spec/features/cycle_analytics_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb
index 1e48cab98a4..bfe9dac3bd4 100644
--- a/spec/features/cycle_analytics_spec.rb
+++ b/spec/features/cycle_analytics_spec.rb
@@ -75,6 +75,20 @@ feature 'Cycle Analytics', js: true do
click_stage('Production')
expect_issue_to_be_present
end
+
+ context "when I change the time period observed" do
+ before do
+ _two_weeks_old_issue = create(:issue, project: project, created_at: 2.weeks.ago)
+
+ click_button('Last 30 days')
+ click_link('Last 7 days')
+ wait_for_requests
+ end
+
+ it 'shows only relevant data' do
+ expect(new_issues_counter).to have_content('1')
+ end
+ end
end
context "when my preferred language is Spanish" do