Skip to content

Commit fcf5969

Browse files
committed
Fix tests and add new one for cage home
1 parent b140435 commit fcf5969

3 files changed

Lines changed: 29 additions & 6 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
rowid name type manufacturer length width height sqft description container createdby created modifiedby modified
2-
1 cage-uk-0.0 0 Unknown false Default Unknown Rack EHR lcameron3 2025-02-07 09:31 lcameron3 2025-02-07 09:31
3-
2 pen-uk-0.0 1 Unknown false Default Unknown Pen EHR lcameron3 2025-02-07 09:31 lcameron3 2025-02-07 09:31
1+
rowid type manufacturer stationary size length width height sqft description container createdby created modifiedby modified
2+
1 0 Unknown false 0.0 Default Unknown Rack EHR lcameron3 2025-02-07 09:31 lcameron3 2025-02-07 09:31
3+
2 1 Unknown false 0.0 Default Unknown Pen EHR lcameron3 2025-02-07 09:31 lcameron3 2025-02-07 09:31
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
rowid rackid rack_type container createdby created modifiedby modified
2-
1 0 cage-uk-0.0 EHR lcameron3 2025-02-07 16:06 lcameron3 2025-02-07 16:06
1+
rowid objectid room rackid rack_type condition container createdby created modifiedby modified
2+
1 00000000-0000-0000-0000-000000000000 1 1 0 EHR lcameron3 2025-02-07 16:06 lcameron3 2025-02-07 16:06

WNPRC_EHR/test/src/org/labkey/test/tests/wnprc_ehr/WNPRC_EHRTest.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
import java.util.UUID;
105105

106106
import static org.junit.Assert.assertEquals;
107+
import static org.junit.Assert.assertFalse;
107108
import static org.junit.Assert.assertTrue;
108109
import static org.labkey.test.WebTestHelper.buildURL;
109110
import static org.labkey.test.WebTestHelper.getRemoteApiConnection;
@@ -4828,9 +4829,31 @@ public void testCageUIBasic() throws Exception {
48284829
Assert.assertTrue(layoutSvg.isDisplayed());
48294830

48304831
// Ensure cage and door loaded in correctly
4831-
cage = waitForElement(Locator.id("default-rack-1"), 10000);
4832+
cage = waitForElement(Locator.id("rack_default-rack-1"), 10000);
48324833
assertTrue(cage.isDisplayed());
48334834
door = getDriver().findElement(By.id("door-1"));
48344835
assertTrue(door.isDisplayed());
48354836
}
4837+
4838+
@Test
4839+
public void testCageUIHomeDisplay() throws Exception {
4840+
testCageUIBasic();
4841+
beginAt(buildURL("cageui", getContainerPath(), "home"));
4842+
4843+
// Ensure room list renders available rooms correctly.
4844+
List<WebElement> roomList = getDriver().findElements(By.className("room-dir-room-obj"));
4845+
assertFalse(roomList.isEmpty());
4846+
4847+
//Since we previously saved the room as the first option we will ensure that it loads here as well.
4848+
roomList.get(0).click();
4849+
WebElement layoutSvg = waitForElement(Locator.id("layout-svg"), 20000);
4850+
assertTrue(layoutSvg.isDisplayed());
4851+
4852+
WebElement cage = waitForElement(Locator.name("cage-1"), 10000);
4853+
assertTrue(cage.isDisplayed());
4854+
WebElement door = getDriver().findElement(By.id("door-1"));
4855+
assertTrue(door.isDisplayed());
4856+
4857+
4858+
}
48364859
}

0 commit comments

Comments
 (0)