summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-14 11:30:47 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-14 11:30:47 +0000
commit37ba5a12b515172b76d28e112ab9899823163717 (patch)
tree452b3f89e6cef54ee79c7a5903affe08dbc404d4
parent90c10f4dab503aeb24d7ca44e48fc0a607832760 (diff)
parentab0af56201413fea81cf42367671ec9a845315c7 (diff)
downloadgitlab-ce-37ba5a12b515172b76d28e112ab9899823163717.tar.gz
Merge branch 'improve-issues-filter-all-spec' into 'master'
Use Capybara find methods and remove sleeps in feature specs in "All Issues" filter Fixes sporadic build failures (e.g. https://gitlab.com/gitlab-org/gitlab-ce/builds/856233) See merge request !3198
-rw-r--r--app/views/shared/issuable/_filter.html.haml2
-rw-r--r--features/steps/dashboard/issues.rb13
2 files changed, 6 insertions, 9 deletions
diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml
index c3fbba2ba54..e62d80aeb2c 100644
--- a/app/views/shared/issuable/_filter.html.haml
+++ b/app/views/shared/issuable/_filter.html.haml
@@ -15,7 +15,7 @@
.filter-item.inline
- if params[:assignee_id]
= hidden_field_tag(:assignee_id, params[:assignee_id])
- = dropdown_tag("Assignee", options: { toggle_class: "js-user-search js-filter-submit", title: "Filter by assignee", filter: true, dropdown_class: "dropdown-menu-user dropdown-menu-selectable",
+ = dropdown_tag("Assignee", options: { toggle_class: "js-user-search js-filter-submit js-assignee-search", title: "Filter by assignee", filter: true, dropdown_class: "dropdown-menu-user dropdown-menu-selectable",
placeholder: "Search assignee", data: { any_user: "Any Author", first_user: (current_user.username if current_user), null_user: true, current_user: true, project_id: (@project.id if @project), selected: params[:assignee_id], field_name: "assignee_id" } })
.filter-item.inline.milestone-filter
diff --git a/features/steps/dashboard/issues.rb b/features/steps/dashboard/issues.rb
index d723300f485..3072c790a4a 100644
--- a/features/steps/dashboard/issues.rb
+++ b/features/steps/dashboard/issues.rb
@@ -44,14 +44,11 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
end
step 'I click "All" link' do
- execute_script('$(".js-user-search").first().click()')
- sleep 1
- execute_script('$(".js-user-search").first().parent().find("li a").first().click()')
- sleep 1
- execute_script('$(".js-user-search").eq(1).click()')
- sleep 1
- execute_script('$(".js-user-search").eq(1).parent().find("li a").first().click()')
- sleep 1
+ find('.js-author-search').click
+ find('.dropdown-menu-user-full-name', match: :first).click
+
+ find('.js-assignee-search').click
+ find('.dropdown-menu-user-full-name', match: :first).click
end
def should_see(issue)