2016-11-24 13:41:30 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
feature 'Group issues page' do
|
|
|
|
include FilteredSearchHelpers
|
|
|
|
|
2016-11-24 13:41:30 +05:30
|
|
|
let(:path) { issues_group_path(group) }
|
|
|
|
let(:issuable) { create(:issue, project: project, title: "this is my created issuable")}
|
|
|
|
|
|
|
|
include_examples 'project features apply to issuables', Issue
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
context 'rss feed' do
|
|
|
|
let(:access_level) { ProjectFeature::ENABLED }
|
|
|
|
|
|
|
|
context 'when signed in' do
|
|
|
|
let(:user) { user_in_group }
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
it_behaves_like "it has an RSS button with current_user's RSS token"
|
|
|
|
it_behaves_like "an autodiscoverable RSS feed with current_user's RSS token"
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
context 'when signed out' do
|
|
|
|
let(:user) { nil }
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
it_behaves_like "it has an RSS button without an RSS token"
|
|
|
|
it_behaves_like "an autodiscoverable RSS feed without an RSS token"
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'assignee', :js do
|
|
|
|
let(:access_level) { ProjectFeature::ENABLED }
|
|
|
|
let(:user) { user_in_group }
|
|
|
|
let(:user2) { user_outside_group }
|
|
|
|
let(:path) { issues_group_path(group) }
|
|
|
|
|
|
|
|
it 'filters by only group users' do
|
2017-09-10 17:25:29 +05:30
|
|
|
filtered_search.set('assignee:')
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
expect(find('#js-dropdown-assignee .filter-dropdown')).to have_content(user.name)
|
|
|
|
expect(find('#js-dropdown-assignee .filter-dropdown')).not_to have_content(user2.name)
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
end
|
2016-11-24 13:41:30 +05:30
|
|
|
end
|