summaryrefslogtreecommitdiff
path: root/spec/features/issues/filtered_search/dropdown_author_spec.rb
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-08-16 12:11:35 +0000
committerRémy Coutable <remy@rymai.me>2017-08-16 12:11:35 +0000
commitb84d6efa267bec6bf1e28781f08e565f1e38fca7 (patch)
tree2830fb4f2955b3d9c1439b1cf5c27828da980286 /spec/features/issues/filtered_search/dropdown_author_spec.rb
parentfcce6c3168dbd04404f318b4e983d7395d21538c (diff)
downloadgitlab-ce-b84d6efa267bec6bf1e28781f08e565f1e38fca7.tar.gz
Change find to within for detecting bad search specs
Diffstat (limited to 'spec/features/issues/filtered_search/dropdown_author_spec.rb')
-rw-r--r--spec/features/issues/filtered_search/dropdown_author_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_author_spec.rb b/spec/features/issues/filtered_search/dropdown_author_spec.rb
index 4bbf18e1dbe..975dc035f2d 100644
--- a/spec/features/issues/filtered_search/dropdown_author_spec.rb
+++ b/spec/features/issues/filtered_search/dropdown_author_spec.rb
@@ -121,16 +121,20 @@ describe 'Dropdown author', js: true do
it 'fills in the author username when the author has not been filtered' do
click_author(user_jacob.name)
+ wait_for_requests
+
expect(page).to have_css(js_dropdown_author, visible: false)
- expect_tokens([{ name: 'author', value: "@#{user_jacob.username}" }])
+ expect_tokens([author_token(user_jacob.name)])
expect_filtered_search_input_empty
end
it 'fills in the author username when the author has been filtered' do
click_author(user.name)
+ wait_for_requests
+
expect(page).to have_css(js_dropdown_author, visible: false)
- expect_tokens([{ name: 'author', value: "@#{user.username}" }])
+ expect_tokens([author_token(user.name)])
expect_filtered_search_input_empty
end
end
@@ -149,7 +153,7 @@ describe 'Dropdown author', js: true do
find('#js-dropdown-author .filter-dropdown-item', text: user.username).click
expect(page).to have_css(js_dropdown_author, visible: false)
- expect_tokens([{ name: 'author', value: user.username }])
+ expect_tokens([author_token(user.username)])
expect_filtered_search_input_empty
end
end