diff options
author | Jose Ivan Vargas Lopez <jvargas@gitlab.com> | 2017-04-19 22:10:16 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-19 22:10:16 +0300 |
commit | a63b18b14f82de10d00047c71fec67b65b099aae (patch) | |
tree | 2176838edafd2eb348b2bb6c56a3eb700b3ad343 /spec | |
parent | c57e66bebb930b1a7be539a809f7f5a8188e9870 (diff) |
Set the issuable sidebar to remain collapsed on mobile devices
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues/issue_sidebar_spec.rb | 14 | ||||
-rw-r--r-- | spec/support/mobile_helpers.rb | 4 |
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 |