Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.JButtonFixture.click()


        showWithStaticMethod(mapContent);
        mapContent.getViewport().setBounds(SMALL_WORLD);
       
        JButtonFixture button = windowFixture.toolBar().button(JMapFrame.TOOLBAR_RESET_BUTTON_NAME);
       
        button.click();
        windowFixture.robot.waitForIdle();
       
        assertTrue(mapContent.getViewport().getBounds().covers(WORLD));
    }
   
View Full Code Here


       
        showWithStaticMethod(mapContent);
       
        JButtonFixture button = windowFixture.toolBar().button(btnName);
       
        button.click();
        windowFixture.robot.waitForIdle();
       
        CursorTool cursorTool = ((JMapFrame) windowFixture.component()).getMapPane().getCursorTool();
        if (expectedToolClass == null) {
            assertNull(cursorTool);  
View Full Code Here

       
        assertNotNull(button);
       
        windowFixture.list().clickItem(JAboutDialog.Category.ALL.toString());
        windowFixture.robot.waitForIdle();
        button.click();
        windowFixture.robot.waitForIdle();
       
        Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
        String clipText = (String) clip.getData(DataFlavor.stringFlavor);
       
View Full Code Here

        createWindowFixture();
        ((DialogFixture) windowFixture).show();
       
        dialog.setExpected(et);
        JButtonFixture button = getButton(btnText);
        button.click();
       
        assertTrue(dialog.await(et, DEFAULT_TIMEOUT));
    }

View Full Code Here

      applet.menuItem("new").click();
        models.add((IChemModel)panel.getChemModel());
        applet.menuItem("pasteTemplate").click();
        DialogFixture dialog = applet.dialog("templates");
        JButtonFixture templateButton = new JButtonFixture(dialog.robot, dialog.robot.finder().find(new ButtonTextComponentMatcher("Cysteine")));
        templateButton.click();
        Assert.assertEquals(7,totalAtomCount());
        Assert.assertEquals(1,panel.getChemModel().getMoleculeSet().getAtomContainerCount());
       
        applet.menuItem("pasteTemplate").click();
        dialog = applet.dialog("templates");
View Full Code Here

        Assert.assertEquals(1,panel.getChemModel().getMoleculeSet().getAtomContainerCount());
       
        applet.menuItem("pasteTemplate").click();
        dialog = applet.dialog("templates");
        templateButton = new JButtonFixture(dialog.robot, dialog.robot.finder().find(new ButtonTextComponentMatcher("Leucine")));
        templateButton.click();
        Assert.assertEquals(16,totalAtomCount());
        Assert.assertEquals(2,panel.getChemModel().getMoleculeSet().getAtomContainerCount());

        applet.button("undo").click();
        Assert.assertEquals(7,totalAtomCount());
View Full Code Here

        JComboBox combobox = dialog.robot.finder().find(new ComboBoxTextComponentMatcher("org.openscience.jchempaint.io.JCPFileFilter"));
        combobox.setSelectedItem(combobox.getItemAt(SAVE_AS_MOL_COMBOBOX_POS));
        JTextComponentFixture text = dialog.textBox();
        text.setText(file.toString());
        JButtonFixture okbutton = new JButtonFixture(dialog.robot, dialog.robot.finder().find(new ButtonTextComponentMatcher("Save")));
        okbutton.click();
        //not the bug, but still worth testing
        MDLReader reader = new MDLReader(new FileInputStream(file));
        IAtomContainer mol = (IAtomContainer)reader.read(DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class));
        Assert.assertEquals(panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtomCount(), mol.getAtomCount());
        Assert.assertEquals(panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBondCount(), mol.getBondCount());
View Full Code Here

        file=new File(System.getProperty("java.io.tmpdir")+File.separator+"test2.mol");
        if(file.exists())
            file.delete();
        text.setText(file.toString());
        okbutton = new JButtonFixture(dialog.robot, dialog.robot.finder().find(new ButtonTextComponentMatcher("Save")));
        okbutton.click();
        //not the bug, but still worth testing
        reader = new MDLReader(new FileInputStream(file));
        mol = (IAtomContainer)reader.read(DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class));
        Assert.assertEquals(panel.getChemModel().getMoleculeSet().getAtomContainer(0).getAtomCount(), mol.getAtomCount());
        Assert.assertEquals(panel.getChemModel().getMoleculeSet().getAtomContainer(0).getBondCount(), mol.getBondCount());
View Full Code Here

        applet.menuItem("open").click();
        dialog = applet.dialog();
        text = dialog.textBox();
        text.setText(file.toString());
        okbutton = new JButtonFixture(dialog.robot, dialog.robot.finder().find(new ButtonTextComponentMatcher("Open")));
        okbutton.click();
        //"save as" mol1
        file.delete();
        applet.menuItem("saveAs").click();
        dialog = applet.dialog();
        combobox = dialog.robot.finder().find(new ComboBoxTextComponentMatcher("org.openscience.jchempaint.io.JCPFileFilter"));
View Full Code Here

        combobox = dialog.robot.finder().find(new ComboBoxTextComponentMatcher("org.openscience.jchempaint.io.JCPFileFilter"));
        combobox.setSelectedItem(combobox.getItemAt(SAVE_AS_MOL_COMBOBOX_POS));
        text = dialog.textBox();
        text.setText(file.toString());
        okbutton = new JButtonFixture(dialog.robot, dialog.robot.finder().find(new ButtonTextComponentMatcher("Save")));
        okbutton.click();
        //open mol2
        file=new File(System.getProperty("java.io.tmpdir")+File.separator+"test2.mol");
        applet.menuItem("open").click();
        dialog = applet.dialog();
        text = dialog.textBox();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.