Skip to content

Commit d233d0f

Browse files
committed
Merge branch 'develop' into fb_testFieldKey52556
2 parents 5e67b0b + 591b1f3 commit d233d0f

6 files changed

Lines changed: 37 additions & 7 deletions

File tree

src/org/labkey/test/components/ui/entities/EntityBulkUpdateDialog.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import org.labkey.test.components.react.ReactDateTimePicker;
1717
import org.labkey.test.components.react.ToggleButton;
1818
import org.labkey.test.components.ui.files.FileAttachmentContainer;
19+
import org.labkey.test.components.ui.files.FileUploadField;
1920
import org.labkey.test.params.FieldDefinition;
2021
import org.labkey.test.params.FieldKey;
2122
import org.labkey.test.util.AuditLogHelper;
@@ -268,6 +269,11 @@ public EntityBulkUpdateDialog removeFile(CharSequence fieldIdentifier)
268269
return this;
269270
}
270271

272+
public FileUploadField getExistingFileField(String fieldIdentifier)
273+
{
274+
return elementCache().fileField(fieldIdentifier);
275+
}
276+
271277
/**
272278
* @param fieldIdentifier Identifier for the field; name ({@link String}) or fieldKey ({@link FieldKey})
273279
* @param checked value to set
@@ -469,6 +475,11 @@ public FileAttachmentContainer fileUploadField(CharSequence fieldIdentifier)
469475
return new FileAttachmentContainer(formRow(fieldIdentifier), getDriver());
470476
}
471477

478+
public FileUploadField fileField(CharSequence fieldIdentifier)
479+
{
480+
return new FileUploadField(Locator.tagWithClass("div", "col-xs-12").findElementOrNull(formRow(fieldIdentifier)), getDriver());
481+
}
482+
472483
final Locator textInputLoc = Locator.tagWithAttribute("input", "type", "text");
473484
final Locator numberInputLoc = Locator.tagWithAttribute("input", "type", "number");
474485
final Locator checkBoxLoc = Locator.tagWithAttribute("input", "type", "checkbox");

src/org/labkey/test/components/ui/files/FileAttachmentContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public String attachFileExpectingAlert(File file)
111111
/**
112112
* Returns true if there is a file with that name in the current instance
113113
*/
114-
private boolean hasFile(String fileName)
114+
public boolean hasFile(String fileName)
115115
{
116116
return new FileAttachmentEntry.FileAttachmentEntryFinder(getDriver())
117117
.withTitle(fileName).findOptional(this).isPresent();

src/org/labkey/test/components/ui/files/FileUploadField.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ public boolean hasAttachedFile()
5353
return !elementCache().fileInputLabel.isDisplayed();
5454
}
5555

56+
public String getExistingFileName()
57+
{
58+
if (hasAttachedFile())
59+
{
60+
AttachmentCard card = elementCache().getExistingAttachment().get();
61+
return card.getFileName();
62+
}
63+
return null;
64+
}
65+
5666
@Override
5767
public WebElement getComponentElement()
5868
{

src/org/labkey/test/components/ui/grids/ResponsiveGrid.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,16 @@ private GridFilterModal initFilterColumn(CharSequence columnIdentifier, Filter.O
232232
clickColumnMenuItem(columnIdentifier, "Filter...", false);
233233
GridFilterModal filterModal = new GridFilterModal(getDriver(), this);
234234
if (operator != null)
235-
filterModal.selectExpressionTab().setFilter(new FilterExpressionPanel.Expression(operator, value));
235+
{
236+
if (operator.equals(Filter.Operator.IN) && value instanceof List<?>)
237+
{
238+
List<String> values = (List<String>) value;
239+
filterModal.selectFacetTab().selectValue(values.get(0));
240+
filterModal.selectFacetTab().checkValues(values.toArray(String[]::new));
241+
}
242+
else
243+
filterModal.selectExpressionTab().setFilter(new FilterExpressionPanel.Expression(operator, value));
244+
}
236245
return filterModal;
237246
}
238247

src/org/labkey/test/components/ui/navigation/NavBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void clickHeaderLogo()
3939

4040
public String getHeaderLogoImgSrc()
4141
{
42-
return elementCache().headerLogo.getAttribute("src");
42+
return elementCache().headerLogoImage.getAttribute("src");
4343
}
4444

4545
public HasSearchResults searchFor(String searchString)

src/org/labkey/test/util/DataRegionTable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public int getColumnCount()
246246

247247
public boolean hasSummaryStatisticRow()
248248
{
249-
return Locator.css("tr.labkey-col-total").findElements(elementCache()).size() > 0;
249+
return !Locator.css("tr.labkey-col-total").findElements(elementCache()).isEmpty();
250250
}
251251

252252
/**
@@ -457,7 +457,7 @@ public int getColumnIndex(String name)
457457
if (i < 0)
458458
{
459459
List<String> columnLabelsWithoutSpaces = new ArrayList<>(getColumnLabels().size());
460-
getColumnLabels().stream().forEach(s -> columnLabelsWithoutSpaces.add(s.replace(" ", "")));
460+
getColumnLabels().forEach(s -> columnLabelsWithoutSpaces.add(s.replace(" ", "")));
461461
i = columnLabelsWithoutSpaces.indexOf(name.replace(" ", ""));
462462
if (i >= 0)
463463
{
@@ -825,7 +825,7 @@ public boolean hasHref(int row, String columnName)
825825
public WebElement getFlag(int row, String columnName)
826826
{
827827
var cell = findCell(row, columnName);
828-
return tagWithAttribute("i", "flagid").findElement(cell);
828+
return tagWithAttribute("i", "data-flagid").findElement(cell);
829829
}
830830

831831
public boolean isFlagEnabled(int row, String columnName)
@@ -913,7 +913,7 @@ public void clearFlagValue(int row, String columnName)
913913
*/
914914
public void clearFlagValues()
915915
{
916-
List<WebElement> allFlags = Locator.tagWithAttribute("i", "flagid").findElements(elementCache());
916+
List<WebElement> allFlags = Locator.tagWithAttribute("i", "data-flagid").findElements(elementCache());
917917
for (WebElement flag : allFlags)
918918
{
919919
if (isFlagEnabled(flag))

0 commit comments

Comments
 (0)