diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/features/issues/filtered_search/dropdown_base_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/features/issues/filtered_search/dropdown_base_spec.rb')
-rw-r--r-- | spec/features/issues/filtered_search/dropdown_base_spec.rb | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_base_spec.rb b/spec/features/issues/filtered_search/dropdown_base_spec.rb index b8fb807dd78..5fdab288b2d 100644 --- a/spec/features/issues/filtered_search/dropdown_base_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_base_spec.rb @@ -6,18 +6,12 @@ RSpec.describe 'Dropdown base', :js do include FilteredSearchHelpers let_it_be(:project) { create(:project) } - let_it_be(:user) { create(:user, name: 'administrator', username: 'root') } + let_it_be(:user) { create(:user) } let_it_be(:issue) { create(:issue, project: project) } - let(:filtered_search) { find('.filtered-search') } - let(:js_dropdown_assignee) { '#js-dropdown-assignee' } - let(:filter_dropdown) { find("#{js_dropdown_assignee} .filter-dropdown") } - - def dropdown_assignee_size - filter_dropdown.all('.filter-dropdown-item').size - end - before do + stub_feature_flags(vue_issues_list: true) + project.add_maintainer(user) sign_in(user) @@ -26,17 +20,17 @@ RSpec.describe 'Dropdown base', :js do describe 'caching requests' do it 'caches requests after the first load' do - input_filtered_search('assignee:=', submit: false, extra_space: false) - initial_size = dropdown_assignee_size + select_tokens 'Assignee', '=' + initial_size = get_suggestion_count expect(initial_size).to be > 0 new_user = create(:user) project.add_maintainer(new_user) - find('.filtered-search-box .clear-search').click - input_filtered_search('assignee:=', submit: false, extra_space: false) + click_button 'Clear' + select_tokens 'Assignee', '=' - expect(dropdown_assignee_size).to eq(initial_size) + expect_suggestion_count(initial_size) end end end |