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
18 changes: 8 additions & 10 deletions src/org/labkey/test/components/ui/grids/ResponsiveGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package org.labkey.test.components.ui.grids;

import org.awaitility.Awaitility;
import org.jetbrains.annotations.Nullable;
import org.labkey.remoteapi.query.Filter;
import org.labkey.test.Locator;
Expand All @@ -26,6 +27,7 @@
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;

import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -357,20 +359,16 @@ public void editColumnLabel(CharSequence columnIdentifier, String newColumnLabel
.keyUp(Keys.SHIFT)
.perform();

// Enter the new text.
textEdit.sendKeys(newColumnLabel, Keys.RETURN);
doAndWaitForUpdate(()-> {
textEdit.sendKeys(newColumnLabel, Keys.RETURN);

getWrapper().shortWait()
getWrapper().shortWait()
.withMessage("Column label edit text box did not go away.")
.until(ExpectedConditions.stalenessOf(textEdit));

doAndWaitForUpdate(()->
WebDriverWrapper.waitFor(()-> WebElementUtils.getTextContent(headerCell).equals(newColumnLabel),
"Column header not updated.", 1_000)
);
waitForLoaded();
clearElementCache();

Awaitility.await().atMost(Duration.ofSeconds(1)).untilAsserted(() -> assertEquals("Column label",
newColumnLabel, WebElementUtils.getTextContent(headerCell)));
});
}

/**
Expand Down