Skip to content

Commit 9a313a4

Browse files
Fix some recent/intermittent teamcity test failures (#2389)
1 parent e6c9c1e commit 9a313a4

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/org/labkey/test/WebDriverWrapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
import java.net.MalformedURLException;
117117
import java.net.URL;
118118
import java.net.URLDecoder;
119+
import java.nio.charset.Charset;
119120
import java.nio.charset.StandardCharsets;
120121
import java.nio.file.Files;
121122
import java.nio.file.Paths;
@@ -460,6 +461,7 @@ protected Pair<WebDriver, DriverService> createNewWebDriver(@NotNull Pair<WebDri
460461
String browserVersion = caps.getBrowserVersion();
461462
log("Browser: " + browserName + " " + browserVersion);
462463
log("Started browser with TZ = " + targetBrowserTimeZone + (targetBrowserTimeZone != ZoneId.systemDefault() ? "" : " (system default)"));
464+
log(String.format("charset is %s", Charset.defaultCharset().displayName()));
463465

464466
return result;
465467
}

src/org/labkey/test/pages/assay/RunQCPage.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package org.labkey.test.pages.assay;
1717

1818
import org.labkey.test.Locator;
19+
import org.labkey.test.WebDriverWrapper;
1920
import org.labkey.test.components.PlateGrid;
2021
import org.labkey.test.pages.LabKeyPage;
2122
import org.labkey.test.selenium.LazyWebElement;
@@ -35,6 +36,14 @@ public RunQCPage(WebDriver driver){
3536
_driver = driver;
3637
}
3738

39+
@Override
40+
protected void waitForPage()
41+
{
42+
Locator waitMsg = Locator.tagWithClass("div", "x4-mask-msg-text").withText("Requesting QC information");
43+
WebDriverWrapper.waitFor(()-> !waitMsg.isDisplayed(getDriver()),
44+
"Took too long to display the page", WAIT_FOR_JAVASCRIPT);
45+
}
46+
3847
public WebElement getSpecimenSection(String sectionTitle)
3948
{
4049
String xpath = elementCache().DILUTION_SUMMARY_XPATH + "//tbody//tr//td[text()='" + sectionTitle + "']";
@@ -74,7 +83,7 @@ public void selectPlateItemsToIgnore(String plateTitle, List<String> valuesToIgn
7483
String xpath = elementCache().PLATE_CONTROLS_VALUES_XPATH.replace("$", plateTitle);
7584
for(String value : valuesToIgnore)
7685
{
77-
click(Locator.xpath(xpath + "//label[text()='" + value + "']"));
86+
waitAndClick(Locator.xpath(xpath + "//label[text()='" + value + "']"));
7887
}
7988
}
8089

@@ -83,7 +92,7 @@ public void selectDilutionItemsToIgnore(String sectionTitle, List<String> values
8392
String xpath = elementCache().DILUTION_SUMMARY_VALUES_XPATH.replace("$", sectionTitle);
8493
for(String value : valuesToIgnore)
8594
{
86-
click(Locator.xpath(xpath + "//label[text()='" + value + "']"));
95+
waitAndClick(Locator.xpath(xpath + "//label[text()='" + value + "']"));
8796
}
8897
}
8998

src/org/labkey/test/tests/SimpleModuleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ private void submitAndTestExpectedFailure(Command cmd, String expectedError) thr
461461
@LogMethod
462462
private void doTestCustomFolder()
463463
{
464-
clickProject(getProjectName());
464+
goToProjectHome();
465465
PortalHelper portalHelper = new PortalHelper(this);
466466

467467
assertTextPresentInThisOrder("A customized web part", "Data Pipeline", "Experiment Runs", "Sample Type", "Assay List");

0 commit comments

Comments
 (0)