Skip to content

Commit

Permalink
Refind the dataregion when went stale.
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-sweta committed Nov 8, 2024
1 parent 5d76bb8 commit 08e3a76
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void testCreateRequestAndEmailNotification() throws IOException, CommandE

log("Verifying the request created");
waitForElement(Locator.tagWithAttribute("h3", "title", "Purchase Requests"));
DataRegionTable table = DataRegionTable.DataRegion(getDriver()).find();
DataRegionTable table = DataRegionTable.DataRegion(getDriver()).refindWhenNeeded();
assertEquals("Invalid number of requests ", 1, table.getDataRowCount());
assertEquals("Invalid request status ", "Review Pending",
table.getDataAsText(0, "requestStatus"));
Expand Down Expand Up @@ -386,7 +386,7 @@ public void testOtherVendorRequest() throws IOException, CommandException

log("Verifying the request created");
waitForElement(Locator.tagWithAttribute("h3", "title", "Purchase Requests"));
DataRegionTable table = new DataRegionTable.DataRegionFinder(getDriver()).waitFor();
DataRegionTable table = DataRegionTable.DataRegion(getDriver()).refindWhenNeeded();
checker().verifyEquals("Invalid number of requests ", 1, table.getDataRowCount());
checker().verifyEquals("Invalid request status ", "Review Pending",
table.getDataAsText(0, "requestStatus"));
Expand Down Expand Up @@ -962,13 +962,13 @@ private String createRequest(Map<String, String> request, @Nullable File fileNam
if (getCurrentUser().equals("[email protected]"))
{
clickAndWait(Locator.linkWithText("All Open Requests"));
DataRegionTable table = new DataRegionTable.DataRegionFinder(getDriver()).withName("query").waitFor();
DataRegionTable table = DataRegionTable.DataRegion(getDriver()).withName("query").refindWhenNeeded();
table.setFilter("requester", "Equals", "purchaseadmin");
return table.getDataAsText(0, "requestNum");
}
else
{
DataRegionTable table = new DataRegionTable.DataRegionFinder(getDriver()).waitFor();
DataRegionTable table = DataRegionTable.DataRegion(getDriver()).refindWhenNeeded();
return table.getDataAsText(table.getDataRowCount() - 1, "rowId");
}
}
Expand Down

0 comments on commit 08e3a76

Please sign in to comment.