debian-mirror-gitlab/spec/features/projects/labels/user_views_labels_spec.rb

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

31 lines
884 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2018-05-09 12:01:36 +05:30
require "spec_helper"
2023-03-04 22:38:38 +05:30
RSpec.describe "User views labels", feature_category: :team_planning do
2020-04-08 14:13:33 +05:30
let_it_be(:project) { create(:project_empty_repo, :public) }
let_it_be(:user) { create(:user) }
2021-06-08 01:23:25 +05:30
2019-02-15 15:39:39 +05:30
let(:label_titles) { %w[bug enhancement feature] }
2019-07-31 22:56:46 +05:30
let!(:prioritized_label) { create(:label, project: project, title: 'prioritized-label-name', priority: 1) }
2018-05-09 12:01:36 +05:30
before do
2019-02-15 15:39:39 +05:30
label_titles.each { |title| create(:label, project: project, title: title) }
2018-05-09 12:01:36 +05:30
project.add_guest(user)
sign_in(user)
visit(project_labels_path(project))
end
it "shows all labels" do
2019-07-31 22:56:46 +05:30
page.within('.prioritized-labels .manage-labels-list') do
expect(page).to have_content('prioritized-label-name')
end
2018-05-09 12:01:36 +05:30
page.within('.other-labels .manage-labels-list') do
2019-02-15 15:39:39 +05:30
label_titles.each { |title| expect(page).to have_content(title) }
2018-05-09 12:01:36 +05:30
end
end
end