Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-07 12:08:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-07 12:08:49 +0300
commit456a7247f9e88fc2518b69a1a00e905c6db6d775 (patch)
tree6235f3838cbf078d46de056442d9562ee4abbd74 /spec/features/calendar_spec.rb
parentddd268b03b6f35c68e5a89606dbfd516f72846fd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/calendar_spec.rb')
-rw-r--r--spec/features/calendar_spec.rb34
1 files changed, 27 insertions, 7 deletions
diff --git a/spec/features/calendar_spec.rb b/spec/features/calendar_spec.rb
index bac5c9f568e..acdc38038aa 100644
--- a/spec/features/calendar_spec.rb
+++ b/spec/features/calendar_spec.rb
@@ -3,6 +3,8 @@
require 'spec_helper'
describe 'Contributions Calendar', :js do
+ include MobileHelpers
+
let(:user) { create(:user) }
let(:contributed_project) { create(:project, :public, :repository) }
let(:issue_note) { create(:note, project: contributed_project) }
@@ -122,15 +124,15 @@ describe 'Contributions Calendar', :js do
end
end
- describe 'calendar daily activities' do
- shared_context 'visit user page' do
- before do
- visit user.username
- page.find('.js-overview-tab a').click
- wait_for_requests
- end
+ shared_context 'visit user page' do
+ before do
+ visit user.username
+ page.find('.js-overview-tab a').click
+ wait_for_requests
end
+ end
+ describe 'calendar daily activities' do
shared_examples 'a day with activity' do |contribution_count:|
include_context 'visit user page'
@@ -199,4 +201,22 @@ describe 'Contributions Calendar', :js do
end
end
end
+
+ describe 'on smaller screens' do
+ shared_examples 'hidden activity calendar' do
+ include_context 'visit user page'
+
+ it 'hides the activity calender' do
+ expect(find('#js-overview')).not_to have_css('.js-contrib-calendar')
+ end
+ end
+
+ context 'size xs' do
+ before do
+ resize_screen_xs
+ end
+
+ it_behaves_like 'hidden activity calendar'
+ end
+ end
end