use of org.fest.swing.fixture.JTableCellFixture 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;
}
use of org.fest.swing.fixture.JTableCellFixture in project android by JetBrains.
the class AvdManagerDialogFixture method editAvdWithName.
public AvdEditWizardFixture editAvdWithName(@NotNull String name) {
final TableView tableView = robot().finder().findByType(target(), TableView.class, true);
JTableFixture tableFixture = new JTableFixture(robot(), tableView);
JTableCellFixture cell = tableFixture.cell(name);
final TableCell actionCell = TableCell.row(cell.row()).column(7);
JTableCellFixture actionCellFixture = tableFixture.cell(actionCell);
execute(new GuiTask() {
@Override
protected void executeInEDT() throws Throwable {
tableView.editCellAt(actionCell.row, actionCell.column);
}
});
JPanel actionPanel = (JPanel) actionCellFixture.editor();
HyperlinkLabel editButtonLabel = robot().finder().find(actionPanel, new GenericTypeMatcher<HyperlinkLabel>(HyperlinkLabel.class) {
@Override
protected boolean isMatching(@NotNull HyperlinkLabel component) {
return "Edit this AVD".equals(component.getToolTipText());
}
});
robot().click(editButtonLabel);
return AvdEditWizardFixture.find(robot());
}
use of org.fest.swing.fixture.JTableCellFixture in project android by JetBrains.
the class ChooseDeviceDefinitionStepFixture method selectHardwareProfile.
@NotNull
public ChooseDeviceDefinitionStepFixture selectHardwareProfile(@NotNull final String deviceName) {
JTableFixture deviceListFixture = getTableFixture();
JTableCellFixture cell = deviceListFixture.cell(deviceName);
cell.select();
return this;
}
Aggregations