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
30 changes: 30 additions & 0 deletions src/org/labkey/test/components/react/QueryChartDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,34 @@ private void clickFieldOptions(String label)
elementCache().fieldOptionIconByLabel(label).click();
}

public QueryChartDialog setLegendPos(String legendPos)
{

if ("bottom".equals(legendPos))
elementCache().legendBottomRadio.check();
else if ("right".equals(legendPos))
elementCache().legendRightRadio.check();
else
throw new IllegalArgumentException("Invalid legend value: " + legendPos);

return this;
}

public String getLegendPos()
{
if (elementCache().legendBottomRadio.isChecked())
return "bottom";
else if (elementCache().legendRightRadio.isChecked())
return "right";

throw new IllegalStateException("Unexpected legend position");
}

public boolean isLegendPosVisible()
{
return elementCache().legendBottomRadio.isDisplayed() && elementCache().legendRightRadio.isDisplayed();
}

/**
* Set the axis scale to 'linear' or 'log' for the given axis
* @param label the axis label
Expand Down Expand Up @@ -717,6 +745,8 @@ public WebElement svg()
public RadioButton scaleLogRadio = RadioButton.RadioButton(Locator.radioButtonByNameAndValue("scaleTrans", "log")).refindWhenNeeded(fieldOptionPopover);
public RadioButton scaleAutomaticRadio = RadioButton.RadioButton(Locator.radioButtonByNameAndValue("scaleType", "automatic")).refindWhenNeeded(fieldOptionPopover);
public RadioButton scaleManualRadio = RadioButton.RadioButton(Locator.radioButtonByNameAndValue("scaleType", "manual")).refindWhenNeeded(fieldOptionPopover);
public RadioButton legendRightRadio = RadioButton.RadioButton(Locator.radioButtonByNameAndValue("legendPos", "right")).refindWhenNeeded(settingsPanel);
public RadioButton legendBottomRadio = RadioButton.RadioButton(Locator.radioButtonByNameAndValue("legendPos", "bottom")).refindWhenNeeded(settingsPanel);
public Input scaleRangeMinInput = Input(Locator.input("scaleMin"), getDriver()).refindWhenNeeded(fieldOptionPopover);
public Input scaleRangeMaxInput = Input(Locator.input("scaleMax"), getDriver()).refindWhenNeeded(fieldOptionPopover);
public Input yLabelInput = Input(Locator.input("y-label"), getDriver()).refindWhenNeeded(fieldOptionPopover);
Expand Down