diff options
Diffstat (limited to 'spec/features/labels_hierarchy_spec.rb')
-rw-r--r-- | spec/features/labels_hierarchy_spec.rb | 76 |
1 files changed, 19 insertions, 57 deletions
diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb index 0cb712622f2..edc7b570933 100644 --- a/spec/features/labels_hierarchy_spec.rb +++ b/spec/features/labels_hierarchy_spec.rb @@ -158,73 +158,35 @@ RSpec.describe 'Labels Hierarchy', :js, feature_category: :team_planning do end end - context 'with the visible_label_selection_on_metadata feature flag enabled' do + context 'when creating new issuable' do before do - stub_feature_flags(visible_label_selection_on_metadata: true) + visit new_project_issue_path(project_1) + close_rich_text_promo_popover_if_present end - context 'when creating new issuable' do - before do - visit new_project_issue_path(project_1) - close_rich_text_promo_popover_if_present - end - - it 'is able to assign ancestor group labels' do - fill_in 'issue_title', with: 'new created issue' - fill_in 'issue_description', with: 'new issue description' - - click_button _('Select label') - - wait_for_all_requests + it 'is able to assign ancestor group labels' do + fill_in 'issue_title', with: 'new created issue' + fill_in 'issue_description', with: 'new issue description' - page.within '[data-testid="sidebar-labels"]' do - click_button grandparent_group_label.title - click_button parent_group_label.title - click_button project_label_1.title - click_button _('Close') + click_button _('Select label') - wait_for_requests - end - - find('.btn-confirm').click + wait_for_all_requests - expect(page.find('.issue-details h1.title')).to have_content('new created issue') - expect(page).to have_selector('span.gl-label-text', text: grandparent_group_label.title) - expect(page).to have_selector('span.gl-label-text', text: parent_group_label.title) - expect(page).to have_selector('span.gl-label-text', text: project_label_1.title) - end - end - end + page.within '[data-testid="sidebar-labels"]' do + click_button grandparent_group_label.title + click_button parent_group_label.title + click_button project_label_1.title + click_button _('Close') - context 'with the visible_label_selection_on_metadata feature flag disabled' do - before do - stub_feature_flags(visible_label_selection_on_metadata: false) - end - - context 'when creating new issuable' do - before do - visit new_project_issue_path(project_1) - close_rich_text_promo_popover_if_present - end - - it 'is able to assign ancestor group labels' do - fill_in 'issue_title', with: 'new created issue' - fill_in 'issue_description', with: 'new issue description' - - find(".js-label-select").click wait_for_requests + end - find('a.label-item', text: grandparent_group_label.title).click - find('a.label-item', text: parent_group_label.title).click - find('a.label-item', text: project_label_1.title).click - - find('.btn-confirm').click + find('.btn-confirm').click - expect(page.find('.issue-details h1.title')).to have_content('new created issue') - expect(page).to have_selector('span.gl-label-text', text: grandparent_group_label.title) - expect(page).to have_selector('span.gl-label-text', text: parent_group_label.title) - expect(page).to have_selector('span.gl-label-text', text: project_label_1.title) - end + expect(page.find('.issue-details h1.title')).to have_content('new created issue') + expect(page).to have_selector('span.gl-label-text', text: grandparent_group_label.title) + expect(page).to have_selector('span.gl-label-text', text: parent_group_label.title) + expect(page).to have_selector('span.gl-label-text', text: project_label_1.title) end end |