Search in sources :

Example 16 with JTabbedPaneFixture

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

the class LinkUnlinkTest method linkTreesAndClocksAndDeleteTest.

@Test
public void linkTreesAndClocksAndDeleteTest() 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(0, 1, 2);
    warning("Link trees");
    f.selectTab("Partitions");
    beautiFrame.button("Link Trees").click();
    printBeautiState(f);
    warning("Link clocks");
    selectRows(0, 1, 2);
    f.selectTab("Partitions");
    beautiFrame.button("Link Clock Models").click();
    printBeautiState(f);
    warning("Delete second partition");
    f.selectTab("Partitions");
    selectRows(1);
    beautiFrame.button("-").click();
    printBeautiState(f);
    warning("Delete first partition");
    f.selectTab("Partitions");
    selectRows(0, 1);
    beautiFrame.button("Link Clock Models").click();
    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 17 with JTabbedPaneFixture

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

the class LinkUnlinkTest method linkSiteModelssAndDeleteTest.

@Test
public void linkSiteModelssAndDeleteTest() 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 Site Models").click();
    printBeautiState(f);
    warning("Delete second partition");
    f.selectTab("Partitions");
    selectRows(1);
    beautiFrame.button("-").click();
    printBeautiState(f);
    assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26", "YuleModel.t:59", "ClockPrior.c:59", "YuleBirthRatePrior.t:59");
    JTableFixture t = beautiFrame.table();
    Assertions.assertThat(t.target.getRowCount()).isEqualTo(2);
    makeSureXMLParses();
}
Also used : JTableFixture(org.fest.swing.fixture.JTableFixture) File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 18 with JTabbedPaneFixture

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

the class LinkUnlinkTest method linkClocksAndDeleteTest.

@Test
public void linkClocksAndDeleteTest() 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();
    printBeautiState(f);
    warning("Delete second partition");
    f.selectTab("Partitions");
    selectRows(1);
    beautiFrame.button("-").click();
    printBeautiState(f);
    assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26", "YuleModel.t:59", "YuleBirthRatePrior.t:59");
    JTableFixture t = beautiFrame.table();
    Assertions.assertThat(t.target.getRowCount()).isEqualTo(2);
    makeSureXMLParses();
}
Also used : JTableFixture(org.fest.swing.fixture.JTableFixture) File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 19 with JTabbedPaneFixture

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

the class LinkUnlinkTest method simpleLinkUnlinkThreeAlignmentsTest.

@Test
public void simpleLinkUnlinkThreeAlignmentsTest() 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(0, 1, 2);
    warning("Link site models");
    f.selectTab("Partitions");
    beautiFrame.button("Link Site Models").click();
    printBeautiState(f);
    warning("Unlink site models");
    f.selectTab("Partitions");
    beautiFrame.button("Unlink Site Models").click();
    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");
    warning("Link clock models");
    f.selectTab("Partitions");
    beautiFrame.button("Link Clock Models").click();
    printBeautiState(f);
    warning("Unlink clock models");
    f.selectTab("Partitions");
    beautiFrame.button("Unlink Clock Models").click();
    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");
    warning("Link trees");
    f.selectTab("Partitions");
    beautiFrame.button("Link Trees").click();
    printBeautiState(f);
    warning("Unlink trees");
    f.selectTab("Partitions");
    beautiFrame.button("Unlink Trees").click();
    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");
    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");
    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");
    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");
    makeSureXMLParses();
}
Also used : File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 20 with JTabbedPaneFixture

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

the class LinkUnlinkTest method linkClocksSitesTreesAndDeleteTest.

@Test
public void linkClocksSitesTreesAndDeleteTest() 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();
    warning("Link site models");
    f.selectTab("Partitions");
    beautiFrame.button("Link Site Models").click();
    printBeautiState(f);
    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(2);
    makeSureXMLParses();
}
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