Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Issue 51798 #2187

Merged
merged 2 commits into from
Dec 17, 2024
Merged
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/components/domain/DomainFormPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public void click()
}
};

WebElement fileUploadInput = Locator.tagWithClass("input", "file-upload--input").findWhenNeeded(DomainFormPanel.this).withTimeout(2000);
WebElement fileUploadInput = Locator.tagWithClass("input", "file-upload__input").findWhenNeeded(DomainFormPanel.this).withTimeout(2000);

WebElement defaultSystemFieldsContainer = Locator.tagWithClass("div", "domain-system-fields")
.findWhenNeeded(this).withTimeout(WAIT_FOR_JAVASCRIPT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,23 +188,23 @@ public String getFooterMessage()
protected class ElementCache extends Component<?>.ElementCache
{
public Locator dropTargetLoc = Locator.XPathLocator.union(
Locator.tagWithClass("div", "file-upload--container"),
Locator.tagWithClass("div", "file-upload--container--compact"));
Locator.tagWithClass("div", "file-upload__container"),
Locator.tagWithClass("div", "file-upload__container--compact"));
public Locator labelLoc = Locator.XPathLocator.union(
Locator.tagWithClass("label", "file-upload--label"),
Locator.tagWithClass("label", "file-upload--label--compact"));
public FileInput fileInput = Input.FileInput(Locator.tagWithClass("input", "file-upload--input"), getDriver())
Locator.tagWithClass("label", "file-upload__label"),
Locator.tagWithClass("label", "file-upload__label--compact"));
public FileInput fileInput = Input.FileInput(Locator.tagWithClass("input", "file-upload__input"), getDriver())
.findWhenNeeded(this);
public WebElement fileEntryList = Locator.tagWithClass("div", "file-upload--file-entry-listing")
public WebElement fileEntryList = Locator.tagWithClass("div", "file-upload__file-entry-listing")
.findWhenNeeded(this);
public Locator uploadAlertLoc = Locator.tagWithClass("div", "alert");
public Locator fileUploadScrollFooterLoc = Locator.tagWithClass("div", "file-upload--scroll-footer");
public Locator fileUploadScrollFooterLoc = Locator.tagWithClass("div", "file-upload__scroll-footer");
}


public static class FileAttachmentContainerFinder extends WebDriverComponentFinder<FileAttachmentContainer, FileAttachmentContainerFinder>
{
private final Locator.XPathLocator _baseLocator = Locator.tagWithClass("div", "file-upload--container").parent("div");
private final Locator.XPathLocator _baseLocator = Locator.tagWithClass("div", "file-upload__container").parent("div");
private String _inputName = null;
private String _label = null;

Expand Down Expand Up @@ -235,10 +235,10 @@ protected FileAttachmentContainer construct(WebElement el, WebDriver driver)
protected Locator locator()
{
if (_inputName != null)
return _baseLocator.withDescendant(Locator.tagWithClass("input", "file-upload--input")
return _baseLocator.withDescendant(Locator.tagWithClass("input", "file-upload__input")
.withAttribute("name", _inputName));
else if (_label != null)
return Locator.tagWithClass("label", "file-upload--label")
return Locator.tagWithClass("label", "file-upload__label")
.withAttributeMatchingOtherElementAttribute("name", Locator.tag("label").withText(_label), "for")
.parent("*");
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ protected ElementCache elementCache()

protected class ElementCache extends Component<?>.ElementCache
{
public Locator removeIconLoc = Locator.tagWithClass("span", "file-upload__remove--icon");
public Locator removeIconLoc = Locator.byClass("attached-file__remove-icon");
public WebElement removeIcon = removeIconLoc.findWhenNeeded(this);
public WebElement fileIcon = Locator.tagWithClass("span", "attached-file--icon").findWhenNeeded(this);
public WebElement fileIcon = Locator.byClass("attached-file__icon").findWhenNeeded(this);
}


public static class FileAttachmentEntryFinder extends WebDriverComponentFinder<FileAttachmentEntry, FileAttachmentEntryFinder>
{
private final Locator.XPathLocator _baseLocator = Locator.XPathLocator.union(
Locator.tagWithClass("div", "attached-file--container"),
Locator.tagWithClass("div", "attached-file--inline-container"));
Locator.tagWithClass("div", "attached-file__container"),
Locator.tagWithClass("div", "attached-file__inline-container"));
private String _title = null;

public FileAttachmentEntryFinder(WebDriver driver)
Expand Down
4 changes: 2 additions & 2 deletions src/org/labkey/test/components/ui/files/FileUploadField.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ protected class ElementCache extends Component<?>.ElementCache
// Elements when no attachment is set
WebElement fileInputLabel = Locator.tagWithClass("label", "file-upload--compact-label")
.refindWhenNeeded(this);
WebElement fileInput = Locator.tagWithClass("input", "file-upload--input")
WebElement fileInput = Locator.tagWithClass("input", "file-upload__input")
.refindWhenNeeded(this);

// Elements for new attachment
WebElement tempFileLoc = Locator.tagWithClass("div", "attached-file--inline-container")
WebElement tempFileLoc = Locator.tagWithClass("div", "attached-file__inline-container")
.refindWhenNeeded(this);
WebElement removeBtn = Locator.tagWithClass("span", "file-upload__remove--icon")
.refindWhenNeeded(this);
Expand Down
4 changes: 2 additions & 2 deletions src/org/labkey/test/components/ui/files/FileUploadPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ FileInput fileUploadInput()
return Input.FileInput(Locator.id("fileUpload"), getDriver()).waitFor(this);
}

Locator.XPathLocator attachedFileContainer = Locator.tagWithClass("div", "attached-file--container")
Locator.XPathLocator attachedFileContainer = Locator.tagWithClass("div", "attached-file__container")
.withChild(Locator.tagWithClass("span", "fa-times-circle"));
WebElement downloadTemplate = Locator.linkWithTitle("Download Template").findWhenNeeded(getDriver());

Expand All @@ -120,7 +120,7 @@ WebElement removeBtn(String fileName)

public static class FileUploadPanelFinder extends WebDriverComponentFinder<FileUploadPanel, FileUploadPanelFinder>
{
private final Locator.XPathLocator _baseLocator = Locator.tagWithClass("div", "file-upload--container").parent();
private final Locator.XPathLocator _baseLocator = Locator.tagWithClass("div", "file-upload__container").parent();

public FileUploadPanelFinder(WebDriver driver)
{
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/pages/ReactAssayDesignerPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private ReactAssayDesignerPage setTransformScript(File transformScript, boolean
String targetPath = transformScript.getAbsolutePath();
if (usingFileUpload)
{
getWrapper().setFormElement(Locator.tagWithClass("input", "file-upload--input"), transformScript);
getWrapper().setFormElement(Locator.tagWithClass("input", "file-upload__input"), transformScript);
targetPath = "/@scripts/" + transformScript.getName();
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ public CompactFileUploadField removeFile()

public boolean hasAttachedFile()
{
return Locator.tagWithClass("div", "attached-file--container")
return Locator.tagWithClass("div", "attached-file__container")
.existsIn(this);
}

public String getAttachedFileName()
{
if (hasAttachedFile())
{
return Locator.tagWithClass("div", "attached-file--container")
return Locator.tagWithClass("div", "attached-file__container")
.waitForElement(this, 2000).getText();
}
else
Expand Down Expand Up @@ -98,15 +98,15 @@ protected ElementCache newElementCache()
protected class ElementCache extends Component<?>.ElementCache
{

WebElement logoFileInput = Locator.tagWithClass("input", "file-upload--input")
WebElement logoFileInput = Locator.tagWithClass("input", "file-upload__input")
.refindWhenNeeded(this).withTimeout(4000);

WebElement removeBtn = Locator.tagWithClass("span", "file-upload__remove--icon")
.refindWhenNeeded(this).withTimeout(4000);

Locator attachedFile(File file)
{
return Locator.tagWithClass("div", "attached-file--container").containing(file.getName());
return Locator.tagWithClass("div", "attached-file__container").containing(file.getName());
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/org/labkey/test/pages/core/login/SsoLogoInputPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ protected ElementCache newElementCache()

protected class ElementCache extends WebDriverComponent.ElementCache
{
WebElement logoFileInputContainer = Locator.tagWithClass("div", "file-upload--container")
WebElement logoFileInputContainer = Locator.tagWithClass("div", "file-upload__container")
.refindWhenNeeded(this).withTimeout(4000);
WebElement logoFileInput = Locator.tagWithClass("input", "file-upload--input")
WebElement logoFileInput = Locator.tagWithClass("input", "file-upload__input")
.refindWhenNeeded(this).withTimeout(4000);
WebElement logoImageContainer = Locator.byClass("sso-fields__image-holder")
.refindWhenNeeded(this).withTimeout(4000);
Expand All @@ -69,7 +69,7 @@ protected class ElementCache extends WebDriverComponent.ElementCache

Locator attachedFile(File file)
{
return Locator.tagWithClass("div", "attached-file--container").containing(file.getName());
return Locator.tagWithClass("div", "attached-file__container").containing(file.getName());
}
Locator fileDropLoc = Locator.tagWithClass("div", "sso-fields__file-attachment");
}
Expand Down