diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 0f32ee6e7048c..427d5e6127ee2 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -233,6 +233,7 @@ jobs: - name: Setup Safari Technology Preview if: inputs.safari-preview && inputs.os == 'macos' run: | + brew update --quiet brew install --cask safari-technology-preview sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable - name: Import GPG key diff --git a/rb/spec/integration/selenium/webdriver/bidi/protocol/browsing_context_spec.rb b/rb/spec/integration/selenium/webdriver/bidi/protocol/browsing_context_spec.rb index 14156b058d946..5a4de81688b63 100644 --- a/rb/spec/integration/selenium/webdriver/bidi/protocol/browsing_context_spec.rb +++ b/rb/spec/integration/selenium/webdriver/bidi/protocol/browsing_context_spec.rb @@ -317,15 +317,19 @@ def evaluate(expression, context = driver.window_handle) describe '#set_viewport' do it 'sets the viewport size and device pixel ratio', pending_if: {browser_family: :safari, - exception: {class: RSpec::Expectations::ExpectationNotMetError}, - reason: 'Safari accepts browsingContext.setViewport but does not resize the window'} do + reason: 'Safari accepts browsingContext.setViewport but returns undefined for the ' \ + 'window size, so the resize cannot be verified'} do browsing_context.set_viewport( context: driver.window_handle, viewport: BrowsingContext::Viewport.new(width: 800, height: 600), device_pixel_ratio: 2.0 ) - expect(evaluate('[window.innerWidth, window.innerHeight]').result.value.map(&:value)).to eq([800, 600]) + expect(evaluate('[window.innerWidth, window.innerHeight]').result).to eq( + Script::ArrayRemoteValue.new( + value: [Script::NumberValue.new(value: 800), Script::NumberValue.new(value: 600)] + ) + ) end it 'clears the viewport override' do