Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.FrameFixture


     * @throws Exception
     */
    //@Test
    public void scratchTestFEST() throws Exception {

        FrameFixture frame = new FrameFixture(IGV.getMainFrame());
        JPanelFixture contentFixture = frame.panel("contentPane");

        JPanelFixture commandBar = frame.panel("igvCommandBar");
        JComboBoxFixture chromoBox = frame.comboBox("chromosomeComboBox");

        String[] chromos = commandBar.comboBox("chromosomeComboBox").contents();
        Assert.assertEquals(26, chromos.length);
    }
View Full Code Here


 
  @Before
  public void setUp() {

    ThoFuUi.gui = null;
    gui = new FrameFixture(ThoFuUi.instance());
    gui.show();
  }
View Full Code Here

    public static void startSoapUI() {
        application(SoapUI.class).start();
    }

    public static FrameFixture getMainWindow(Robot robot) {
        FrameFixture rootWindow = frameWithTitle(MAIN_WINDOW_TITLE).withTimeout(MAIN_WINDOW_TIMEOUT).using(robot);
        rootWindow.show();
        rootWindow.maximize();
        return rootWindow;
    }
View Full Code Here

    }

    @After
    public void closeSoapUIIfRunning() {
        try {
            FrameFixture mainWindow = getMainWindow(robot);
            if (mainWindow != null) {
                closeApplicationWithoutSaving(mainWindow, robot);
            }
        } catch (Exception e) {
            //Most probably SoapUI is not running.
View Full Code Here

            Object source = event.getSource();
            if (windowClass.isAssignableFrom(source.getClass())
                    && event.getID() == WindowEvent.WINDOW_ACTIVATED) {

                if (source instanceof Frame) {
                    fixture = new FrameFixture((Frame) source);
                } else if (source instanceof Dialog) {
                    fixture = new DialogFixture((Dialog) source);
                }

                latch.countDown();
View Full Code Here

            protected TestFrame executeInEDT() throws Throwable {
                return new TestFrame(listener);
            }
        });
       
        window = new FrameFixture(frame);
    }
View Full Code Here

            }
        });
       
        listener = new WaitingMapPaneListener();
        mapPane.addMapPaneListener(listener);
        windowFixture = new FrameFixture(frame);
        mapPaneFixture = new JPanelFixture(windowFixture.robot, mapPane);
        listener.setExpected(MapPaneEvent.Type.RENDERING_STOPPED);
        ((FrameFixture) windowFixture).show();
        assertTrue(listener.await(MapPaneEvent.Type.RENDERING_STOPPED, ZoomInToolTest.RENDERING_TIMEOUT));
    }
View Full Code Here

                frame.pack();
                return frame;
            }
        });
       
        windowFixture = new FrameFixture(frame);
        ((FrameFixture) windowFixture).show();
    }
View Full Code Here

                TestFrame frame = new TestFrame(mapPane);
                return frame;
            }
        });
       
        windowFixture = new FrameFixture(frame);
        ((FrameFixture) windowFixture).show(new Dimension(WIDTH, HEIGHT));
    }
View Full Code Here

                frame.pack();
                return frame;
            }
        });
       
        FrameFixture fixture = new FrameFixture(frame);
        Insets insets = frame.getInsets();
        fixture.show();
       
        JLabelFixture lf = fixture.label("TheLabel");
        Point pos = lf.component().getLocationOnScreen();
        Dimension size = lf.component().getSize();
       
        Robot robot = new Robot();
        BufferedImage img = robot.createScreenCapture(new Rectangle(pos, dim));
        fixture.close();
       
        if (displayLabelImage) {
            CountDownLatch latch = TestImageFrame.showImage(img, "Label screen shot");
            latch.await();
        }

        // Search for the red-ish start dot
        int[] lower = new int[] {200, 0, 0};
        int[] upper = new int[] {255, 80, 80};
        Rectangle bounds = new Rectangle(img.getMinX(), img.getMinY(), 20, 20);
        assertTrue( findColorInRange(img, bounds, lower, upper) );
       
        // Search for the blue-ish end dot
        lower = new int[] {0, 0, 200};
        upper = new int[] {80, 80, 255};
        bounds = new Rectangle(
                img.getMinX(), img.getMinY() + img.getHeight() - 20,
                img.getWidth(), 20);
        assertTrue( findColorInRange(img, bounds, lower, upper));
       
        fixture.cleanUp();
    }
View Full Code Here

TOP

Related Classes of org.fest.swing.fixture.FrameFixture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.