Skip to content

Commit

Permalink
Test updates (#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-sweta authored Dec 16, 2024
1 parent 2df7a21 commit add3bfd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.awaitility.Awaitility;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
Expand Down Expand Up @@ -56,6 +57,7 @@

import java.io.IOException;
import java.net.URI;
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
Expand Down Expand Up @@ -1324,8 +1326,10 @@ public void bloodRequestTest() throws IOException, CommandException
waitAndClickAndWait(Locator.linkWithText("ASB Services Request"));
addBloodDrawRequest(animalId, now, "795644", "Heparin", 12);

checker().withScreenshot("Blood request").verifyTrue("Expected error is not present", isAnyTextPresent(
"Row 1, # of Tubes: ERROR: The quantity requested, 12.0ml exceeds the available blood volume, 10.0ml for AnimalId: 12345"));
Awaitility.await().atMost(Duration.ofSeconds(30)).untilAsserted(() -> {
Assert.assertTrue("Expected error is not present", isAnyTextPresent(
"Row 1, # of Tubes: ERROR: The quantity requested, 12.0ml exceeds the available blood volume, 10.0ml for AnimalId: 12345"));
});

//Updating the total volume below the available blood volume.
updateTotalVolume(8);
Expand Down

0 comments on commit add3bfd

Please sign in to comment.