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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
890 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
2021-04-29 21:17:54 +05:30
expect_to_have_breadcrumb_links
2017-08-17 22:00:37 +05:30
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
2021-04-29 21:17:54 +05:30
expect_to_have_breadcrumb_links
2017-08-17 22:00:37 +05:30
end
2021-04-29 21:17:54 +05:30
def expect_to_have_breadcrumb_links
links = find('[data-testid="breadcrumb-links"]')
2017-08-17 22:00:37 +05:30
2021-04-29 21:17:54 +05:30
expect(links).to have_content 'group subgroup project'
2017-08-17 22:00:37 +05:30
end
end