Skip to content

Commit be12001

Browse files
Constants for many commonly used role names in tests (#234)
1 parent 2a5d060 commit be12001

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

hdrl/test/src/org/labkey/test/tests/HDRLTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import static org.junit.Assert.assertEquals;
4949
import static org.junit.Assert.assertNotEquals;
5050
import static org.junit.Assert.assertTrue;
51+
import static org.labkey.test.util.PermissionsHelper.READER_ROLE;
5152

5253
@Category({Git.class})
5354
@BaseWebDriverTest.ClassTimeout(minutes = 8)
@@ -232,7 +233,7 @@ public void testRetrievalOfResultsAndArchiving() throws Exception
232233

233234
// Verify download
234235
goToProjectHome();
235-
impersonateRole("Reader");
236+
impersonateRole(READER_ROLE);
236237
click(Locator.linkContainingText("View test requests"));
237238
drt = new DataRegionTable("query", this);
238239
idx = drt.getRowIndex("RequestId", requestId);
@@ -418,7 +419,7 @@ public void testFileUploadAndSubmit()
418419

419420
log("verify submitted requests are readonly for non-admins");
420421

421-
impersonateRole("Reader");
422+
impersonateRole(READER_ROLE);
422423
goToProjectHome();
423424
clickAndWait(Locator.linkContainingText("View test requests"));
424425
drt = new DataRegionTable("query", this);
@@ -432,7 +433,7 @@ public void testFileUploadAndSubmit()
432433
waitForElement(Locator.tagContainingText("td", "FedEx"));
433434
assertElementNotPresent(org.labkey.test.Locators.bodyTitle("Edit a Test Request"));
434435

435-
testPrintPackingList("Reader", "FedEx");
436+
testPrintPackingList(READER_ROLE, "FedEx");
436437

437438
stopImpersonating();
438439
}

0 commit comments

Comments
 (0)