@@ -49,10 +49,9 @@ def expect_request(body: nil, endpoint: nil)
4949 end
5050
5151 it 'accepts provided Options as sole parameter' do
52- opts = { invalid : 'foobar' , args : [ '-f' ] }
52+ opts = { args : [ '-f' ] }
5353 expect_request ( body : { capabilities : { alwaysMatch : { browserName : 'internet explorer' ,
54- 'se:ieOptions' : { invalid : 'foobar' ,
55- nativeEvents : true ,
54+ 'se:ieOptions' : { nativeEvents : true ,
5655 'ie.browserCommandLineSwitches' : '-f' } } } } )
5756
5857 expect { described_class . new ( options : Options . new ( **opts ) ) } . not_to raise_exception
@@ -118,10 +117,10 @@ def as_json(*)
118117 end
119118
120119 it 'with Options instance' do
121- browser_opts = { start_page : 'http://selenium.dev' }
122- expect_request ( body : { capabilities : { alwaysMatch : { browserName : 'internet explorer' ,
123- 'se:ieOptions' : { startPage : 'http://selenium.dev' ,
124- nativeEvents : true } } } } )
120+ browser_opts = { initial_browser_url : 'http://selenium.dev' }
121+ expect_request ( body : { capabilities : { alwaysMatch : { ' browserName' => 'internet explorer' ,
122+ 'se:ieOptions' => { 'initialBrowserUrl' => 'http://selenium.dev' ,
123+ ' nativeEvents' => true } } } } )
125124
126125 expect { described_class . new ( capabilities : [ Options . new ( **browser_opts ) ] ) } . not_to raise_exception
127126 end
@@ -143,12 +142,12 @@ def as_json(*)
143142
144143 it 'with Options instance, Capabilities instance and instance of a custom object responding to #as_json' do
145144 capabilities = Remote ::Capabilities . new ( browser_name : 'internet explorer' , invalid : 'foobar' )
146- options = Options . new ( start_page : 'http://selenium.dev' )
147- expect_request ( body : { capabilities : { alwaysMatch : { browserName : 'internet explorer' ,
148- invalid : 'foobar' ,
149- 'se:ieOptions' : { startPage : 'http://selenium.dev' ,
150- nativeEvents : true } ,
151- 'company:key' : 'value' } } } )
145+ options = Options . new ( initial_browser_url : 'http://selenium.dev' )
146+ expect_request ( body : { capabilities : { alwaysMatch : { ' browserName' => 'internet explorer' ,
147+ ' invalid' => 'foobar' ,
148+ 'se:ieOptions' => { 'initialBrowserUrl' => 'http://selenium.dev' ,
149+ ' nativeEvents' => true } ,
150+ 'company:key' => 'value' } } } )
152151
153152 expect {
154153 described_class . new ( capabilities : [ capabilities , options , as_json_object . new ] )
0 commit comments