Commit 8900bd9d authored by Tim Zallmann's avatar Tim Zallmann

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
parents 6bbbc0ba a7335c11
...@@ -144,7 +144,9 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion'; ...@@ -144,7 +144,9 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
this.resetViewContainer(); this.resetViewContainer();
this.mountPipelinesView(); this.mountPipelinesView();
} else { } else {
if (Breakpoints.get().getBreakpointSize() !== 'xs') {
this.expandView(); this.expandView();
}
this.resetViewContainer(); this.resetViewContainer();
this.destroyPipelinesView(); this.destroyPipelinesView();
} }
......
---
title: Fixed sidebar not collapsing on merge requests in mobile screens
merge_request:
author:
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
...@@ -154,20 +154,6 @@ feature 'Issue Sidebar', feature: true do ...@@ -154,20 +154,6 @@ feature 'Issue Sidebar', feature: true do
end end
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 context 'as a guest' do
before do before do
project.team << [user, :guest] project.team << [user, :guest]
......
shared_examples 'issue sidebar stays collapsed on mobile' do
before do
resize_screen_xs
end
it 'keeps the sidebar collapsed' do
expect(page).not_to have_css('.right-sidebar.right-sidebar-collapsed')
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment