From da8bad021db8fbce4dddd7baefbf5850cc7e1ba7 Mon Sep 17 00:00:00 2001 From: labkey-danield Date: Mon, 5 May 2025 12:12:42 -0700 Subject: [PATCH] Fix shortURL test to work if there is a contextPath set. --- src/org/labkey/test/tests/core/admin/ShortUrlTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/labkey/test/tests/core/admin/ShortUrlTest.java b/src/org/labkey/test/tests/core/admin/ShortUrlTest.java index 4524840a07..cb56dcd27c 100644 --- a/src/org/labkey/test/tests/core/admin/ShortUrlTest.java +++ b/src/org/labkey/test/tests/core/admin/ShortUrlTest.java @@ -73,7 +73,7 @@ private void doSetup() public void testShortUrl() throws Exception { String shortUrl = nextUrlKey(); - String targetUrl = buildRelativeUrl("project", getProjectName(), "begin"); + String targetUrl = WebTestHelper.getContextPath() + buildRelativeUrl("project", getProjectName(), "begin"); ShortUrlAdminPage adminPage = ShortUrlAdminPage.beginAt(this); adminPage.createNewShortUrl(shortUrl, targetUrl); @@ -95,7 +95,7 @@ public void testShortUrl() throws Exception }); log("Update shortUrl target"); - String updatedTargetUrl = buildRelativeUrl("project", "home", "begin"); + String updatedTargetUrl = WebTestHelper.getContextPath() + buildRelativeUrl("project", "home", "begin"); adminPage = ShortUrlAdminPage.beginAt(this); adminPage.createNewShortUrl(shortUrl, updatedTargetUrl); @@ -149,7 +149,7 @@ public void testTrickyCharacters() throws Exception assertEquals("Row count with filter", 1, drt.getDataRowCount()); String shortUrl = nextUrlKey(); - String targetUrl = getCurrentRelativeURL(); + String targetUrl = WebTestHelper.getContextPath() + getCurrentRelativeURL(); ShortUrlAdminPage adminPage = ShortUrlAdminPage.beginAt(this); adminPage.createNewShortUrl(shortUrl, targetUrl);