|
104 | 104 | import java.util.UUID; |
105 | 105 |
|
106 | 106 | import static org.junit.Assert.assertEquals; |
| 107 | +import static org.junit.Assert.assertFalse; |
107 | 108 | import static org.junit.Assert.assertTrue; |
108 | 109 | import static org.labkey.test.WebTestHelper.buildURL; |
109 | 110 | import static org.labkey.test.WebTestHelper.getRemoteApiConnection; |
@@ -4828,9 +4829,31 @@ public void testCageUIBasic() throws Exception { |
4828 | 4829 | Assert.assertTrue(layoutSvg.isDisplayed()); |
4829 | 4830 |
|
4830 | 4831 | // 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); |
4832 | 4833 | assertTrue(cage.isDisplayed()); |
4833 | 4834 | door = getDriver().findElement(By.id("door-1")); |
4834 | 4835 | assertTrue(door.isDisplayed()); |
4835 | 4836 | } |
| 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 | + } |
4836 | 4859 | } |
0 commit comments