summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJose Ivan Vargas Lopez <jvargas@gitlab.com>2017-04-19 19:10:16 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2017-04-19 19:10:16 +0000
commita63b18b14f82de10d00047c71fec67b65b099aae (patch)
tree2176838edafd2eb348b2bb6c56a3eb700b3ad343 /spec
parentc57e66bebb930b1a7be539a809f7f5a8188e9870 (diff)
downloadgitlab-ce-a63b18b14f82de10d00047c71fec67b65b099aae.tar.gz
Set the issuable sidebar to remain collapsed on mobile devices
Diffstat (limited to 'spec')
-rw-r--r--spec/features/issues/issue_sidebar_spec.rb14
-rw-r--r--spec/support/mobile_helpers.rb4
2 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb
index 7b9d4534ada..85585587fb1 100644
--- a/spec/features/issues/issue_sidebar_spec.rb
+++ b/spec/features/issues/issue_sidebar_spec.rb
@@ -120,6 +120,20 @@ feature 'Issue Sidebar', feature: true do
end
end
+ context 'as a allowed mobile user', js: true do
+ before do
+ project.team << [user, :developer]
+ resize_screen_xs
+ visit_issue(project, issue)
+ end
+
+ context 'mobile sidebar' do
+ it 'collapses the sidebar for small screens' do
+ expect(page).not_to have_css('aside.right-sidebar.right-sidebar-collapsed')
+ end
+ end
+ end
+
context 'as a guest' do
before do
project.team << [user, :guest]
diff --git a/spec/support/mobile_helpers.rb b/spec/support/mobile_helpers.rb
index 20d5849bcab..431f20a2a5c 100644
--- a/spec/support/mobile_helpers.rb
+++ b/spec/support/mobile_helpers.rb
@@ -1,4 +1,8 @@
module MobileHelpers
+ def resize_screen_xs
+ resize_window(767, 768)
+ end
+
def resize_screen_sm
resize_window(900, 768)
end