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

34 lines
885 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Subgroup Issuables', :js 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
2018-11-18 11:00:15 +05:30
project.add_maintainer(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
2018-03-17 18:26:18 +05:30
title = find('.breadcrumbs-links')
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
expect(title).to have_content 'group subgroup project'
2017-08-17 22:00:37 +05:30
end
end