Repository: tapestry-5
Updated Branches:
  refs/heads/master b323f47ad -> 28d755bec


Fix problem of intermittent Selenium link conversion to absolute URLs

Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e22c6191
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e22c6191
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e22c6191

Branch: refs/heads/master
Commit: e22c61916d24255579c0e62bd9190d400b0997a8
Parents: b323f47
Author: Bob Harner <[email protected]>
Authored: Sun Nov 4 11:54:35 2018 -0500
Committer: Bob Harner <[email protected]>
Committed: Sun Nov 4 12:16:02 2018 -0500

----------------------------------------------------------------------
 .../tapestry5/integration/appfolder/AppFolderTests.groovy    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e22c6191/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/appfolder/AppFolderTests.groovy
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/appfolder/AppFolderTests.groovy
 
b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/appfolder/AppFolderTests.groovy
index c2baaab..a0c192d 100644
--- 
a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/appfolder/AppFolderTests.groovy
+++ 
b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/appfolder/AppFolderTests.groovy
@@ -56,10 +56,12 @@ class AppFolderTests extends GroovyTapestryCoreTestCase
         // there's only one image on page
         String assetURL = getAttribute("//img/@src")
 
-        // Selenium now adds unwanted port & host
-        String urlPath = new URL(assetURL).getPath();
+        // Selenium now (sometimes?) adds unwanted port & host
+        if (assetURL.startsWith("http")) {
+            assetURL = new URL(assetURL).getPath()
+        }
 
-        assert urlPath.startsWith("/t5app/assets/")
+        assert assetURL.startsWith("/t5app/assets/")
 
         assertDownloadedAsset urlPath, "src/test/appfolder/images/t5-logo.png"
     }

Reply via email to