Skip to content
Merged
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions src/org/labkey/test/tests/SampleTypeRenameTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.labkey.test.util.TestDataGenerator;
import org.labkey.test.util.exp.SampleTypeAPIHelper;
import org.labkey.test.util.search.SearchAdminAPIHelper;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;

import java.io.IOException;
Expand Down Expand Up @@ -106,6 +107,11 @@ public void testSampleTypeFieldRename() throws IOException, CommandException
SearchAdminAPIHelper.waitForIndexer();

goToProjectHome();

// Sometimes sample types created by the API don't immediately show up in the UI, a refresh helps.
refresh();
waitForElement(Locator.linkContainingText(sampleTypeName));

SampleTypeHelper sampleHelper = new SampleTypeHelper(this);
UpdateSampleTypePage updatePage = sampleHelper.goToEditSampleType(sampleTypeName);
updatePage.getFieldsPanel().getField(FIELD_INT).setName(FIELD_INT + " Updated");
Expand Down Expand Up @@ -173,6 +179,9 @@ public void testCustomViewWithSampleTypeRename()
.verifyTrue(String.format("Doesn't look like custom view '%s' was saved. Fatal error.", customViewName),
menuItems.contains(customViewName));

// Dismiss the menu so it doesn't get in the way.
menu.findVisibleMenuItems().get(0).sendKeys(Keys.ESCAPE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the menu's collapse method work?

Suggested change
// Dismiss the menu so it doesn't get in the way.
menu.findVisibleMenuItems().get(0).sendKeys(Keys.ESCAPE);
// Dismiss the menu so it doesn't get in the way.
menu.collapse();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.


log(String.format("Rename the sample type to '%s'.", SAMPLE_TYPE_NAME_UPDATED));

clickAndWait(editButton);
Expand Down