Search in sources :

Example 1 with MageFrame

use of mage.client.MageFrame in project mage by magefree.

the class StartMultiGamesTest method startGame.

private void startGame() throws Exception {
    frame = null;
    Thread.setDefaultUncaughtExceptionHandler((t, e) -> logger.fatal(null, e));
    SwingUtilities.invokeLater(() -> {
        synchronized (sync) {
            try {
                frame = new MageFrame();
            } catch (Throwable e) {
                Assert.fail("Can't start client app");
            }
            frame.setVisible(true);
            sync.notifyAll();
        }
    });
    synchronized (sync) {
        if (frame == null) {
            sync.wait();
        }
        ui = MageFrame.getUI();
        ui.doClick(MageComponents.TABLES_MENU_BUTTON);
        ui.doClick(MageComponents.NEW_GAME_BUTTON);
        ui.doClick(MageComponents.NEW_TABLE_OK_BUTTON, 500);
        ui.doClick(MageComponents.TABLE_WAITING_START_BUTTON);
    }
    sleep(3000);
    frame.setVisible(false);
}
Also used : MageFrame(mage.client.MageFrame)

Aggregations

MageFrame (mage.client.MageFrame)1