Skip to content

Commit 7ccf7f5

Browse files
authored
Debug purchasing test (#107)
* Debug purchasing test
1 parent a272ad4 commit 7ccf7f5

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

LabPurchasing/test/src/org/labkey/test/tests/labpurchasing/LabPurchasingTest.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111
import org.labkey.test.categories.External;
1212
import org.labkey.test.categories.LabModule;
1313
import org.labkey.test.components.ext4.Window;
14-
import org.labkey.test.util.DataRegion;
1514
import org.labkey.test.util.DataRegionTable;
1615
import org.labkey.test.util.Ext4Helper;
17-
import org.labkey.test.util.LogMethod;
18-
import org.labkey.test.util.LoggedParam;
1916
import org.labkey.test.util.ext4cmp.Ext4ComboRef;
2017
import org.labkey.test.util.ext4cmp.Ext4FieldRef;
2118
import org.labkey.test.util.ext4cmp.Ext4GridRef;
2219
import org.openqa.selenium.WebElement;
23-
import org.openqa.selenium.support.ui.ExpectedConditions;
2420

2521
import java.util.Collections;
2622
import java.util.List;
@@ -98,7 +94,26 @@ public void testLabPurchasingModule()
9894

9995
// Adding the new vendor should have updated the combo:
10096
grid.clickTbarButton("Add New");
97+
checker().withScreenshot("LabPurchasingBeforeVendor");
10198
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+
}
102117

103118
// Try to save, expect error:
104119
click(Ext4Helper.Locators.ext4Button("Order Items"));

0 commit comments

Comments
 (0)