Commit ff4d5fc1 authored by Adam Niedzielski's avatar Adam Niedzielski

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.
parent c2173a14
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment