This repository was archived by the owner on Sep 21, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
lib/runner/browser-runner
test/unit/runner/browser-runner Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ module.exports = class BrowserRunner extends Runner {
3030 . filter ( ( suite ) => _ . includes ( suite . browsers , this . _browserId ) )
3131 . map ( ( suite ) => {
3232 if ( suite . hasOwnProperty ( 'url' ) ) {
33- suite . fullUrl = this . _mkFullUrl ( suite . url ) ;
33+ Object . defineProperty ( suite , 'fullUrl' , {
34+ get : ( ) => this . _mkFullUrl ( suite . url )
35+ } ) ;
3436 }
3537
3638 return this . _runSuite ( suite , stateProcessor ) ;
Original file line number Diff line number Diff line change @@ -144,6 +144,14 @@ describe('runner/BrowserRunner', () => {
144144 . then ( ( ) => suiteRunnerFabric . create . args [ 0 ] [ 0 ] ) ; // resolve with modified suite
145145 } ;
146146
147+ it ( 'should resolve url in runtime' , ( ) => {
148+ return run_ ( { rootUrl : 'http://localhost/' , suiteUrl : 'testUrl' } )
149+ . then ( ( suite ) => {
150+ suite . url += '/?query=value' ;
151+ assert . equal ( suite . fullUrl , '/testUrl/?query=value' ) ;
152+ } ) ;
153+ } ) ;
154+
147155 it ( 'should not modify suite without "url" as own property' , ( ) => {
148156 return run_ ( { rootUrl : 'http://localhost/foo/bar/' } )
149157 . then ( ( suite ) => assert . isUndefined ( suite . fullUrl ) ) ;
You can’t perform that action at this time.
0 commit comments