Search in sources :

Example 1 with TemplateEntry

use of com.android.tools.idea.npw.TemplateEntry in project android by JetBrains.

the class NewProjectWizardFixture method chooseActivity.

public NewProjectWizardFixture chooseActivity(@NotNull String activity) {
    JListFixture listFixture = new JListFixture(robot(), robot().finder().findByType(target(), ASGallery.class));
    listFixture.replaceCellReader((jList, index) -> {
        TemplateEntry templateEntry = ((Optional<TemplateEntry>) jList.getModel().getElementAt(index)).orElse(null);
        return templateEntry == null ? "none" : templateEntry.getTitle();
    });
    listFixture.clickItem(activity);
    return this;
}
Also used : Optional(java.util.Optional) JListFixture(org.fest.swing.fixture.JListFixture) ASGallery(com.android.tools.idea.ui.ASGallery) TemplateEntry(com.android.tools.idea.npw.TemplateEntry)

Aggregations

TemplateEntry (com.android.tools.idea.npw.TemplateEntry)1 ASGallery (com.android.tools.idea.ui.ASGallery)1 Optional (java.util.Optional)1 JListFixture (org.fest.swing.fixture.JListFixture)1