Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/org/labkey/test/AppLocators.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ public abstract class AppLocators
{
private AppLocators() {}

public static final Locator.XPathLocator detailHeaderName = Locator.tagWithClass("h2", "detail__header--name");
public static final Locator.XPathLocator detailHeaderName = Locator.tagWithClass("h1", "detail__header--name");
}
4 changes: 2 additions & 2 deletions src/org/labkey/test/components/bootstrap/ModalDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ public ModalDialogFinder(WebDriver driver)

public ModalDialogFinder withTitle(String title)
{
_locator = Locators.dialog.withDescendant(Locator.tagWithClass("h4","modal-title").containing(title));
_locator = Locators.dialog.withDescendant(ModalDialog.Locators.title.containing(title));
return this;
}

public ModalDialogFinder withTitleIgnoreCase(String title)
{
_locator = Locators.dialog.withDescendant(Locator.tagWithClass("h4","modal-title").containingIgnoreCase(title));
_locator = Locators.dialog.withDescendant(ModalDialog.Locators.title.containingIgnoreCase(title));
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/components/bootstrap/Panel.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* <pre>{@code
*
* <div class="panel panel-default">
* <div class="panel-heading">Panel Title</div>
* <h2 class="panel-heading">Panel Title</h2>
* <div class="panel-body">
* <SomeComponent>
* </div>
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/components/html/DetailContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected class ElementCache extends Component<?>.ElementCache
static public class Locators
{
static public Locator.XPathLocator panelLoc = Locator.tagWithClass("div", "panel-default");
static public Locator.XPathLocator headerLoc = Locator.tagWithClass("div", "panel-heading");
static public Locator.XPathLocator headerLoc = Locator.byClass("panel-heading");
static public Locator.XPathLocator bodyLoc = Locator.tagWithClass("div", "panel-body");
static public Locator panelWithTitle(String title)
{
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/components/react/MultiMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ public MultiMenuFinder withButtonClass(String cls)
*/
public MultiMenuFinder withButtonIcon(String iconClass)
{
_locator = Locators.menuContainer().withChild(BootstrapMenu.Locators.dropdownToggle().withChild(Locator.byClass(iconClass)));
_locator = Locators.menuContainer().withChild(BootstrapMenu.Locators.dropdownToggle().withDescendant(Locator.byClass(iconClass)));
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/components/ui/assay/RunDataPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ protected Locator locator()
{
if (_title != null)
return Locator.tagWithClass("div", "panel")
.withChild(Locator.tagWithClass("div", "panel-heading").withText(_title))
.withChild(Locator.byClass( "panel-heading").withText(_title))
.child(Locator.tagWithClass("div", "panel-body"));
else
return _baseLocator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void clickButtonWaitForPanel(WebElement button, int wait)
infoCount <= 1);

// A reference to the editing header title
Locator editingLocator = Locator.tagWithClass("div", "panel-heading").startsWith("Editing");
Locator editingLocator = Locator.byClass("panel-heading").startsWith("Editing");

Assert.assertEquals("Cannot find a panel with 'Editing' in the header. There isn't a panel in edit mode.",
1, editingLocator.findElements(getDriver()).size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected Locator locator()
if (_asTooltip)
return _baseLocatorAsTooltip;
else if (_title != null)
return _baseLocator.withChild(Locator.tagWithClass("div", "panel-heading")
return _baseLocator.withChild(Locator.byClass("panel-heading")
.withText(_title));
else
return _baseLocator;
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/components/ui/grids/DetailTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public DetailTableFinder(WebDriver driver)
public DetailTableFinder withTitle(String title)
{
_locator = Locator.tagWithClass("div", "panel")
.withChild(Locator.tagWithClass("div", "panel-heading").startsWith(title))
.withChild(Locator.byClass("panel-heading").startsWith(title))
.descendant(_baseLocator);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ public ElementCache()
.invisibilityOfAllElements(Locator.byClass("select-input__loading-indicator").findElements(this)));
}

public final WebElement header = Locator.tagWithClass("div", "panel-heading")
public final WebElement header = Locator.byClass("panel-heading")
.findWhenNeeded(this);
public final WebElement editPanel = Locator.tagWithClass("div", "detail__editing")
.findWhenNeeded(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public FieldSelectionDialog removeFieldFromSelected(String field, int index)
removeIcon.click();

// Move the mouse over the dialog title.
getWrapper().mouseOver(Locator.tagWithClass("h4", "modal-title").findElement(this));
getWrapper().mouseOver(ModalDialog.Locators.title.findElement(this));

getWrapper().shortWait()
.withMessage(String.format("Field '%s' was not removed from list.", field))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected ElementCache newElementCache()

protected class ElementCache extends Component<?>.ElementCache
{
public WebElement panelHeading = Locator.tagWithClass("div", "panel-heading")
public WebElement panelHeading = Locator.byClass( "panel-heading")
.findWhenNeeded(this).withTimeout(2000);

public Locator editBtnLoc = Locator.tagWithClass("div", "detail__edit-button");
Expand Down Expand Up @@ -200,7 +200,7 @@ public ResponsiveGrid<?> responsiveGridFor(String type)
public static class ParentDetailPanelFinder extends WebDriverComponentFinder<ParentDetailPanel, ParentDetailPanelFinder>
{
private final Locator.XPathLocator _baseLocator = Locator.tagWithClass("div", "panel-default")
.withChild(Locator.tagWithClass("div", "panel-heading")
.withChild(Locator.byClass("panel-heading")
.withChild(Locator.tagWithClass("span", "detail__edit--heading")));
private String _title = null;

Expand All @@ -225,7 +225,7 @@ protected ParentDetailPanel construct(WebElement el, WebDriver driver)
protected Locator locator()
{
if (_title != null)
return _baseLocator.withDescendant(Locator.tagWithClass("div", "panel-heading")
return _baseLocator.withDescendant(Locator.byClass("panel-heading")
.startsWith(_title));
else
return _baseLocator;
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/components/ui/grids/QueryGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ public List<FilterStatusValue> getFilterStatusFilterValues()
// If this is the default view this will not be present.
public WebElement panelHeader()
{
return Locator.xpath("preceding-sibling::div[contains(@class,'panel-heading')]").findWhenNeeded(this);
return Locator.xpath("preceding-sibling::*[contains(@class,'panel-heading')]").findWhenNeeded(this);
}

final BootstrapMenu chartsMenu = new MultiMenu.MultiMenuFinder(getDriver()).withText("Charts").findWhenNeeded(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ final WebElement lineageItem(String name, WebElement tabPanel)
.findWhenNeeded(this).withTimeout(4000);
final WebElement componentDetailImage = Locator.tagWithClass("i", "component-detail--child--img")
.child(Locator.tag("img")).findWhenNeeded(nodeDetailContainer);
final WebElement nodeDetailName = Locator.tagWithClass("h4", "lineage-name-data")
final WebElement nodeDetailName = Locator.tagWithClass("div", "lineage-name-data")
.findWhenNeeded(nodeDetailContainer);
final WebElement nodeDetailLinksContainer = Locator.tagWithClass("div", "lineage-node-detail")
.findWhenNeeded(nodeDetailContainer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected NodeDetailGroup construct(WebElement el, WebDriver driver)
protected Locator locator()
{
if (_title != null)
return _baseLocator.withChild(Locator.tag("summary").withChild(Locator.tagContainingText("h6", _title)));
return _baseLocator.withChild(Locator.tag("summary").withChild(Locator.tagContainingText("div", _title)));
else
return _baseLocator;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected ElementCache newElementCache()

protected class ElementCache extends Component<?>.ElementCache
{
final WebElement title = Locator.tagWithClass("p", "panel-heading").findWhenNeeded(this);
final WebElement title = Locator.byClass("panel-heading").findWhenNeeded(this);

WebElement detailValueEl(String label)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected ElementCache newElementCache()
protected class ElementCache extends Component<?>.ElementCache
{
private final WebElement _removeButton = Locator.byClass("btn")
.withChild(Locator.byClass("fa-remove")).findWhenNeeded(this);
.withDescendant(Locator.byClass("fa-remove")).findWhenNeeded(this);
private final WebElement _nameButton = Locator.byClass("permissions-button-display")
.findWhenNeeded(this).withTimeout(1000);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ protected class ElementCache extends LabKeyPage<?>.ElementCache
Locator dataPanelWithTitle(String title)
{
return Locator.tagWithClass("div", "panel-default")
.withChild(Locator.tagWithClass("div", "panel-heading").withText(title));
.withChild(Locator.byClass("panel-heading").withText(title));
}

// data selections
Expand Down Expand Up @@ -233,7 +233,7 @@ Optional<ReactSelect> spotSelect()

// curve fit
WebElement curveFitPanel = Locator.tagWithClass("div", "panel-default")
.withChild(Locator.tagWithClass("div", "panel-heading").startsWith("Curve Fit:"))
.withChild(Locator.byClass( "panel-heading").startsWith("Curve Fit:"))
.findWhenNeeded(this);
Checkbox showCurveFitLineBox = new Checkbox(Locator.checkbox().findWhenNeeded(curveFitPanel));
Optional<WebElement> fitParameters()
Expand Down
4 changes: 2 additions & 2 deletions src/org/labkey/test/pages/core/login/LoginConfigurePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ protected class ElementCache extends LabKeyPage<?>.ElementCache
WebElement globalSettingsPanel()
{
return Locator.tagWithClass("div", "panel-default")
.withChild(Locator.tagWithClass("div", "panel-heading")
.withChild(Locator.byClass("panel-heading")
.withChild(Locator.tag("span").withText("Global Settings")))
.waitForElement(this, WAIT_FOR_JAVASCRIPT);
}

WebElement configurationsPanel()
{
return Locator.tagWithClass("div", "panel-default")
.withDescendant(Locator.tagWithClass("div", "panel-heading").withChild(Locator.tag("span").withText("Configurations")))
.withDescendant(Locator.byClass("panel-heading").withChild(Locator.tag("span").withText("Configurations")))
.waitForElement(this, WAIT_FOR_JAVASCRIPT);
}

Expand Down