use of org.fest.swing.fixture.JListFixture in project android by JetBrains.
the class NlPreviewFixture method dragComponentToSurface.
@NotNull
public NlPreviewFixture dragComponentToSurface(@NotNull String group, @NotNull String item) {
openPalette();
NlPaletteTreeGrid treeGrid = myRobot.finder().findByType(NlPaletteTreeGrid.class, true);
Wait.seconds(5).expecting("the UI to be populated").until(() -> treeGrid.getCategoryList().getModel().getSize() > 0);
new JListFixture(myRobot, treeGrid.getCategoryList()).selectItem(group);
// Wait until the list has been expanded in UI (eliminating flakiness).
JList list = GuiTests.waitUntilShowing(myRobot, treeGrid, Matchers.byName(JList.class, group));
new JListFixture(myRobot, list).drag(item);
myDragAndDrop.drop(myDesignSurfaceFixture.target(), new Point(0, 0));
return this;
}
Aggregations