use of org.fest.swing.fixture.JPopupMenuFixture 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();
}
use of org.fest.swing.fixture.JPopupMenuFixture 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();
}
use of org.fest.swing.fixture.JPopupMenuFixture in project android by JetBrains.
the class ManifestEditorTest method testRemoveFromManifest.
@Test
public void testRemoveFromManifest() throws IOException {
guiTest.importMultiModule();
IdeFrameFixture projectFrame = guiTest.ideFrame();
EditorFixture editor = projectFrame.getEditor();
editor.open("app/src/main/AndroidManifest.xml");
String addedText = " <activity\n" + " android:name=\"com.android.mylibrary.MainActivity\"\n" + " tools:remove=\"android:label\" />\n";
assertThat(editor.getCurrentFileContents()).doesNotContain(addedText);
editor.selectEditorTab(EditorFixture.Tab.MERGED_MANIFEST);
MergedManifestFixture mergedManifestFixture = editor.getMergedManifestEditor();
JTreeFixture tree = mergedManifestFixture.getTree();
// row 28 = "manifest/application/activity/android:name = com.android.mylibrary.MainActivity"
JPopupMenuFixture popup = tree.showPopupMenuAt(22);
popup.menuItemWithPath("Remove").click();
editor.selectEditorTab(EditorFixture.Tab.EDITOR);
assertThat(editor.getCurrentFileContents()).contains(addedText);
}
use of org.fest.swing.fixture.JPopupMenuFixture in project android by JetBrains.
the class AvdManagerDialogFixture method deleteAvd.
public AvdManagerDialogFixture deleteAvd(String name) {
TableView tableView = robot().finder().findByType(target(), TableView.class, true);
JTableFixture tableFixture = new JTableFixture(robot(), tableView);
JTableCellFixture cell = tableFixture.cell(name);
cell.click(RIGHT_BUTTON);
JPopupMenuFixture contextMenuFixture = new JPopupMenuFixture(robot(), robot().findActivePopupMenu());
contextMenuFixture.menuItemWithPath("Delete").click();
MessagesFixture.findByTitle(robot(), "Confirm Deletion").clickYes();
return this;
}
Aggregations