/** * Finds a {@code Dialog} by name or type. * * @param robot contains the underlying finding to delegate the search to. * @return a {@code DialogFixture} managing the found {@code Dialog}. * @throws org.assertj.swing.exception.WaitTimedOutError if a {@code Dialog} could not be found. */ @Override @Nonnull public DialogFixture using(@Nonnull Robot robot) { return new DialogFixture(robot, findComponentWith(robot)); }
@Nonnull private DialogFixture findDialog(@Nonnull ComponentMatcher matcher, @Nonnull Timeout timeout) { String description = "dialog to be found using matcher " + matcher; ComponentFoundCondition condition = new ComponentFoundCondition(description, robot().finder(), matcher); pause(condition, timeout); Dialog dialog = (Dialog) condition.found(); return new DialogFixture(robot(), checkNotNull(dialog)); }
static ConfigurationDialogPageObject setUp(Robot robot, ExportConfiguration initialConf) { ConfigurationDialog dialog = execute(() -> ConfigurationDialog.overridePanel(initialConf, "Test form", true, true)); DialogFixture fixture = new DialogFixture(robot, dialog.form); return new ConfigurationDialogPageObject(dialog, fixture); }
static RemoteServerDialogPageObject setUp(Robot robot, RemoteServer.Test serverTester) { RemoteServerDialog dialog = execute(() -> RemoteServerDialog.empty(serverTester, "Form Manager")); DialogFixture fixture = new DialogFixture(robot, dialog.form); return new RemoteServerDialogPageObject(dialog, fixture); }