2017-06-28 14:16:40 -04:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe 'Issue Sidebar on Mobile' do
|
|
|
|
include MobileHelpers
|
|
|
|
|
2017-07-21 17:55:42 -04:00
|
|
|
let(:project) { create(:project, :public, :repository) }
|
2017-06-28 14:16:40 -04:00
|
|
|
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
|
|
|
|
|
2017-10-03 04:35:01 -04:00
|
|
|
context 'mobile sidebar on merge requests', :js do
|
2017-06-28 14:16:40 -04:00
|
|
|
before do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_request_path(merge_request.project, merge_request)
|
2017-06-28 14:16:40 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like "issue sidebar stays collapsed on mobile"
|
|
|
|
end
|
|
|
|
|
2017-10-03 04:35:01 -04:00
|
|
|
context 'mobile sidebar on issues', :js do
|
2017-06-28 14:16:40 -04:00
|
|
|
before do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issue_path(project, issue)
|
2017-06-28 14:16:40 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like "issue sidebar stays collapsed on mobile"
|
|
|
|
end
|
|
|
|
end
|