Search in sources :

Example 16 with JTreeFixture

use of org.fest.swing.fixture.JTreeFixture in project intellij-community by JetBrains.

the class SettingsTreeFixture method getTreeFixture.

public JTreeFixture getTreeFixture() {
    JTreeFixture fixture = new JTreeFixture(robot(), target());
    fixture.replaceCellReader(new SettingsTreeCellReader());
    return fixture;
}
Also used : JTreeFixture(org.fest.swing.fixture.JTreeFixture)

Example 17 with JTreeFixture

use of org.fest.swing.fixture.JTreeFixture in project ats-framework by Axway.

the class SwingTree method click.

@PublicAtsApi
public void click(int rowIndex) {
    new SwingElementState(this).waitToBecomeExisting();
    ((JTreeFixture) SwingElementLocator.findFixture(this)).clickRow(rowIndex);
}
Also used : JTreeFixture(org.fest.swing.fixture.JTreeFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 18 with JTreeFixture

use of org.fest.swing.fixture.JTreeFixture in project ats-framework by Axway.

the class SwingTree method select.

/**
     * Select tree elements by labels
     *
     * @param labels the tree element labels
     * @throws VerificationException if the tree element doesn't exist
     */
@Override
@PublicAtsApi
public void select(String... labels) {
    new SwingElementState(this).waitToBecomeExisting();
    JTreeFixture treeFixture = (JTreeFixture) SwingElementLocator.findFixture(this);
    // sometimes it is necessary
    expandTree(treeFixture, labels);
    treeFixture.selectPath(buildPath(labels));
}
Also used : JTreeFixture(org.fest.swing.fixture.JTreeFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 19 with JTreeFixture

use of org.fest.swing.fixture.JTreeFixture in project ats-framework by Axway.

the class SwingTree method rightClick.

@PublicAtsApi
public void rightClick(int rowIndex, String... contextMenuItems) {
    new SwingElementState(this).waitToBecomeExisting();
    JTreeFixture treeFixture = (JTreeFixture) SwingElementLocator.findFixture(this);
    JPopupMenuFixture popUpMenu = treeFixture.showPopupMenuAt(rowIndex);
    popUpMenu.menuItemWithPath(contextMenuItems).click();
}
Also used : JTreeFixture(org.fest.swing.fixture.JTreeFixture) JPopupMenuFixture(org.fest.swing.fixture.JPopupMenuFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 20 with JTreeFixture

use of org.fest.swing.fixture.JTreeFixture in project ats-framework by Axway.

the class SwingTree method rightClick.

@PublicAtsApi
public void rightClick(String[] path, String... contextMenuItems) {
    new SwingElementState(this).waitToBecomeExisting();
    JTreeFixture treeFixture = (JTreeFixture) SwingElementLocator.findFixture(this);
    // sometimes it is necessary
    expandTree(treeFixture, path);
    JPopupMenuFixture popUpMenu = treeFixture.showPopupMenuAt(buildPath(path));
    popUpMenu.menuItemWithPath(contextMenuItems).click();
}
Also used : JTreeFixture(org.fest.swing.fixture.JTreeFixture) JPopupMenuFixture(org.fest.swing.fixture.JPopupMenuFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

JTreeFixture (org.fest.swing.fixture.JTreeFixture)20 PublicAtsApi (com.axway.ats.common.PublicAtsApi)8 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)8 Test (org.junit.Test)5 JPopupMenuFixture (org.fest.swing.fixture.JPopupMenuFixture)4 NotNull (org.jetbrains.annotations.NotNull)4 EditorFixture (com.android.tools.idea.tests.gui.framework.fixture.EditorFixture)3 IdeFrameFixture (com.android.tools.idea.tests.gui.framework.fixture.IdeFrameFixture)3 MergedManifestFixture (com.android.tools.idea.tests.gui.framework.fixture.MergedManifestFixture)3 ImmutableList (com.google.common.collect.ImmutableList)2 JComboBoxFixture (org.fest.swing.fixture.JComboBoxFixture)2 JListFixture (org.fest.swing.fixture.JListFixture)2 JMenuItemFixture (org.fest.swing.fixture.JMenuItemFixture)2 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 SwingDriverInternal (com.axway.ats.uiengine.internal.driver.SwingDriverInternal)1 ProjectViewTree (com.intellij.ide.projectView.impl.ProjectViewTree)1