Skip to content

Commit e276197

Browse files
Avoid some UI test issues. (#2806)
1 parent b6f03e6 commit e276197

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.labkey.test.util.TestDataGenerator;
2222
import org.labkey.test.util.exp.SampleTypeAPIHelper;
2323
import org.labkey.test.util.search.SearchAdminAPIHelper;
24+
import org.openqa.selenium.Keys;
2425
import org.openqa.selenium.WebElement;
2526

2627
import java.io.IOException;
@@ -106,6 +107,11 @@ public void testSampleTypeFieldRename() throws IOException, CommandException
106107
SearchAdminAPIHelper.waitForIndexer();
107108

108109
goToProjectHome();
110+
111+
// Sometimes sample types created by the API don't immediately show up in the UI, a refresh helps.
112+
refresh();
113+
waitForElement(Locator.linkContainingText(sampleTypeName));
114+
109115
SampleTypeHelper sampleHelper = new SampleTypeHelper(this);
110116
UpdateSampleTypePage updatePage = sampleHelper.goToEditSampleType(sampleTypeName);
111117
updatePage.getFieldsPanel().getField(FIELD_INT).setName(FIELD_INT + " Updated");
@@ -173,6 +179,9 @@ public void testCustomViewWithSampleTypeRename()
173179
.verifyTrue(String.format("Doesn't look like custom view '%s' was saved. Fatal error.", customViewName),
174180
menuItems.contains(customViewName));
175181

182+
// Dismiss the menu so it doesn't get in the way.
183+
menu.collapse();
184+
176185
log(String.format("Rename the sample type to '%s'.", SAMPLE_TYPE_NAME_UPDATED));
177186

178187
clickAndWait(editButton);

0 commit comments

Comments
 (0)