diff options
Diffstat (limited to 'spec/features/issues')
5 files changed, 17 insertions, 11 deletions
diff --git a/spec/features/issues/group_label_sidebar_spec.rb b/spec/features/issues/group_label_sidebar_spec.rb index b26030fe8d0..41450ba3373 100644 --- a/spec/features/issues/group_label_sidebar_spec.rb +++ b/spec/features/issues/group_label_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Group label on issue', feature_category: :team_planning do +RSpec.describe 'Group label on issue', :with_license, feature_category: :team_planning do it 'renders link to the project issues page', :js do group = create(:group) project = create(:project, :public, namespace: group) diff --git a/spec/features/issues/issue_header_spec.rb b/spec/features/issues/issue_header_spec.rb index 090067fc4ac..6c5daa29631 100644 --- a/spec/features/issues/issue_header_spec.rb +++ b/spec/features/issues/issue_header_spec.rb @@ -27,7 +27,7 @@ RSpec.describe 'issue header', :js, feature_category: :team_planning do it 'shows the "New related issue", "Report abuse", and "Delete issue" items', :aggregate_failures do expect(page).to have_link 'New related issue' - expect(page).to have_link 'Report abuse to administrator' + expect(page).to have_button 'Report abuse to administrator' expect(page).to have_button 'Delete issue' expect(page).not_to have_link 'Submit as spam' end @@ -68,10 +68,10 @@ RSpec.describe 'issue header', :js, feature_category: :team_planning do visit project_issue_path(project, authored_issue) end - it 'does not show "Report abuse" link in dropdown' do + it 'does not show "Report abuse" button in dropdown' do click_button 'Issue actions' - expect(page).not_to have_link 'Report abuse to administrator' + expect(page).not_to have_button 'Report abuse to administrator' end end end @@ -116,7 +116,7 @@ RSpec.describe 'issue header', :js, feature_category: :team_planning do it 'only shows the "New related issue" and "Report abuse" items', :aggregate_failures do expect(page).to have_link 'New related issue' - expect(page).to have_link 'Report abuse to administrator' + expect(page).to have_button 'Report abuse to administrator' expect(page).not_to have_link 'Submit as spam' expect(page).not_to have_button 'Delete issue' end @@ -157,10 +157,10 @@ RSpec.describe 'issue header', :js, feature_category: :team_planning do visit project_issue_path(project, authored_issue) end - it 'does not show "Report abuse" link in dropdown' do + it 'does not show "Report abuse" button in dropdown' do click_button 'Issue actions' - expect(page).not_to have_link 'Report abuse to administrator' + expect(page).not_to have_button 'Report abuse to administrator' end end end diff --git a/spec/features/issues/user_creates_issue_spec.rb b/spec/features/issues/user_creates_issue_spec.rb index a4b8cb91999..df039493cec 100644 --- a/spec/features/issues/user_creates_issue_spec.rb +++ b/spec/features/issues/user_creates_issue_spec.rb @@ -161,6 +161,11 @@ RSpec.describe "User creates issue", feature_category: :team_planning do let(:project) { create(:project, :public, :repository) } before do + # With multistore feature flags enabled (using an actual Redis store instead of NullStore), + # it somehow writes an invalid content to Redis and the specs would fail. + stub_feature_flags(use_primary_and_secondary_stores_for_repository_cache: false) + stub_feature_flags(use_primary_store_as_default_for_repository_cache: false) + project.repository.create_file( user, '.gitlab/issue_templates/bug.md', diff --git a/spec/features/issues/user_edits_issue_spec.rb b/spec/features/issues/user_edits_issue_spec.rb index 223832a6ede..19b2633969d 100644 --- a/spec/features/issues/user_edits_issue_spec.rb +++ b/spec/features/issues/user_edits_issue_spec.rb @@ -107,14 +107,14 @@ RSpec.describe "Issues > User edits issue", :js, feature_category: :team_plannin end it 'places focus on the web editor' do - toggle_editing_mode_selector = '[data-testid="toggle-editing-mode-button"] label' content_editor_focused_selector = '[data-testid="content-editor"].is-focused' markdown_field_focused_selector = 'textarea:focus' click_edit_issue_description expect(page).to have_selector(markdown_field_focused_selector) - find(toggle_editing_mode_selector, text: 'Rich text').click + click_on _('View rich text') + click_on _('Rich text') expect(page).not_to have_selector(content_editor_focused_selector) @@ -124,7 +124,8 @@ RSpec.describe "Issues > User edits issue", :js, feature_category: :team_plannin expect(page).to have_selector(content_editor_focused_selector) - find(toggle_editing_mode_selector, text: 'Source').click + click_on _('View markdown') + click_on _('Markdown') expect(page).not_to have_selector(markdown_field_focused_selector) end diff --git a/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb b/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb index b9a25f47da9..91b18454af5 100644 --- a/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb +++ b/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Issues > Real-time sidebar', :js, feature_category: :team_planning do +RSpec.describe 'Issues > Real-time sidebar', :js, :with_license, feature_category: :team_planning do let_it_be(:project) { create(:project, :public) } let_it_be(:issue) { create(:issue, project: project) } let_it_be(:user) { create(:user) } |