2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-12 16:32:08 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2019-07-24 05:20:54 -04:00
|
|
|
describe 'Subgroup Issuables', :js do
|
2017-05-25 10:26:18 -04:00
|
|
|
let!(:group) { create(:group, name: 'group') }
|
|
|
|
let!(:subgroup) { create(:group, parent: group, name: 'subgroup') }
|
2017-08-02 15:55:11 -04:00
|
|
|
let!(:project) { create(:project, namespace: subgroup, name: 'project') }
|
2017-05-25 10:26:18 -04:00
|
|
|
let(:user) { create(:user) }
|
2017-05-12 16:32:08 -04:00
|
|
|
|
|
|
|
before do
|
2018-07-11 10:36:08 -04:00
|
|
|
project.add_maintainer(user)
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in user
|
2017-05-12 16:32:08 -04:00
|
|
|
end
|
|
|
|
|
2017-05-25 10:26:18 -04:00
|
|
|
it 'shows the full subgroup title when issues index page is empty' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issues_path(project)
|
2017-05-12 16:32:08 -04:00
|
|
|
|
2017-05-25 10:26:18 -04:00
|
|
|
expect_to_have_full_subgroup_title
|
2017-05-12 16:32:08 -04:00
|
|
|
end
|
|
|
|
|
2017-05-25 10:26:18 -04:00
|
|
|
it 'shows the full subgroup title when merge requests index page is empty' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(project)
|
2017-05-12 16:32:08 -04:00
|
|
|
|
2017-05-25 10:26:18 -04:00
|
|
|
expect_to_have_full_subgroup_title
|
|
|
|
end
|
|
|
|
|
|
|
|
def expect_to_have_full_subgroup_title
|
2017-08-17 04:51:19 -04:00
|
|
|
title = find('.breadcrumbs-links')
|
2017-05-25 10:26:18 -04:00
|
|
|
|
2017-09-05 04:28:55 -04:00
|
|
|
expect(title).to have_content 'group subgroup project'
|
2017-05-12 16:32:08 -04:00
|
|
|
end
|
|
|
|
end
|