Skip to content

Commit 03ae46d

Browse files
committed
QueryChartDialog: Add height/width inputs
1 parent f70bc62 commit 03ae46d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/org/labkey/test/components/react/QueryChartDialog.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,31 @@ public QueryChartDialog setSubtitle(String value)
5858
return this;
5959
}
6060

61+
public QueryChartDialog setHeight(String value)
62+
{
63+
elementCache().heightInput.set(value);
64+
elementCache().title.click(); // blur the element
65+
return this;
66+
}
67+
68+
public QueryChartDialog setWidth(String value)
69+
{
70+
elementCache().widthInput.set(value);
71+
elementCache().title.click(); // blur the element
72+
return this;
73+
}
74+
75+
public QueryChartDialog setUseFullWidth(boolean checked)
76+
{
77+
elementCache().fullWidthCheckbox.set(checked);
78+
return this;
79+
}
80+
81+
public boolean getUseFullWidth()
82+
{
83+
return elementCache().sharedCheckbox.get();
84+
}
85+
6186
public QueryChartDialog setShared(boolean checked)
6287
{
6388
elementCache().sharedCheckbox.set(checked);
@@ -571,8 +596,11 @@ protected class ElementCache extends ModalDialog.ElementCache
571596
final Input nameInput = Input(Locator.input("name"), getDriver()).findWhenNeeded(settingsPanel);
572597
final Input titleInput = Input(Locator.input("main-label"), getDriver()).findWhenNeeded(settingsPanel);
573598
final Input subtitleInput = Input(Locator.input("subtitle-label"), getDriver()).findWhenNeeded(settingsPanel);
599+
final Input heightInput = Input(Locator.input("height"), getDriver()).findWhenNeeded(settingsPanel);
600+
final Input widthInput = Input(Locator.input("width"), getDriver()).findWhenNeeded(settingsPanel);
574601
final Checkbox sharedCheckbox = Checkbox.Checkbox(Locator.input("shared")).findWhenNeeded(settingsPanel);
575602
final Checkbox inheritableCheckbox = Checkbox.Checkbox(Locator.input("inheritable")).findWhenNeeded(settingsPanel);
603+
final Checkbox fullWidthCheckbox = Checkbox.Checkbox(Locator.input("use-full-width")).findWhenNeeded(settingsPanel);
576604

577605
public ReactSelect reactSelectByLabel(String label)
578606
{

0 commit comments

Comments
 (0)