Search in sources :

Example 6 with JTabbedPaneFixture

use of org.fest.swing.fixture.JTabbedPaneFixture in project beast2 by CompEvol.

the class LinkUnlinkTest method linkTreesAndDeleteTest2a.

@Test
public void linkTreesAndDeleteTest2a() throws Exception {
    warning("Load gopher data 26.nex, 47.nex");
    importAlignment("examples/nexus", new File("26.nex"), new File("47.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    printBeautiState(f);
    selectRows(0, 1);
    warning("Link trees");
    f.selectTab("Partitions");
    beautiFrame.button("Link Trees").click();
    printBeautiState(f);
    warning("Delete second partition");
    f.selectTab("Partitions");
    selectRows(1);
    beautiFrame.button("-").click();
    printBeautiState(f);
    assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26");
    makeSureXMLParses();
}
Also used : File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 7 with JTabbedPaneFixture

use of org.fest.swing.fixture.JTabbedPaneFixture in project beast2 by CompEvol.

the class LinkUnlinkTest method linkTreesAndDeleteTest3.

@Test
public void linkTreesAndDeleteTest3() throws Exception {
    warning("Load gopher data 26.nex, 47.nex, 59.nex");
    importAlignment("examples/nexus", new File("26.nex"), new File("47.nex"), new File("59.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    printBeautiState(f);
    assertStateEquals("Tree.t:26", "birthRate.t:26", "Tree.t:47", "clockRate.c:47", "birthRate.t:47", "Tree.t:59", "clockRate.c:59", "birthRate.t:59");
    assertOperatorsEqual("YuleBirthRateScaler.t:26", "YuleModelTreeScaler.t:26", "YuleModelTreeRootScaler.t:26", "YuleModelUniformOperator.t:26", "YuleModelSubtreeSlide.t:26", "YuleModelNarrow.t:26", "YuleModelWide.t:26", "YuleModelWilsonBalding.t:26", "StrictClockRateScaler.c:47", "YuleBirthRateScaler.t:47", "YuleModelTreeScaler.t:47", "YuleModelTreeRootScaler.t:47", "YuleModelUniformOperator.t:47", "YuleModelSubtreeSlide.t:47", "YuleModelNarrow.t:47", "YuleModelWide.t:47", "YuleModelWilsonBalding.t:47", "strictClockUpDownOperator.c:47", "StrictClockRateScaler.c:59", "YuleBirthRateScaler.t:59", "YuleModelTreeScaler.t:59", "YuleModelTreeRootScaler.t:59", "YuleModelUniformOperator.t:59", "YuleModelSubtreeSlide.t:59", "YuleModelNarrow.t:59", "YuleModelWide.t:59", "YuleModelWilsonBalding.t:59", "strictClockUpDownOperator.c:59");
    assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26", "YuleModel.t:47", "ClockPrior.c:47", "YuleBirthRatePrior.t:47", "YuleModel.t:59", "ClockPrior.c:59", "YuleBirthRatePrior.t:59");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.26", "TreeHeight.t:26", "YuleModel.t:26", "birthRate.t:26", "treeLikelihood.47", "TreeHeight.t:47", "clockRate.c:47", "YuleModel.t:47", "birthRate.t:47", "treeLikelihood.59", "TreeHeight.t:59", "clockRate.c:59", "YuleModel.t:59", "birthRate.t:59");
    selectRows(2, 1, 0);
    warning("Link trees");
    f.selectTab("Partitions");
    beautiFrame.button("Link Trees").click();
    printBeautiState(f);
    assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26", "ClockPrior.c:47", "ClockPrior.c:59");
    makeSureXMLParses();
    warning("Delete second partition (47)");
    f.selectTab("Partitions");
    selectRows(1);
    beautiFrame.button("-").click();
    printBeautiState(f);
    assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26", "ClockPrior.c:59");
    makeSureXMLParses();
    warning("Delete first partition (26)");
    f.selectTab("Partitions");
    selectRows(0);
    beautiFrame.button("-").click();
    printBeautiState(f);
    assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26");
    makeSureXMLParses();
}
Also used : File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 8 with JTabbedPaneFixture

use of org.fest.swing.fixture.JTabbedPaneFixture in project beast2 by CompEvol.

the class LinkUnlinkTest method starBeastLinkTreesAndDeleteTest.

// issue #413
@Test
public void starBeastLinkTreesAndDeleteTest() throws Exception {
    warning("Select StarBeast template");
    beautiFrame.menuItemWithPath("File", "Template", "StarBeast").click();
    warning("Load gopher data 26.nex, 47.nex");
    importAlignment("examples/nexus", new File("26.nex"), new File("47.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    printBeautiState(f);
    selectRows(0, 1);
    warning("Link trees");
    f.selectTab("Partitions");
    beautiFrame.button("Link Trees").click();
    printBeautiState(f);
    warning("Delete second partition");
    f.selectTab("Partitions");
    selectRows(1);
    beautiFrame.button("-").click();
    printBeautiState(f);
    // assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26");
    JTableFixture t = beautiFrame.table();
    Assertions.assertThat(t.target.getRowCount()).isEqualTo(1);
// does not parse unless taxon set is specified
// makeSureXMLParses();
}
Also used : JTableFixture(org.fest.swing.fixture.JTableFixture) File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 9 with JTabbedPaneFixture

use of org.fest.swing.fixture.JTabbedPaneFixture in project beast2 by CompEvol.

the class LinkUnlinkTest method linkUnlinkTreesAndSetTreePriorTest1.

@Test
public void linkUnlinkTreesAndSetTreePriorTest1() throws Exception {
    warning("Load gopher data 26.nex, 47.nex");
    importAlignment("examples/nexus", new File("26.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    printBeautiState(f);
    f.selectTab("Priors");
    warning("Change to Coalescent - constant population");
    beautiFrame.comboBox("TreeDistribution").selectItem("Coalescent Constant Population");
    assertPriorsEqual("CoalescentConstant.t:26", "PopSizePrior.t:26");
    importAlignment("examples/nexus", new File("47.nex"));
    warning("Link trees");
    f.selectTab("Partitions");
    selectRows(1, 0);
    beautiFrame.button("Link Trees").click();
    printBeautiState(f);
    assertPriorsEqual("CoalescentConstant.t:26", "ClockPrior.c:47", "PopSizePrior.t:26");
    warning("Unlink trees");
    beautiFrame.button("Unlink Trees").click();
    // should have PopSizePrior.t:47 as well?
    assertPriorsEqual("CoalescentConstant.t:26", "CoalescentConstant.t:47", "ClockPrior.c:47", "PopSizePrior.t:26", "PopSizePrior.t:47");
    // warning("Delete partition");
    // f.selectTab("Partitions");
    // selectRows(1);
    // beautiFrame.button("-").click();
    // printBeautiState(f);
    // assertPriorsEqual("CoalescentConstant.t:26", "PopSizePrior.t:26");
    warning("Delete partition");
    f.selectTab("Partitions");
    selectRows(0);
    beautiFrame.button("-").click();
    printBeautiState(f);
    assertPriorsEqual("CoalescentConstant.t:47", "PopSizePrior.t:47");
    makeSureXMLParses();
}
Also used : File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 10 with JTabbedPaneFixture

use of org.fest.swing.fixture.JTabbedPaneFixture in project beast2 by CompEvol.

the class LinkUnlinkTest method linkClocksDeleteAllTest.

// issue #414
@Test
public void linkClocksDeleteAllTest() throws Exception {
    warning("Load gopher data 26.nex, 47.nex, 59.nex");
    importAlignment("examples/nexus", new File("26.nex"), new File("47.nex"), new File("59.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    printBeautiState(f);
    selectRows(0, 1, 2);
    warning("Link clocks");
    f.selectTab("Partitions");
    beautiFrame.button("Link Clock Models").click();
    beautiFrame.button("-").click();
    JTableFixture t = beautiFrame.table();
    Assertions.assertThat(t.target.getRowCount()).isEqualTo(0);
}
Also used : JTableFixture(org.fest.swing.fixture.JTableFixture) File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Aggregations

JTabbedPaneFixture (org.fest.swing.fixture.JTabbedPaneFixture)27 File (java.io.File)23 Test (org.junit.Test)23 JTableFixture (org.fest.swing.fixture.JTableFixture)8 JComboBoxFixture (org.fest.swing.fixture.JComboBoxFixture)5 DeltaExchangeOperator (beast.evolution.operators.DeltaExchangeOperator)2 PublicAtsApi (com.axway.ats.common.PublicAtsApi)2 UiElementException (com.axway.ats.uiengine.exceptions.UiElementException)2 VerificationException (com.axway.ats.uiengine.exceptions.VerificationException)2 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)2 Component (java.awt.Component)2 JButtonFixture (org.fest.swing.fixture.JButtonFixture)2 JCheckBoxFixture (org.fest.swing.fixture.JCheckBoxFixture)2 JListFixture (org.fest.swing.fixture.JListFixture)2 JMenuItemFixture (org.fest.swing.fixture.JMenuItemFixture)2 JTextComponentFixture (org.fest.swing.fixture.JTextComponentFixture)2 UiElementProperties (com.axway.ats.uiengine.elements.UiElementProperties)1 ElementNotFoundException (com.axway.ats.uiengine.exceptions.ElementNotFoundException)1 SwingDriverInternal (com.axway.ats.uiengine.internal.driver.SwingDriverInternal)1 Dimension (java.awt.Dimension)1