Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ehr/test/src/org/labkey/test/util/ehr/EHRTestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,31 @@ public void applyTemplate(Ext4GridRef grid, String templateName, boolean bulkEdi
}
}

public Locator.XPathLocator openBulkEdit(Ext4GridRef grid)
{
grid.clickTbarButton("More Actions");
_test.waitAndClick(Locator.tag("span").withText("Bulk Edit"));
Locator.XPathLocator bulkEditWindow = Ext4Helper.Locators.window("Bulk Edit");
_test.waitForElement(bulkEditWindow);
return bulkEditWindow;
}

// This method toggles the bulk edit field that CONTAINS the label parameter in the label
public void toggleBulkEditField(String label)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a comment that this does a contains check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

{
Locator.XPathLocator l = Ext4Helper.Locators.window("Bulk Edit").append(Locator.tagContainingText("label", label + ":").withClass("x4-form-item-label"));
_test.shortWait().until(ExpectedConditions.numberOfElementsToBe(l, 1)).get(0).click();
_test.waitForElement(l.enabled());
}

// This method toggles the bulk edit field that has the exact label
public void toggleBulkEditExactField(String label)
{
Locator.XPathLocator l = Ext4Helper.Locators.window("Bulk Edit").append(Locator.tagWithText("label", label + ":").withClass("x4-form-item-label"));
_test.shortWait().until(ExpectedConditions.numberOfElementsToBe(l, 1)).get(0).click();
_test.waitForElement(l.enabled());
}

public void discardForm()
{
WebElement dataEntryButton = getDataEntryButton("More Actions").findElement(_test.getDriver());
Expand Down