debian-mirror-gitlab/spec/features/projects/sub_group_issuables_spec.rb

33 lines
917 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
describe 'Subgroup Issuables', :js, :nested_groups do
2017-08-17 22:00:37 +05:30
let!(:group) { create(:group, name: 'group') }
let!(:subgroup) { create(:group, parent: group, name: 'subgroup') }
2017-09-10 17:25:29 +05:30
let!(:project) { create(:project, namespace: subgroup, name: 'project') }
2017-08-17 22:00:37 +05:30
let(:user) { create(:user) }
before do
project.add_master(user)
2017-09-10 17:25:29 +05:30
sign_in user
2017-08-17 22:00:37 +05:30
end
it 'shows the full subgroup title when issues index page is empty' do
2017-09-10 17:25:29 +05:30
visit project_issues_path(project)
2017-08-17 22:00:37 +05:30
expect_to_have_full_subgroup_title
end
it 'shows the full subgroup title when merge requests index page is empty' do
2017-09-10 17:25:29 +05:30
visit project_merge_requests_path(project)
2017-08-17 22:00:37 +05:30
expect_to_have_full_subgroup_title
end
def expect_to_have_full_subgroup_title
title = find('.title-container')
expect(title).not_to have_selector '.initializing'
expect(title).to have_content 'group / subgroup / project'
end
end