Search in sources :

Example 21 with JListFixture

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;
}
Also used : JListFixture(org.fest.swing.fixture.JListFixture) NlPaletteTreeGrid(com.android.tools.idea.uibuilder.palette.NlPaletteTreeGrid) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

JListFixture (org.fest.swing.fixture.JListFixture)21 PublicAtsApi (com.axway.ats.common.PublicAtsApi)8 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)7 NotNull (org.jetbrains.annotations.NotNull)6 JBList (com.intellij.ui.components.JBList)4 ASGallery (com.android.tools.idea.ui.ASGallery)2 NlPaletteTreeGrid (com.android.tools.idea.uibuilder.palette.NlPaletteTreeGrid)2 JComboBoxFixture (org.fest.swing.fixture.JComboBoxFixture)2 JPopupMenuFixture (org.fest.swing.fixture.JPopupMenuFixture)2 TemplateEntry (com.android.tools.idea.npw.TemplateEntry)1 ThemeSelectionDialogFixture (com.android.tools.idea.tests.gui.framework.fixture.ThemeSelectionDialogFixture)1 AndroidThemePreviewPanelFixture (com.android.tools.idea.tests.gui.framework.fixture.theme.AndroidThemePreviewPanelFixture)1 NewStyleDialogFixture (com.android.tools.idea.tests.gui.framework.fixture.theme.NewStyleDialogFixture)1 ThemeEditorFixture (com.android.tools.idea.tests.gui.framework.fixture.theme.ThemeEditorFixture)1 ElementNotFoundException (com.axway.ats.uiengine.exceptions.ElementNotFoundException)1 VerifyNotEqualityException (com.axway.ats.uiengine.exceptions.VerifyNotEqualityException)1 SwingDriverInternal (com.axway.ats.uiengine.internal.driver.SwingDriverInternal)1 LookupElement (com.intellij.codeInsight.lookup.LookupElement)1 PopupFactoryImpl (com.intellij.ui.popup.PopupFactoryImpl)1 ListPopupModel (com.intellij.ui.popup.list.ListPopupModel)1