Commit 4b73d468 authored by Eric Eastwood's avatar Eric Eastwood

Fix admin email notification recipient group select list

Fix https://gitlab.com/gitlab-org/gitlab-ee/issues/1656
parent 2792a502
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
all = { all = {
id: "all" id: "all"
}; };
data = $.merge([all], groups[0], projects[0]); data = [all].concat(groups[0], projects[0]);
return query.callback({ return query.callback({
results: data results: data
}); });
......
---
title: Fix admin email notification recipient group select list
merge_request:
author:
require 'spec_helper'
describe "Admin::Emails", feature: true, js: true do
include WaitForAjax
let!(:current_user) { login_as :admin }
let!(:group) { create(:group) }
let!(:project) { create(:project, namespace: group) }
describe "GET /admin/email" do
before do
visit admin_email_path
end
describe 'Recipient group select' do
it "includes groups and projects" do
find('.ajax-admin-email-select').click
wait_for_ajax
expect(page).to have_selector('.ajax-admin-email-dropdown li', count: 3)
group_names = page.all('.ajax-admin-email-dropdown li .group-name')
expect(group_names[0].text).to eq('All')
expect(group_names[1].text).to eq(group.name)
expect(find('.ajax-admin-email-dropdown li .project-name').text).to eq(project.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