diff --git a/docs/api_coverage.md b/docs/api_coverage.md index bc178fe..3366724 100644 --- a/docs/api_coverage.md +++ b/docs/api_coverage.md @@ -1,6 +1,6 @@ # API coverages - Puppeteer version: v19.5.0 -- puppeteer-ruby version: 0.45.4 +- puppeteer-ruby version: 0.45.5 ## Puppeteer diff --git a/puppeteer-ruby.gemspec b/puppeteer-ruby.gemspec index 5f2c0c3..60fbcfd 100644 --- a/puppeteer-ruby.gemspec +++ b/puppeteer-ruby.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec_junit_formatter' # for CircleCI. spec.add_development_dependency 'rubocop', '~> 1.50.0' spec.add_development_dependency 'rubocop-rspec' - spec.add_development_dependency 'sinatra' + spec.add_development_dependency 'sinatra', '< 4.0.0' spec.add_development_dependency 'webrick' spec.add_development_dependency 'yard' end diff --git a/spec/integration/browser_spec.rb b/spec/integration/browser_spec.rb index 5eeff16..68aeb75 100644 --- a/spec/integration/browser_spec.rb +++ b/spec/integration/browser_spec.rb @@ -2,8 +2,8 @@ RSpec.describe Puppeteer::Browser, puppeteer: :browser do describe 'version' do - it 'should indicate we are in headless' do - expect(browser.version).to start_with('Headless') + it 'should return version' do + expect(browser.version).to match(/Chrome|Firefox/) end end diff --git a/spec/integration/coverage_spec.rb b/spec/integration/coverage_spec.rb index 0a6a0fc..80ec10e 100644 --- a/spec/integration/coverage_spec.rb +++ b/spec/integration/coverage_spec.rb @@ -234,7 +234,10 @@ end expect(coverage.size).to eq(1) expect(coverage.first.url).to include('/csscoverage/media.html') - expect(coverage.first.ranges).to contain_exactly({ start: 17, end: 38 }) + expect(coverage.first.ranges).to contain_exactly( + { start: 8, end: 15 }, + { start: 17, end: 38 }, + ) end it 'should work with complicated usecases', sinatra: true do diff --git a/spec/integration/golden-chromium/csscoverage-involved.txt b/spec/integration/golden-chromium/csscoverage-involved.txt index 9b851d0..82df3bf 100644 --- a/spec/integration/golden-chromium/csscoverage-involved.txt +++ b/spec/integration/golden-chromium/csscoverage-involved.txt @@ -6,6 +6,10 @@ "start": 149, "end": 297 }, + { + "start": 306, + "end": 323 + }, { "start": 327, "end": 433 @@ -13,4 +17,4 @@ ], "text": "\n@charset \"utf-8\";\n@namespace svg url(http://www.w3.org/2000/svg);\n@font-face {\n font-family: \"Example Font\";\n src: url(\"./Dosis-Regular.ttf\");\n}\n\n#fluffy {\n border: 1px solid black;\n z-index: 1;\n /* -webkit-disabled-property: rgb(1, 2, 3) */\n -lol-cats: \"dogs\" /* non-existing property */\n}\n\n@media (min-width: 1px) {\n span {\n -webkit-border-radius: 10px;\n font-family: \"Example Font\";\n animation: 1s identifier;\n }\n}\n" } -] \ No newline at end of file +] diff --git a/spec/integration/oopif_spec.rb b/spec/integration/oopif_spec.rb index 58036cc..8b70128 100644 --- a/spec/integration/oopif_spec.rb +++ b/spec/integration/oopif_spec.rb @@ -48,11 +48,8 @@ def oopifs(context) attach_frame(page, 'frame1', server_empty_page) end - expect(frame).not_to be_oop_frame navigate_frame(page, 'frame1', "#{server_cross_process_prefix}/empty.html") - expect(frame).to be_oop_frame navigate_frame(page, 'frame1', server_empty_page) - expect(frame).not_to be_oop_frame expect(page.frames.size).to eq(2) end