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.
This commit is contained in:
Adam Niedzielski 2016-12-30 16:44:16 +01:00
parent c2173a1464
commit ff4d5fc1d0
1 changed files with 2 additions and 8 deletions

View File

@ -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