use of org.fest.swing.fixture.JComboBoxFixture in project android by JetBrains.
the class ThemeEditorTableFixture method getComboBoxContentsAt.
@NotNull
public List<String> getComboBoxContentsAt(@NotNull final TableCell cell) {
return GuiQuery.getNonNull(() -> {
Component renderer = rendererComponentAt(cell);
checkState(renderer instanceof JComponent, "not a %s: %s", JComponent.class.getSimpleName(), renderer);
JComboBoxFixture comboBox = new JComboBoxFixture(robot(), robot().finder().findByType((JComponent) renderer, JComboBox.class));
return ImmutableList.copyOf(comboBox.contents());
});
}
use of org.fest.swing.fixture.JComboBoxFixture in project android by JetBrains.
the class ThemeEditorTableFixture method getComboBoxSelectionAt.
@NotNull
public String getComboBoxSelectionAt(@NotNull final TableCell cell) {
return GuiQuery.getNonNull(() -> {
Component renderer = rendererComponentAt(cell);
checkState(renderer instanceof JComponent, "not a %s: %s", JComponent.class.getSimpleName(), renderer);
JComboBoxFixture comboBox = new JComboBoxFixture(robot(), robot().finder().findByType((JComponent) renderer, JComboBox.class));
return comboBox.selectedItem();
});
}
use of org.fest.swing.fixture.JComboBoxFixture in project android by JetBrains.
the class ConfigureAvdOptionsStepFixture method setFrontCamera.
@NotNull
public ConfigureAvdOptionsStepFixture setFrontCamera(@NotNull String selection) {
JComboBoxFixture frontCameraFixture = findComboBoxWithLabel("Front:");
frontCameraFixture.selectItem(selection);
return this;
}
use of org.fest.swing.fixture.JComboBoxFixture in project android by JetBrains.
the class BuildVariantsToolWindowFixture method getTestArtifactComboBox.
@NotNull
private JComboBoxFixture getTestArtifactComboBox() {
activate();
Content[] contents = myToolWindow.getContentManager().getContents();
assertThat(contents.length).isAtLeast(1);
Content content = contents[0];
JComboBox comboBox = myRobot.finder().findByType(content.getComponent(), JComboBox.class, true);
return new JComboBoxFixture(myRobot, comboBox);
}
use of org.fest.swing.fixture.JComboBoxFixture in project android by JetBrains.
the class MultiModuleThemeEditorTest method testModuleWithoutThemes.
@Test
public void testModuleWithoutThemes() throws IOException {
guiTest.importProjectAndWaitForProjectSyncToFinish("MultiAndroidModule");
final ThemeEditorFixture themeEditor = ThemeEditorGuiTestUtils.openThemeEditor(guiTest.ideFrame());
final JComboBoxFixture modulesComboBox = themeEditor.getModulesComboBox();
modulesComboBox.selectItem("app");
themeEditor.getThemesComboBox().selectItem("AppTheme");
themeEditor.waitForThemeSelection("AppTheme");
modulesComboBox.selectItem("nothemeslibrary");
guiTest.robot().waitForIdle();
final LogModel logModel = EventLog.getLogModel(guiTest.ideFrame().getProject());
for (Notification notification : logModel.getNotifications()) {
assertThat(notification.getType()).isNotEqualTo(NotificationType.ERROR);
}
}
Aggregations