Added specs to test for subgroup titles on issue and mr pages
This commit is contained in:
parent
c47dfc9e56
commit
dfe3ca5ec1
|
@ -0,0 +1,29 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'Subgroup Issuables', :feature, :js do
|
||||
let!(:parent_group) { create(:group, name: 'parentgroup') }
|
||||
let!(:subgroup) { create(:group, parent: parent_group, name: 'subgroup') }
|
||||
let!(:project) { create(:empty_project, namespace: subgroup, name: 'project') }
|
||||
let(:user) { create(:user) }
|
||||
|
||||
before do
|
||||
project.add_master(user)
|
||||
login_as user
|
||||
end
|
||||
|
||||
context 'empty issues index' do
|
||||
before do
|
||||
visit namespace_project_issues_path(project.namespace, project)
|
||||
end
|
||||
|
||||
it_behaves_like 'has subgroup title', 'parentgroup', 'subgroup', 'project'
|
||||
end
|
||||
|
||||
context 'empty merge request index' do
|
||||
before do
|
||||
visit namespace_project_merge_requests_path(project.namespace, project)
|
||||
end
|
||||
|
||||
it_behaves_like 'has subgroup title', 'parentgroup', 'subgroup', 'project'
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
shared_examples 'has subgroup title' do |parent_group_name, subgroup_name, project_name|
|
||||
it 'should show the full title' do
|
||||
title = find('.title-container')
|
||||
|
||||
expect(title).not_to have_selector '.initializing'
|
||||
expect(title).to have_content "#{parent_group_name} / #{subgroup_name} / #{project_name}"
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue