summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2016-12-17 19:55:44 -0600
committerClement Ho <ClemMakesApps@gmail.com>2017-01-09 16:01:34 -0600
commitf72c1bf1c930b4dcb533202204d132f42246d99f (patch)
treedace0e643da0794dd2c7982b3429e2bc12413170 /spec/features
parente197f27f19ab7995d280f67754ea16c2629701b2 (diff)
downloadgitlab-ce-f72c1bf1c930b4dcb533202204d132f42246d99f.tar.gz
Fix specs
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issues/filtered_search/dropdown_assignee_spec.rb6
-rw-r--r--spec/features/issues/filtered_search/dropdown_author_spec.rb8
-rw-r--r--spec/features/issues/filtered_search/dropdown_label_spec.rb2
-rw-r--r--spec/features/issues/filtered_search/filter_issues_spec.rb2
4 files changed, 10 insertions, 8 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb
index 5d0e95580c9..a5a05a622b6 100644
--- a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb
+++ b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb
@@ -13,7 +13,7 @@ describe 'Dropdown assignee', js: true, feature: true do
def send_keys_to_filtered_search(input)
input.split("").each do |i|
filtered_search.send_keys(i)
- sleep 3
+ sleep 5
wait_for_ajax
end
end
@@ -65,7 +65,7 @@ describe 'Dropdown assignee', js: true, feature: true do
describe 'filtering' do
before do
- filtered_search.set('assignee:')
+ send_keys_to_filtered_search('assignee:')
end
it 'filters by name' do
@@ -118,7 +118,7 @@ describe 'Dropdown assignee', js: true, feature: true do
end
it 'selects `no assignee`' do
- click_assignee('No Assignee')
+ find('#js-dropdown-assignee .filter-dropdown-item', text: 'No Assignee').click
expect(page).to have_css(js_dropdown_assignee, visible: false)
expect(filtered_search.value).to eq("assignee:none")
end
diff --git a/spec/features/issues/filtered_search/dropdown_author_spec.rb b/spec/features/issues/filtered_search/dropdown_author_spec.rb
index c7cb5e25174..956f7156c5f 100644
--- a/spec/features/issues/filtered_search/dropdown_author_spec.rb
+++ b/spec/features/issues/filtered_search/dropdown_author_spec.rb
@@ -13,7 +13,7 @@ describe 'Dropdown author', js: true, feature: true do
def send_keys_to_filtered_search(input)
input.split("").each do |i|
filtered_search.send_keys(i)
- sleep 3
+ sleep 5
wait_for_ajax
end
end
@@ -65,7 +65,8 @@ describe 'Dropdown author', js: true, feature: true do
describe 'filtering' do
before do
- filtered_search.set('author:')
+ filtered_search.set('author')
+ send_keys_to_filtered_search(':')
end
it 'filters by name' do
@@ -101,7 +102,8 @@ describe 'Dropdown author', js: true, feature: true do
describe 'selecting from dropdown' do
before do
- filtered_search.set('author:')
+ filtered_search.set('author')
+ send_keys_to_filtered_search(':')
end
it 'fills in the author username when the author has not been filtered' do
diff --git a/spec/features/issues/filtered_search/dropdown_label_spec.rb b/spec/features/issues/filtered_search/dropdown_label_spec.rb
index d007e160b3e..a0e2973d6b8 100644
--- a/spec/features/issues/filtered_search/dropdown_label_spec.rb
+++ b/spec/features/issues/filtered_search/dropdown_label_spec.rb
@@ -176,7 +176,7 @@ describe 'Dropdown label', js: true, feature: true do
end
it 'selects `no label`' do
- click_label('No Label')
+ find('#js-dropdown-label .filter-dropdown-item', text: 'No Label').click
expect(page).to have_css(js_dropdown_label, visible: false)
expect(filtered_search.value).to eq("label:none")
end
diff --git a/spec/features/issues/filtered_search/filter_issues_spec.rb b/spec/features/issues/filtered_search/filter_issues_spec.rb
index e72417aea80..ed6d4a0787a 100644
--- a/spec/features/issues/filtered_search/filter_issues_spec.rb
+++ b/spec/features/issues/filtered_search/filter_issues_spec.rb
@@ -17,9 +17,9 @@ describe 'Filter issues', js: true, feature: true do
let!(:multiple_words_label) { create(:label, project: project, title: "Two words") }
let!(:closed_issue) { create(:issue, title: 'bug that is closed', project: project, state: :closed) }
+ let(:filtered_search) { find('.filtered-search') }
def input_filtered_search(search_term)
- filtered_search = find('.filtered-search')
filtered_search.set(search_term)
filtered_search.send_keys(:enter)
end