From 76f0aec8a0c68bd276db8a3a4a5d5a65787a680f Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Tue, 23 Sep 2025 16:38:45 -0700 Subject: [PATCH] Constants for many commonly used role names in tests --- hdrl/test/src/org/labkey/test/tests/HDRLTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hdrl/test/src/org/labkey/test/tests/HDRLTest.java b/hdrl/test/src/org/labkey/test/tests/HDRLTest.java index 7d710db6..dcd18a2e 100644 --- a/hdrl/test/src/org/labkey/test/tests/HDRLTest.java +++ b/hdrl/test/src/org/labkey/test/tests/HDRLTest.java @@ -48,6 +48,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; +import static org.labkey.test.util.PermissionsHelper.READER_ROLE; @Category({Git.class}) @BaseWebDriverTest.ClassTimeout(minutes = 8) @@ -232,7 +233,7 @@ public void testRetrievalOfResultsAndArchiving() throws Exception // Verify download goToProjectHome(); - impersonateRole("Reader"); + impersonateRole(READER_ROLE); click(Locator.linkContainingText("View test requests")); drt = new DataRegionTable("query", this); idx = drt.getRowIndex("RequestId", requestId); @@ -418,7 +419,7 @@ public void testFileUploadAndSubmit() log("verify submitted requests are readonly for non-admins"); - impersonateRole("Reader"); + impersonateRole(READER_ROLE); goToProjectHome(); clickAndWait(Locator.linkContainingText("View test requests")); drt = new DataRegionTable("query", this); @@ -432,7 +433,7 @@ public void testFileUploadAndSubmit() waitForElement(Locator.tagContainingText("td", "FedEx")); assertElementNotPresent(org.labkey.test.Locators.bodyTitle("Edit a Test Request")); - testPrintPackingList("Reader", "FedEx"); + testPrintPackingList(READER_ROLE, "FedEx"); stopImpersonating(); }