Commit 8ab6ca82 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'todos-tests-fix' into 'master'

Fix Todos test

Another attempt to fix random fail on Todos test.

See merge request !3953
parents ce92b3d3 d2f898e7
...@@ -68,12 +68,12 @@ describe 'Dashboard Todos', feature: true do ...@@ -68,12 +68,12 @@ describe 'Dashboard Todos', feature: true do
describe 'completing last todo from last page', js: true do describe 'completing last todo from last page', js: true do
it 'redirects to the previous page' do it 'redirects to the previous page' do
visit dashboard_todos_path(page: 2) visit dashboard_todos_path(page: 2)
expect(page).to have_content(Todo.first.body) expect(page).to have_css("#todo_#{Todo.last.id}")
click_link('Done') click_link('Done')
expect(current_path).to eq dashboard_todos_path expect(current_path).to eq dashboard_todos_path
expect(page).to have_content(Todo.last.body) expect(page).to have_css("#todo_#{Todo.first.id}")
end end
end end
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