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/incidents/user_searches_incidents_spec.rb')
-rw-r--r--spec/features/incidents/user_searches_incidents_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/incidents/user_searches_incidents_spec.rb b/spec/features/incidents/user_searches_incidents_spec.rb
new file mode 100644
index 00000000000..b8e3ff534c3
--- /dev/null
+++ b/spec/features/incidents/user_searches_incidents_spec.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe 'User searches Incident Management incidents', :js do
+ let_it_be(:project) { create(:project) }
+ let_it_be(:developer) { create(:user) }
+ let_it_be(:incident) { create(:incident, project: project) }
+
+ before_all do
+ project.add_developer(developer)
+ end
+
+ before do
+ sign_in(developer)
+
+ visit project_incidents_path(project)
+ wait_for_requests
+ end
+
+ context 'when a developer displays the incident list they can search for an incident' do
+ it 'shows the incident table with an incident for a valid search filter bar' do
+ expect(page).to have_selector('.filtered-search-wrapper')
+ expect(page).to have_selector('.gl-table')
+ expect(page).to have_selector('.incident-severity')
+ expect(all('tbody tr').count).to be(1)
+ expect(page).not_to have_selector('.empty-state')
+ end
+ end
+end