Skip to content

Commit

Permalink
Test that wait_tasks config is respected
Browse files Browse the repository at this point in the history
  • Loading branch information
triskweline committed Jan 8, 2024
1 parent 4c4cd01 commit 135e61f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/features/synchronization_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@

end

it 'stays busy for the configured number of tasks' do
Capybara::Lockstep.mode = :off
Capybara::Lockstep.wait_tasks = 10

App.start_html = <<~HTML
<a href="#">label</a>
HTML

visit '/start'
page.find('a').click

expect(page.evaluate_script('CapybaraLockstep.isBusy()')).to eq(true)

sleep (0.004 * 10)

expect(page.evaluate_script('CapybaraLockstep.isBusy()')).to eq(false)
end

end

describe 'when reading elements' do
Expand Down

0 comments on commit 135e61f

Please sign in to comment.