Commit c3781da3 authored by Phil Hughes's avatar Phil Hughes

Fixed the mirror user dropdown not displaying

This was caused by the JS class not being initialized in the dispatcher

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/30262
parent cf91b76a
......@@ -335,6 +335,7 @@ const ShortcutsBlob = require('./shortcuts_blob');
case 'projects:repository:show':
new gl.ProtectedBranchCreate();
new gl.ProtectedBranchEditList();
new UsersSelect();
break;
case 'projects:ci_cd:show':
new gl.ProjectVariables();
......
---
title: Fixed mirror user dropdown not displaying
merge_request:
author:
require 'spec_helper'
describe 'Project settings > [EE] Push Rules', feature: true do
describe 'Project settings > [EE] repository', feature: true do
include Select2Helper
let(:user) { create(:user) }
let(:project) { create(:project_empty_repo) }
......@@ -28,4 +30,24 @@ describe 'Project settings > [EE] Push Rules', feature: true do
expect(project.push_rule.commit_message_regex).to eq commit_message
end
end
describe 'mirror settings', :js do
let(:user2) { create(:user) }
before do
project.team << [user2, :master]
visit namespace_project_settings_repository_path(project.namespace, project)
end
it 'sets mirror user' do
page.within('.edit_project') do
select2(user2.id, from: '#project_mirror_user_id')
click_button('Save changes')
expect(find('.select2-chosen')).to have_content(user2.name)
end
end
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