use of org.fest.swing.fixture.JTreeFixture in project intellij-community by JetBrains.
the class RunConfigurationsDialogFixture method getTreeFixture.
public JTreeFixture getTreeFixture() {
Tree tree = robot().finder().findByType(target(), Tree.class, true);
JTreeFixture fixture = new JTreeFixture(robot(), tree);
fixture.replaceCellReader(new RunConfigurationsJTreeCellReader());
return fixture;
}
use of org.fest.swing.fixture.JTreeFixture in project android by JetBrains.
the class IdeSettingsDialogFixture method selectSdkPage.
@NotNull
public IdeSettingsDialogFixture selectSdkPage() {
JPanel optionsEditor = field("myEditor").ofType(JPanel.class).in(getDialogWrapper()).get();
List<JComponent> trees = findComponentsOfType(optionsEditor, "com.intellij.openapi.options.newEditor.SettingsTreeView");
JComponent tree = Iterables.getOnlyElement(trees);
JTree jTree = field("myTree").ofType(JTree.class).in(tree).get();
JTreeFixture jTreeFixture = new JTreeFixture(robot(), jTree);
jTreeFixture.replaceCellReader(TREE_NODE_CELL_READER);
// It takes a few seconds to load the whole tree.
Wait.seconds(5).expecting("The desired path is loaded").until(() -> {
try {
jTreeFixture.selectPath("Appearance & Behavior/System Settings/Android SDK");
return true;
} catch (LocationUnavailableException e) {
return false;
}
});
return this;
}
use of org.fest.swing.fixture.JTreeFixture in project android by JetBrains.
the class ProjectViewFixture method showPropertiesForLibrary.
@NotNull
public LibraryPropertiesDialogFixture showPropertiesForLibrary(@NotNull String libraryName) {
selectProjectPane();
new JTreeFixture(myRobot, GuiTests.waitUntilShowing(myRobot, Matchers.byType(ProjectViewTree.class))).clickPath("External Libraries/" + libraryName, MouseButton.RIGHT_BUTTON);
new JMenuItemFixture(myRobot, GuiTests.waitUntilShowing(myRobot, Matchers.byText(JMenuItem.class, "Library Properties..."))).click();
return LibraryPropertiesDialogFixture.find(myRobot, libraryName, myProject);
}
use of org.fest.swing.fixture.JTreeFixture in project android by JetBrains.
the class ThemeConfigurationTest method testThemesWithConfiguration.
/**
* Tests that the theme editor deals well with themes defined only in certain configurations
*/
@Test
public void testThemesWithConfiguration() throws IOException {
guiTest.importSimpleApplication();
ThemeEditorFixture themeEditor = ThemeEditorGuiTestUtils.openThemeEditor(guiTest.ideFrame());
JComboBoxFixture themesComboBox = themeEditor.getThemesComboBox();
themesComboBox.selectItem("Create New Theme");
NewStyleDialogFixture newStyleDialog = NewStyleDialogFixture.find(guiTest.robot());
JComboBoxFixture parentComboBox = newStyleDialog.getParentComboBox();
parentComboBox.selectItem("Show all themes");
ThemeSelectionDialogFixture themeSelectionDialog = ThemeSelectionDialogFixture.find(guiTest.robot());
final JTreeFixture categoriesTree = themeSelectionDialog.getCategoriesTree();
JListFixture themeList = themeSelectionDialog.getThemeList();
categoriesTree.clickPath("Material Dark");
guiTest.robot().waitForIdle();
themeList.clickItem("android:Theme.Material");
themeSelectionDialog.clickOk();
parentComboBox.requireSelection("android:Theme.Material");
JTextComponentFixture newNameTextField = newStyleDialog.getNewNameTextField();
newNameTextField.click();
newNameTextField.deleteText();
newNameTextField.enterText("MyMaterialTheme");
newStyleDialog.clickOk();
themeEditor.waitForThemeSelection("MyMaterialTheme");
AndroidThemePreviewPanelFixture themePreviewPanel = themeEditor.getPreviewComponent().getThemePreviewPanel();
themePreviewPanel.requirePreviewPanel();
JButton apiButton = themeEditor.findToolbarButton("API Version in Editor");
guiTest.robot().click(apiButton);
clickPopupMenuItem("API 19", "19", apiButton, guiTest.robot());
themePreviewPanel.requireErrorPanel();
themesComboBox.selectItem("AppTheme");
themePreviewPanel.requirePreviewPanel();
themesComboBox.selectItem("MyMaterialTheme");
themePreviewPanel.requireErrorPanel();
}
use of org.fest.swing.fixture.JTreeFixture in project ats-framework by Axway.
the class SwingTree method select.
/**
* Select tree element by index
*
* @param rowIndex tree element index to select
* @throws VerificationException if the tree element doesn't exist
*/
@Override
@PublicAtsApi
public void select(int rowIndex) {
new SwingElementState(this).waitToBecomeExisting();
((JTreeFixture) SwingElementLocator.findFixture(this)).selectRow(rowIndex);
}
Aggregations