|
11 | 11 | import org.labkey.test.categories.External; |
12 | 12 | import org.labkey.test.categories.LabModule; |
13 | 13 | import org.labkey.test.components.ext4.Window; |
14 | | -import org.labkey.test.util.DataRegion; |
15 | 14 | import org.labkey.test.util.DataRegionTable; |
16 | 15 | import org.labkey.test.util.Ext4Helper; |
17 | | -import org.labkey.test.util.LogMethod; |
18 | | -import org.labkey.test.util.LoggedParam; |
19 | 16 | import org.labkey.test.util.ext4cmp.Ext4ComboRef; |
20 | 17 | import org.labkey.test.util.ext4cmp.Ext4FieldRef; |
21 | 18 | import org.labkey.test.util.ext4cmp.Ext4GridRef; |
22 | 19 | import org.openqa.selenium.WebElement; |
23 | | -import org.openqa.selenium.support.ui.ExpectedConditions; |
24 | 20 |
|
25 | 21 | import java.util.Collections; |
26 | 22 | import java.util.List; |
@@ -98,7 +94,26 @@ public void testLabPurchasingModule() |
98 | 94 |
|
99 | 95 | // Adding the new vendor should have updated the combo: |
100 | 96 | grid.clickTbarButton("Add New"); |
| 97 | + checker().withScreenshot("LabPurchasingBeforeVendor"); |
101 | 98 | grid.setGridCell(1, "vendorId", "New Vendor 1"); |
| 99 | + try |
| 100 | + { |
| 101 | + Assert.assertTrue("Missing vendor cell", isElementPresent(Ext4GridRef.locateExt4GridCell("New Vendor 1"))); |
| 102 | + } |
| 103 | + catch (AssertionError e) |
| 104 | + { |
| 105 | + checker().withScreenshot("LabPurchasingVendor0"); |
| 106 | + WebElement el = grid.startEditing(1, "vendorId"); |
| 107 | + checker().withScreenshot("LabPurchasingVendor1"); |
| 108 | + |
| 109 | + setFormElementJS(el, ""); |
| 110 | + el.sendKeys("New Vendor 1"); |
| 111 | + sleep(1000); |
| 112 | + |
| 113 | + checker().withScreenshot("LabPurchasingVendor2"); |
| 114 | + |
| 115 | + throw e; |
| 116 | + } |
102 | 117 |
|
103 | 118 | // Try to save, expect error: |
104 | 119 | click(Ext4Helper.Locators.ext4Button("Order Items")); |
|
0 commit comments