From 52811652305c354dd3dc0fd208a2f65d9c4ed337 Mon Sep 17 00:00:00 2001 From: Henning Koch Date: Fri, 21 Jun 2024 14:13:25 +0200 Subject: [PATCH] Fix rspec-wait deprecation; Upgrade rspec-wait to 1.0 --- Gemfile.lock | 4 +-- spec/features/synchronization_spec.rb | 42 +++++++++++++------------- spec/support/matchers/run_into_wall.rb | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e39ed10..4b2afc0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,8 +71,8 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) - rspec-wait (0.0.10) - rspec (>= 3.0) + rspec-wait (1.0.0) + rspec (>= 3.4) ruby2_keywords (0.0.5) rubyzip (2.3.2) selenium-webdriver (4.1.0) diff --git a/spec/features/synchronization_spec.rb b/spec/features/synchronization_spec.rb index d3b98f8..74b64a3 100644 --- a/spec/features/synchronization_spec.rb +++ b/spec/features/synchronization_spec.rb @@ -16,7 +16,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished end describe 'dynamically inserted images' do @@ -42,7 +42,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished expect('img').to be_loaded_image end @@ -68,7 +68,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished expect('img').to be_broken_image end @@ -86,7 +86,7 @@ command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished expect('img').to be_loaded_image end @@ -113,7 +113,7 @@ command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished expect(server_spy).to_not have_received(:reached) end @@ -143,7 +143,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished end it 'waits until the iframe has failed to load' do @@ -167,7 +167,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished end it 'does not wait forever for an iframe with a data: source' do @@ -183,7 +183,7 @@ command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished end it 'does not wait for an iframe with [loading=lazy]' do @@ -208,7 +208,7 @@ command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished expect(server_spy).to_not have_received(:reached) end @@ -238,7 +238,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished expect('video').to be_media_element_with_metadata end @@ -264,7 +264,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished end it 'does not wait forever for a video with a data: source' do @@ -279,7 +279,7 @@ visit '/start' command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished expect('video').to be_media_element_with_metadata end @@ -302,7 +302,7 @@ visit '/start' command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished expect(server_spy).to_not have_received(:reached) @@ -331,7 +331,7 @@ command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished expect('audio').to be_media_element_with_metadata end @@ -358,7 +358,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished end it 'does not wait forever for a audio with a data: source' do @@ -374,7 +374,7 @@ visit '/start' command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished expect('audio').to be_media_element_with_metadata end @@ -398,7 +398,7 @@ visit '/start' command = ObservableCommand.new { page.find('a').click } command.execute - wait(0.1.seconds).for(command).to be_finished + wait(0.1.seconds).for { command }.to be_finished expect(server_spy).to_not have_received(:reached) @@ -432,7 +432,7 @@ wall.release - wait(0.5.seconds).for(command).to be_finished + wait(0.5.seconds).for { command }.to be_finished end it 'waits until a