Skip to content

Commit 88a450f

Browse files
authored
Scroll the domain designer save button into view (#2847)
1 parent 81ee4aa commit 88a450f

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/org/labkey/test/components/domain/BaseDomainDesigner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.labkey.test.Locator;
55
import org.labkey.test.components.Component;
66
import org.labkey.test.components.WebDriverComponent;
7+
import org.labkey.test.util.selenium.ScrollUtils;
78
import org.openqa.selenium.WebDriver;
89
import org.openqa.selenium.WebElement;
910

@@ -66,7 +67,8 @@ public boolean isSaveButtonEnabled()
6667
*/
6768
public Object clickSave()
6869
{
69-
getWrapper().clickAndWait(elementCache().saveButton);
70+
// Selenium sometimes doesn't think the save button needs to be scrolled into view but the click does nothing.
71+
getWrapper().clickAndWait(ScrollUtils.scrollIntoView(elementCache().saveButton));
7072
return null;
7173
}
7274

src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ public T setNameExpression(String nameExpression)
122122
{
123123
expandPropertiesPanel();
124124
elementCache().nameExpressionInput.set(nameExpression);
125+
if (nameExpression.contains("${genId}"))
126+
{
127+
// Wait for genId banner to avoid interfering with subsequent steps by shifting the page layout
128+
// Non-fatal to let specific tests check for this
129+
var _ = WebDriverWrapper.waitFor(this::isGenIdVisible, 1_000);
130+
}
125131
return getThis();
126132
}
127133

0 commit comments

Comments
 (0)