diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-30 10:07:18 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-30 10:07:18 +0300 |
commit | 8900bd9d267f1524c3e5281dfedf644ec57fc62f (patch) | |
tree | 96aefd0653e7bd5768fdc898e2bb1d696fed0331 /spec/features | |
parent | 6bbbc0ba80d98a5479cf1c962835487f73e00ef7 (diff) | |
parent | a7335c1188d32edd58aebdb818dbf4c49899149b (diff) |
Merge branch 'fix-sidebar-showing-mobile-merge-requests' into 'master'
Fixed sidebar not collapsing on merge request in mobile screens
Closes #32759
See merge request !12489
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issuables/user_sees_sidebar_spec.rb | 30 | ||||
-rw-r--r-- | spec/features/issues/issue_sidebar_spec.rb | 14 |
2 files changed, 30 insertions, 14 deletions
diff --git a/spec/features/issuables/user_sees_sidebar_spec.rb b/spec/features/issuables/user_sees_sidebar_spec.rb new file mode 100644 index 00000000000..4d7a7dc1806 --- /dev/null +++ b/spec/features/issuables/user_sees_sidebar_spec.rb @@ -0,0 +1,30 @@ +require 'rails_helper' + +describe 'Issue Sidebar on Mobile' do + include MobileHelpers + + let(:project) { create(:project, :public) } + let(:merge_request) { create(:merge_request, source_project: project) } + let(:issue) { create(:issue, project: project) } + let!(:user) { create(:user)} + + before do + sign_in(user) + end + + context 'mobile sidebar on merge requests', js: true do + before do + visit namespace_project_merge_request_path(merge_request.project.namespace, merge_request.project, merge_request) + end + + it_behaves_like "issue sidebar stays collapsed on mobile" + end + + context 'mobile sidebar on issues', js: true do + before do + visit namespace_project_issue_path(project.namespace, project, issue) + end + + it_behaves_like "issue sidebar stays collapsed on mobile" + end +end diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb index 163bc4bb32f..09724781a27 100644 --- a/spec/features/issues/issue_sidebar_spec.rb +++ b/spec/features/issues/issue_sidebar_spec.rb @@ -154,20 +154,6 @@ 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] |