diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/features/groups/labels/sort_labels_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/features/groups/labels/sort_labels_spec.rb')
-rw-r--r-- | spec/features/groups/labels/sort_labels_spec.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/spec/features/groups/labels/sort_labels_spec.rb b/spec/features/groups/labels/sort_labels_spec.rb index c2410246fe1..e177461701e 100644 --- a/spec/features/groups/labels/sort_labels_spec.rb +++ b/spec/features/groups/labels/sort_labels_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' RSpec.describe 'Sort labels', :js, feature_category: :team_planning do + include ListboxHelpers + let(:user) { create(:user) } let(:group) { create(:group) } let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) } @@ -28,16 +30,16 @@ RSpec.describe 'Sort labels', :js, feature_category: :team_planning do it 'sorts by date' do click_button 'Name' - sort_options = find('ul[role="listbox"]').all('li').collect(&:text) - - expect(sort_options[0]).to eq('Name') - expect(sort_options[1]).to eq('Name, descending') - expect(sort_options[2]).to eq('Last created') - expect(sort_options[3]).to eq('Oldest created') - expect(sort_options[4]).to eq('Updated date') - expect(sort_options[5]).to eq('Oldest updated') + expect_listbox_items([ + 'Name', + 'Name, descending', + 'Last created', + 'Oldest created', + 'Updated date', + 'Oldest updated' + ]) - find('li', text: 'Name, descending').click + select_listbox_item('Name, descending') # assert default sorting within '.other-labels' do |