Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/labels_hierarchy_spec.rb')
-rw-r--r--spec/features/labels_hierarchy_spec.rb77
1 files changed, 18 insertions, 59 deletions
diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb
index 0cb712622f2..72f5b46c3ad 100644
--- a/spec/features/labels_hierarchy_spec.rb
+++ b/spec/features/labels_hierarchy_spec.rb
@@ -4,7 +4,6 @@ require 'spec_helper'
RSpec.describe 'Labels Hierarchy', :js, feature_category: :team_planning do
include FilteredSearchHelpers
- include ContentEditorHelpers
let!(:user) { create(:user, :no_super_sidebar) }
let!(:grandparent) { create(:group) }
@@ -158,73 +157,34 @@ 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)
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'
+ 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')
+ click_button _('Select label')
- wait_for_all_requests
+ wait_for_all_requests
- 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')
-
- wait_for_requests
- end
-
- 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
- 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
@@ -236,7 +196,6 @@ RSpec.describe 'Labels Hierarchy', :js, feature_category: :team_planning do
project_1.add_developer(user)
visit project_issue_path(project_1, issue)
- close_rich_text_promo_popover_if_present
end
it_behaves_like 'assigning labels from sidebar'