2019-07-25 05:24:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-02-01 16:53:41 +00:00
|
|
|
require 'spec_helper'
|
2016-12-16 22:25:52 +00:00
|
|
|
|
2020-06-16 18:09:01 +00:00
|
|
|
RSpec.describe 'Dropdown label', :js do
|
2017-02-15 22:13:53 +00:00
|
|
|
include FilteredSearchHelpers
|
|
|
|
|
2021-07-13 15:08:38 +00:00
|
|
|
let_it_be(:project) { create(:project) }
|
|
|
|
let_it_be(:user) { create(:user) }
|
|
|
|
let_it_be(:issue) { create(:issue, project: project) }
|
|
|
|
let_it_be(:label) { create(:label, project: project, title: 'bug-label') }
|
|
|
|
|
2016-12-16 22:25:52 +00:00
|
|
|
before do
|
2018-07-11 14:36:08 +00:00
|
|
|
project.add_maintainer(user)
|
2017-06-21 23:44:10 +00:00
|
|
|
sign_in(user)
|
2016-12-16 22:25:52 +00:00
|
|
|
|
2017-07-06 16:20:50 +00:00
|
|
|
visit project_issues_path(project)
|
2016-12-16 22:25:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
describe 'behavior' do
|
2017-02-01 16:53:41 +00:00
|
|
|
it 'loads all the labels when opened' do
|
2022-04-26 15:10:32 +00:00
|
|
|
select_tokens 'Label', '='
|
2017-01-23 19:12:02 +00:00
|
|
|
|
2022-04-26 15:10:32 +00:00
|
|
|
# Expect None, Any, bug-label
|
|
|
|
expect_suggestion_count 3
|
2017-01-23 19:12:02 +00:00
|
|
|
end
|
|
|
|
end
|
2016-12-16 22:25:52 +00:00
|
|
|
end
|