|
371 | 371 | });
|
372 | 372 | }
|
373 | 373 | if(/.test.html/.test(testId)) {
|
374 |
| - $('#selenium-runner').attr('src', '@{'/public/test-runner/selenium/TestRunner.html'}?baseUrl=http://localhost:${play.configuration['http.port'] ?: '9000'}&test=/@tests/'+testId+'.suite&auto=true&close=true&resultsUrl=/@tests/'+testId); |
| 374 | + %{ |
| 375 | + protocol = "http"; |
| 376 | + port = 9000; |
| 377 | + if(play.configuration['https.port'] != null) { |
| 378 | + port = play.configuration['https.port']; |
| 379 | + protocol = "https"; |
| 380 | + } else if (play.configuration['http.port'] != null) { |
| 381 | + port = play.configuration['http.port']; |
| 382 | + } |
| 383 | + }% |
| 384 | + $('#selenium-runner').attr('src', '@{'/public/test-runner/selenium/TestRunner.html'}?baseUrl=${protocol}://localhost:${port}&test=/@tests/'+testId+'.suite&auto=true&close=true&resultsUrl=/@tests/'+testId); |
375 | 385 | $('#selenium-mask, #selenium').show();
|
376 | 386 | window.checkResult = setInterval(function() {
|
377 | 387 | var req = $.ajax({url: '@{TestRunner.run("XXX.result")}'.replace('XXX', testId), async: false});
|
@@ -607,10 +617,20 @@ <h2><span>${tis ? '' : 'There '+functionalTests.size().pluralize('is', 'are')} $
|
607 | 617 | #{if seleniumTests}
|
608 | 618 | <h2><span>${tis ? '' : 'There '+seleniumTests.size().pluralize('is', 'are')} ${tis ? 'and' : ''} ${seleniumTests.size()} selenium test${seleniumTests.size().pluralize()},</span></h2>
|
609 | 619 | <ul>
|
| 620 | + %{ |
| 621 | + protocol = "http"; |
| 622 | + port = 9000; |
| 623 | + if(play.configuration['https.port'] != null) { |
| 624 | + port = play.configuration['https.port']; |
| 625 | + protocol = "https"; |
| 626 | + } else if (play.configuration['http.port'] != null) { |
| 627 | + port = play.configuration['http.port']; |
| 628 | + } |
| 629 | + }% |
610 | 630 | #{list items:seleniumTests, as:'test'}
|
611 | 631 | <li>
|
612 | 632 | <div class="test" id="${test}">
|
613 |
| - <span class="touch">+</span><a href="@{'/public/test-runner/selenium/TestRunner.html'}?baseUrl=http://localhost:${play.configuration['http.port'] ?: '9000'}&test=/@tests/${test}.suite">${test.replace('.test.html','')}</a> |
| 633 | + <span class="touch">+</span><a href="@{'/public/test-runner/selenium/TestRunner.html'}?baseUrl=${protocol}://localhost:${port}&test=/@tests/${test}.suite">${test.replace('.test.html','')}</a> |
614 | 634 | <div class="testResult"></div>
|
615 | 635 | </div>
|
616 | 636 | </li>
|
|
0 commit comments