From ff4d5fc1d0832922b7a39d4f617ee424e606e446 Mon Sep 17 00:00:00 2001 From: Adam Niedzielski Date: Fri, 30 Dec 2016 16:44:16 +0100 Subject: [PATCH] Fix failures in default sort order spec Test cases were not waiting for page load after clicking. This caused failures in test cases that were executed right after these incorrect ones, because of requests hitting server after a test was finished. We do not have to click links, we can go directly to a correct page by passing parameters in the URL. --- spec/features/issuables/default_sort_order_spec.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/spec/features/issuables/default_sort_order_spec.rb b/spec/features/issuables/default_sort_order_spec.rb index 9a2b879e789..73553f97d6f 100644 --- a/spec/features/issuables/default_sort_order_spec.rb +++ b/spec/features/issuables/default_sort_order_spec.rb @@ -180,16 +180,10 @@ describe 'Projects > Issuables > Default sort order', feature: true do end def visit_merge_requests_with_state(project, state) - visit_merge_requests project - visit_issuables_with_state state + visit_merge_requests project, state: state end def visit_issues_with_state(project, state) - visit_issues project - visit_issuables_with_state state - end - - def visit_issuables_with_state(state) - within('.issues-state-filters') { find("span", text: state.titleize).click } + visit_issues project, state: state end end