Search in sources :

Example 11 with JTabbedPaneFixture

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

the class BeautiBase method onSetUp.

@Override
protected void onSetUp() {
    beautiFrame = new FrameFixture(robot(), createNewEditor());
    beautiFrame.show();
    beautiFrame.resizeTo(new Dimension(1224, 786));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    beauti = (Beauti) f.target;
    doc = beauti.doc;
}
Also used : FrameFixture(org.fest.swing.fixture.FrameFixture) Dimension(java.awt.Dimension) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture)

Example 12 with JTabbedPaneFixture

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

the class BeautiStarBeastTest method simpleStarBeastTest.

@Test
public void simpleStarBeastTest() throws Exception {
    ScreenshotTaker screenshotTaker = new ScreenshotTaker();
    beauti.frame.setSize(1024, 640);
    String BASE_DIR = PREFIX.substring(0, PREFIX.lastIndexOf('/'));
    for (File file : new File(BASE_DIR).listFiles()) {
        if (file.getAbsolutePath().contains(PREFIX) && file.getName().endsWith(".png")) {
            file.delete();
        }
    }
    // create screen-shot showing template menu item
    warning("Select StarBeast template");
    beautiFrame.menuItemWithPath("File", "Template").click();
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "selectTemplate.png");
    JMenuItemFixture templateMenu = beautiFrame.menuItemWithPath("File", "Template", "StarBeast");
    templateMenu.click();
    // remove menu from screen
    beautiFrame.menuItemWithPath("File").click();
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    f = f.selectTab("Priors");
    // 1. Load gopher data 26.nex, 29.nex, 47.nex
    warning("1. Load gopher data 26.nex, 29.nex, 47.nex");
    importAlignment("examples/nexus", new File("26.nex"), new File("29.nex"), new File("47.nex"));
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "DataPartitions.png");
    printBeautiState(f);
    // 2. Define Taxon sets
    warning("2. Define taxon sets");
    f.selectTab("Taxon sets");
    beautiFrame.button("Guess").click();
    JOptionPaneFixture dialog = new JOptionPaneFixture(robot());
    // DialogFixture dialog = WindowFinder.findDialog("GuessTaxonSets").using(robot());
    dialog.radioButton("split on character").click();
    dialog.comboBox("splitCombo").selectItem("2");
    dialog.textBox("SplitChar2").deleteText().enterText("_");
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "Guess_Taxonsets.png");
    // JButton okButton = dialog.robot.finder().find(JButtonMatcher.withText("OK"));
    // new JButtonFixture(dialog.robot, okButton).click();
    dialog.okButton().click();
    printBeautiState(f);
    // 3. Set site model to HKY + empirical frequencies
    warning("3. Set site model to HKY + empirical frequencies");
    f.selectTab("Site Model");
    for (int i = 0; i < 3; i++) {
        beautiFrame.list().selectItem(i);
        beautiFrame.comboBox("substModel").selectItem("HKY");
        JComboBoxFixture freqs = beautiFrame.comboBox("frequencies");
        freqs.selectItem("Empirical");
    // beautiFrame.checkBox("mutationRate.isEstimated").check();
    }
    // JCheckBoxFixture fixMeanMutationRate = beautiFrame.checkBox("FixMeanMutationRate");
    // fixMeanMutationRate.check();
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "Site_Model.png");
    printBeautiState(f);
    // 4. Inspect clock models
    warning("4. Inspect clock models");
    f.selectTab("Clock Model");
    beautiFrame.list().selectItem(0);
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "ClockModel1.png");
    beautiFrame.list().selectItem(1);
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "ClockModel2.png");
    beautiFrame.list().selectItem(2);
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "ClockModel3.png");
    // 5. Inspect multispecies coalescent
    warning("5. Inspect multispecies coalescent");
    f.selectTab("Multi Species Coalescent");
    beautiFrame.button("treePrior.t:26.editButton").click();
    beautiFrame.button("treePrior.t:29.editButton").click();
    beautiFrame.button("treePrior.t:47.editButton").click();
    beautiFrame.comboBox().selectItem("linear_with_constant_root");
    beautiFrame.button("treePrior.t:26.editButton").click();
    beautiFrame.button("treePrior.t:29.editButton").click();
    beautiFrame.button("treePrior.t:47.editButton").click();
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "MSP.png");
    // 6. Set up MCMC parameters
    warning("6. Set up MCMC parameters");
    f = f.selectTab("MCMC");
    beautiFrame.textBox("chainLength").selectAll().setText("5000000");
    beautiFrame.button("speciesTreeLogger.editButton").click();
    beautiFrame.textBox("logEvery").selectAll().setText("1000");
    beautiFrame.button("speciesTreeLogger.editButton").click();
    beautiFrame.button("screenlog.editButton").click();
    beautiFrame.textBox("logEvery").selectAll().setText("10000");
    beautiFrame.button("speciesTreeLogger.editButton").click();
    screenshotTaker.saveComponentAsPng(beauti.frame, PREFIX + "MCMC.png");
    makeSureXMLParses();
}
Also used : JComboBoxFixture(org.fest.swing.fixture.JComboBoxFixture) ScreenshotTaker(org.fest.swing.image.ScreenshotTaker) JMenuItemFixture(org.fest.swing.fixture.JMenuItemFixture) File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) JOptionPaneFixture(org.fest.swing.fixture.JOptionPaneFixture) Test(org.junit.Test)

Example 13 with JTabbedPaneFixture

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

the class SimpleClockModelTest method simpleClockModelTest.

/**
 * check the standard clock models are there and result in correct behaviour *
 */
@Test
public void simpleClockModelTest() throws Exception {
    warning("Load anolis.nex");
    importAlignment("examples/nexus", new File("anolis.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    f.selectTab("Clock Model");
    warning("Change to Relaxed Clock - exponential");
    beautiFrame.comboBox().selectItem("Relaxed Clock Exponential");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "birthRate.t:anolis", "expRateCategories.c:anolis");
    assertOperatorsEqual("YuleBirthRateScaler.t:anolis", "YuleModelTreeScaler.t:anolis", "YuleModelTreeRootScaler.t:anolis", "YuleModelUniformOperator.t:anolis", "YuleModelSubtreeSlide.t:anolis", "YuleModelNarrow.t:anolis", "YuleModelWide.t:anolis", "YuleModelWilsonBalding.t:anolis", "ExpCategoriesRandomWalk.c:anolis", "ExpCategoriesSwapOperator.c:anolis", "ExpCategoriesUniform.c:anolis");
    assertPriorsEqual("YuleModel.t:anolis", "YuleBirthRatePrior.t:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "YuleModel.t:anolis", "birthRate.t:anolis", "rateStat.c:anolis");
    warning("Change to Relaxed Clock - log normal");
    beautiFrame.comboBox().selectItem("Relaxed Clock Log Normal");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "birthRate.t:anolis", "ucldStdev.c:anolis", "rateCategories.c:anolis");
    assertOperatorsEqual("YuleBirthRateScaler.t:anolis", "YuleModelTreeScaler.t:anolis", "YuleModelTreeRootScaler.t:anolis", "YuleModelUniformOperator.t:anolis", "YuleModelSubtreeSlide.t:anolis", "YuleModelNarrow.t:anolis", "YuleModelWide.t:anolis", "YuleModelWilsonBalding.t:anolis", "ucldStdevScaler.c:anolis", "CategoriesRandomWalk.c:anolis", "CategoriesSwapOperator.c:anolis", "CategoriesUniform.c:anolis");
    assertPriorsEqual("YuleModel.t:anolis", "YuleBirthRatePrior.t:anolis", "ucldStdevPrior.c:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "YuleModel.t:anolis", "birthRate.t:anolis", "ucldStdev.c:anolis", "rate.c:anolis");
    warning("Change to Random Local Clock");
    beautiFrame.comboBox().selectItem("Random Local Clock");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "birthRate.t:anolis", "Indicators.c:anolis", "clockrates.c:anolis");
    assertOperatorsEqual("YuleBirthRateScaler.t:anolis", "YuleModelTreeScaler.t:anolis", "YuleModelTreeRootScaler.t:anolis", "YuleModelUniformOperator.t:anolis", "YuleModelSubtreeSlide.t:anolis", "YuleModelNarrow.t:anolis", "YuleModelWide.t:anolis", "YuleModelWilsonBalding.t:anolis", "IndicatorsBitFlip.c:anolis", "ClockRateScaler.c:anolis");
    assertPriorsEqual("YuleModel.t:anolis", "YuleBirthRatePrior.t:anolis", "RRatesPrior.c:sanolis", "RRateChangesPrior.c:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "YuleModel.t:anolis", "birthRate.t:anolis", "Indicators.c:anolis", "clockrates.c:anolis", "RRateChanges.c:anolis");
    warning("Change to Strickt Clock");
    beautiFrame.comboBox().selectItem("Strict Clock");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "birthRate.t:anolis");
    assertOperatorsEqual("YuleBirthRateScaler.t:anolis", "YuleModelTreeScaler.t:anolis", "YuleModelTreeRootScaler.t:anolis", "YuleModelUniformOperator.t:anolis", "YuleModelSubtreeSlide.t:anolis", "YuleModelNarrow.t:anolis", "YuleModelWide.t:anolis", "YuleModelWilsonBalding.t:anolis");
    assertPriorsEqual("YuleModel.t:anolis", "YuleBirthRatePrior.t:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "YuleModel.t:anolis", "birthRate.t:anolis");
    makeSureXMLParses();
}
Also used : File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 14 with JTabbedPaneFixture

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

the class SimpleClockModelTest method simpleClockModelTest2.

/**
 * switch to coalescent tree prior, then
 * check the standard clock models are there and result in correct behaviour *
 */
@Test
public void simpleClockModelTest2() throws Exception {
    warning("Load anolis.nex");
    importAlignment("examples/nexus", new File("anolis.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    f.selectTab("Priors");
    warning("Change to Coalescent - constant population");
    beautiFrame.comboBox("TreeDistribution").selectItem("Coalescent Constant Population");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "popSize.t:anolis");
    assertOperatorsEqual("CoalescentConstantTreeScaler.t:anolis", "CoalescentConstantTreeRootScaler.t:anolis", "CoalescentConstantUniformOperator.t:anolis", "CoalescentConstantSubtreeSlide.t:anolis", "CoalescentConstantNarrow.t:anolis", "CoalescentConstantWide.t:anolis", "CoalescentConstantWilsonBalding.t:anolis", "PopSizeScaler.t:anolis");
    assertPriorsEqual("CoalescentConstant.t:anolis", "PopSizePrior.t:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "popSize.t:anolis", "CoalescentConstant.t:anolis");
    f.selectTab("Clock Model");
    warning("Change to Relaxed Clock - exponential");
    beautiFrame.comboBox().selectItem("Relaxed Clock Exponential");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "popSize.t:anolis", "expRateCategories.c:anolis");
    assertOperatorsEqual("CoalescentConstantTreeScaler.t:anolis", "CoalescentConstantTreeRootScaler.t:anolis", "CoalescentConstantUniformOperator.t:anolis", "CoalescentConstantSubtreeSlide.t:anolis", "CoalescentConstantNarrow.t:anolis", "CoalescentConstantWide.t:anolis", "CoalescentConstantWilsonBalding.t:anolis", "PopSizeScaler.t:anolis", "ExpCategoriesRandomWalk.c:anolis", "ExpCategoriesSwapOperator.c:anolis", "ExpCategoriesUniform.c:anolis");
    assertPriorsEqual("CoalescentConstant.t:anolis", "PopSizePrior.t:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "popSize.t:anolis", "CoalescentConstant.t:anolis", "rateStat.c:anolis");
    warning("Change to Relaxed Clock - log normal");
    beautiFrame.comboBox().selectItem("Relaxed Clock Log Normal");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "popSize.t:anolis", "ucldStdev.c:anolis", "rateCategories.c:anolis");
    assertOperatorsEqual("CoalescentConstantTreeScaler.t:anolis", "CoalescentConstantTreeRootScaler.t:anolis", "CoalescentConstantUniformOperator.t:anolis", "CoalescentConstantSubtreeSlide.t:anolis", "CoalescentConstantNarrow.t:anolis", "CoalescentConstantWide.t:anolis", "CoalescentConstantWilsonBalding.t:anolis", "PopSizeScaler.t:anolis", "ucldStdevScaler.c:anolis", "CategoriesRandomWalk.c:anolis", "CategoriesSwapOperator.c:anolis", "CategoriesUniform.c:anolis");
    assertPriorsEqual("CoalescentConstant.t:anolis", "PopSizePrior.t:anolis", "ucldStdevPrior.c:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "popSize.t:anolis", "CoalescentConstant.t:anolis", "ucldStdev.c:anolis", "rate.c:anolis");
    warning("Change to Random Local Clock");
    beautiFrame.comboBox().selectItem("Random Local Clock");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "popSize.t:anolis", "Indicators.c:anolis", "clockrates.c:anolis");
    assertOperatorsEqual("CoalescentConstantTreeScaler.t:anolis", "CoalescentConstantTreeRootScaler.t:anolis", "CoalescentConstantUniformOperator.t:anolis", "CoalescentConstantSubtreeSlide.t:anolis", "CoalescentConstantNarrow.t:anolis", "CoalescentConstantWide.t:anolis", "CoalescentConstantWilsonBalding.t:anolis", "PopSizeScaler.t:anolis", "IndicatorsBitFlip.c:anolis", "ClockRateScaler.c:anolis");
    assertPriorsEqual("CoalescentConstant.t:anolis", "PopSizePrior.t:anolis", "RRatesPrior.c:sanolis", "RRateChangesPrior.c:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "popSize.t:anolis", "CoalescentConstant.t:anolis", "Indicators.c:anolis", "clockrates.c:anolis", "RRateChanges.c:anolis");
    warning("Change to Strickt Clock");
    beautiFrame.comboBox().selectItem("Strict Clock");
    printBeautiState(f);
    assertStateEquals("Tree.t:anolis", "popSize.t:anolis");
    assertOperatorsEqual("CoalescentConstantTreeScaler.t:anolis", "CoalescentConstantTreeRootScaler.t:anolis", "CoalescentConstantUniformOperator.t:anolis", "CoalescentConstantSubtreeSlide.t:anolis", "CoalescentConstantNarrow.t:anolis", "CoalescentConstantWide.t:anolis", "CoalescentConstantWilsonBalding.t:anolis", "PopSizeScaler.t:anolis");
    assertPriorsEqual("CoalescentConstant.t:anolis", "PopSizePrior.t:anolis");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.anolis", "TreeHeight.t:anolis", "popSize.t:anolis", "CoalescentConstant.t:anolis");
    makeSureXMLParses();
}
Also used : File(java.io.File) JTabbedPaneFixture(org.fest.swing.fixture.JTabbedPaneFixture) Test(org.junit.Test)

Example 15 with JTabbedPaneFixture

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

the class CloneTest method simpleClockModelCloneTest.

@Test
public void simpleClockModelCloneTest() throws Exception {
    warning("0. Load primate-mtDNA.nex");
    importAlignment("examples/nexus", new File("primate-mtDNA.nex"));
    JTabbedPaneFixture f = beautiFrame.tabbedPane();
    // may need to use the following when not running on Hudson
    // JOptionPaneFixture op = beautiFrame.optionPane();
    // if (op.target.isVisible()) {
    // op.okButton().click();
    // }
    // 1. Set the clock model of second partition to UCLD exponential
    warning("1. Set the clock model of second partition to UCLD exponential");
    f.selectTab("Clock Model");
    beautiFrame.list("listOfPartitions").selectItems(1);
    beautiFrame.comboBox().selectItem("Relaxed Clock Exponential");
    printBeautiState(f);
    assertStateEquals("Tree.t:3rdpos", "clockRate.c:3rdpos", "birthRate.t:3rdpos", "Tree.t:noncoding", "birthRate.t:noncoding", "Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "Tree.t:coding", "birthRate.t:coding", "Tree.t:1stpos", "clockRate.c:1stpos", "birthRate.t:1stpos", "ucedMean.c:noncoding", "expRateCategories.c:noncoding");
    assertOperatorsEqual("StrictClockRateScaler.c:3rdpos", "YuleBirthRateScaler.t:3rdpos", "YuleModelTreeScaler.t:3rdpos", "YuleModelTreeRootScaler.t:3rdpos", "YuleModelUniformOperator.t:3rdpos", "YuleModelSubtreeSlide.t:3rdpos", "YuleModelNarrow.t:3rdpos", "YuleModelWide.t:3rdpos", "YuleModelWilsonBalding.t:3rdpos", "strictClockUpDownOperator.c:3rdpos", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "StrictClockRateScaler.c:2ndpos", "YuleBirthRateScaler.t:2ndpos", "YuleModelTreeScaler.t:2ndpos", "YuleModelTreeRootScaler.t:2ndpos", "YuleModelUniformOperator.t:2ndpos", "YuleModelSubtreeSlide.t:2ndpos", "YuleModelNarrow.t:2ndpos", "YuleModelWide.t:2ndpos", "YuleModelWilsonBalding.t:2ndpos", "strictClockUpDownOperator.c:2ndpos", "YuleBirthRateScaler.t:coding", "YuleModelTreeScaler.t:coding", "YuleModelTreeRootScaler.t:coding", "YuleModelUniformOperator.t:coding", "YuleModelSubtreeSlide.t:coding", "YuleModelNarrow.t:coding", "YuleModelWide.t:coding", "YuleModelWilsonBalding.t:coding", "StrictClockRateScaler.c:1stpos", "YuleBirthRateScaler.t:1stpos", "YuleModelTreeScaler.t:1stpos", "YuleModelTreeRootScaler.t:1stpos", "YuleModelUniformOperator.t:1stpos", "YuleModelSubtreeSlide.t:1stpos", "YuleModelNarrow.t:1stpos", "YuleModelWide.t:1stpos", "YuleModelWilsonBalding.t:1stpos", "strictClockUpDownOperator.c:1stpos", "ucedMeanScaler.c:noncoding", "ExpCategoriesRandomWalk.c:noncoding", "ExpCategoriesSwapOperator.c:noncoding", "ExpCategoriesUniform.c:noncoding", "relaxedUpDownOperatorExp.c:noncoding");
    assertPriorsEqual("YuleModel.t:coding", "YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "YuleModel.t:3rdpos", "ClockPrior.c:3rdpos", "YuleBirthRatePrior.t:3rdpos", "YuleBirthRatePrior.t:noncoding", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "YuleBirthRatePrior.t:coding", "ClockPrior.c:1stpos", "YuleBirthRatePrior.t:1stpos", "UCMeanRatePrior.c:noncoding");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.3rdpos", "TreeHeight.t:3rdpos", "clockRate.c:3rdpos", "YuleModel.t:3rdpos", "birthRate.t:3rdpos", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "treeLikelihood.coding", "TreeHeight.t:coding", "YuleModel.t:coding", "birthRate.t:coding", "treeLikelihood.1stpos", "TreeHeight.t:1stpos", "clockRate.c:1stpos", "YuleModel.t:1stpos", "birthRate.t:1stpos", "ucedMean.c:noncoding", "rateStat.c:noncoding");
    // 2. Clone to first and last partition
    beautiFrame.list("listOfPartitions").selectItems(0, 1, 4);
    beautiFrame.comboBox().selectItem(1);
    beautiFrame.button("ok").click();
    printBeautiState(f);
    assertStateEquals("birthRate.t:3rdpos", "Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "birthRate.t:coding", "Tree.t:1stpos", "clockRate.c:1stpos", "birthRate.t:1stpos", "Tree.t:noncoding", "birthRate.t:noncoding", "ucedMean.c:noncoding", "expRateCategories.c:noncoding", "Tree.t:coding", "expRateCategories.c:coding", "ucedMean.c:3rdpos", "Tree.t:3rdpos", "expRateCategories.c:3rdpos");
    assertOperatorsEqual("YuleBirthRateScaler.t:3rdpos", "StrictClockRateScaler.c:2ndpos", "YuleBirthRateScaler.t:2ndpos", "YuleModelTreeScaler.t:2ndpos", "YuleModelTreeRootScaler.t:2ndpos", "YuleModelUniformOperator.t:2ndpos", "YuleModelSubtreeSlide.t:2ndpos", "YuleModelNarrow.t:2ndpos", "YuleModelWide.t:2ndpos", "YuleModelWilsonBalding.t:2ndpos", "strictClockUpDownOperator.c:2ndpos", "YuleBirthRateScaler.t:coding", "StrictClockRateScaler.c:1stpos", "YuleBirthRateScaler.t:1stpos", "YuleModelTreeScaler.t:1stpos", "YuleModelTreeRootScaler.t:1stpos", "YuleModelUniformOperator.t:1stpos", "YuleModelSubtreeSlide.t:1stpos", "YuleModelNarrow.t:1stpos", "YuleModelWide.t:1stpos", "YuleModelWilsonBalding.t:1stpos", "strictClockUpDownOperator.c:1stpos", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "ucedMeanScaler.c:noncoding", "ExpCategoriesRandomWalk.c:noncoding", "ExpCategoriesSwapOperator.c:noncoding", "ExpCategoriesUniform.c:noncoding", "relaxedUpDownOperatorExp.c:noncoding", "YuleModelTreeScaler.t:coding", "YuleModelNarrow.t:coding", "YuleModelUniformOperator.t:coding", "YuleModelWilsonBalding.t:coding", "YuleModelSubtreeSlide.t:coding", "ExpCategoriesUniform.c:coding", "ExpCategoriesRandomWalk.c:coding", "ExpCategoriesSwapOperator.c:coding", "YuleModelWide.t:coding", "YuleModelTreeRootScaler.t:coding", "YuleModelTreeScaler.t:3rdpos", "YuleModelNarrow.t:3rdpos", "YuleModelUniformOperator.t:3rdpos", "YuleModelWilsonBalding.t:3rdpos", "YuleModelSubtreeSlide.t:3rdpos", "ExpCategoriesUniform.c:3rdpos", "ExpCategoriesRandomWalk.c:3rdpos", "relaxedUpDownOperatorExp.c:3rdpos", "ExpCategoriesSwapOperator.c:3rdpos", "YuleModelWide.t:3rdpos", "YuleModelTreeRootScaler.t:3rdpos", "ucedMeanScaler.c:3rdpos");
    assertPriorsEqual("YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "YuleBirthRatePrior.t:3rdpos", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "YuleBirthRatePrior.t:coding", "ClockPrior.c:1stpos", "YuleBirthRatePrior.t:1stpos", "YuleBirthRatePrior.t:noncoding", "UCMeanRatePrior.c:noncoding", "YuleModel.t:coding", "YuleModel.t:3rdpos", "UCMeanRatePrior.c:3rdpos");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.3rdpos", "birthRate.t:3rdpos", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "treeLikelihood.coding", "birthRate.t:coding", "treeLikelihood.1stpos", "TreeHeight.t:1stpos", "clockRate.c:1stpos", "YuleModel.t:1stpos", "birthRate.t:1stpos", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "ucedMean.c:noncoding", "rateStat.c:noncoding", "rateStat.c:coding", "TreeHeight.t:coding", "YuleModel.t:coding", "rateStat.c:3rdpos", "ucedMean.c:3rdpos", "TreeHeight.t:3rdpos", "YuleModel.t:3rdpos");
    // 3. Set the clock model of third partition to UCLD lognormal
    warning("3. Set the clock model of third partition to UCLD lognormal");
    beautiFrame.list("listOfPartitions").selectItems(2);
    beautiFrame.comboBox().selectItem("Relaxed Clock Log Normal");
    printBeautiState(f);
    assertStateEquals("Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "birthRate.t:coding", "Tree.t:1stpos", "birthRate.t:1stpos", "Tree.t:noncoding", "birthRate.t:noncoding", "birthRate.t:3rdpos", "ucedMean.c:noncoding", "expRateCategories.c:noncoding", "expRateCategories.c:coding", "Tree.t:coding", "expRateCategories.c:3rdpos", "Tree.t:3rdpos", "ucedMean.c:3rdpos", "ucldMean.c:1stpos", "ucldStdev.c:1stpos", "rateCategories.c:1stpos");
    assertOperatorsEqual("StrictClockRateScaler.c:2ndpos", "YuleBirthRateScaler.t:2ndpos", "YuleModelTreeScaler.t:2ndpos", "YuleModelTreeRootScaler.t:2ndpos", "YuleModelUniformOperator.t:2ndpos", "YuleModelSubtreeSlide.t:2ndpos", "YuleModelNarrow.t:2ndpos", "YuleModelWide.t:2ndpos", "YuleModelWilsonBalding.t:2ndpos", "strictClockUpDownOperator.c:2ndpos", "YuleBirthRateScaler.t:coding", "YuleBirthRateScaler.t:1stpos", "YuleModelTreeScaler.t:1stpos", "YuleModelTreeRootScaler.t:1stpos", "YuleModelUniformOperator.t:1stpos", "YuleModelSubtreeSlide.t:1stpos", "YuleModelNarrow.t:1stpos", "YuleModelWide.t:1stpos", "YuleModelWilsonBalding.t:1stpos", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "YuleBirthRateScaler.t:3rdpos", "ucedMeanScaler.c:noncoding", "ExpCategoriesRandomWalk.c:noncoding", "ExpCategoriesSwapOperator.c:noncoding", "ExpCategoriesUniform.c:noncoding", "relaxedUpDownOperatorExp.c:noncoding", "YuleModelTreeRootScaler.t:coding", "YuleModelSubtreeSlide.t:coding", "YuleModelTreeScaler.t:coding", "ExpCategoriesSwapOperator.c:coding", "ExpCategoriesRandomWalk.c:coding", "YuleModelUniformOperator.t:coding", "YuleModelWilsonBalding.t:coding", "YuleModelWide.t:coding", "YuleModelNarrow.t:coding", "ExpCategoriesUniform.c:coding", "YuleModelTreeRootScaler.t:3rdpos", "YuleModelSubtreeSlide.t:3rdpos", "YuleModelTreeScaler.t:3rdpos", "ExpCategoriesSwapOperator.c:3rdpos", "ExpCategoriesRandomWalk.c:3rdpos", "YuleModelUniformOperator.t:3rdpos", "ucedMeanScaler.c:3rdpos", "YuleModelWilsonBalding.t:3rdpos", "relaxedUpDownOperatorExp.c:3rdpos", "YuleModelWide.t:3rdpos", "YuleModelNarrow.t:3rdpos", "ExpCategoriesUniform.c:3rdpos", "ucldMeanScaler.c:1stpos", "ucldStdevScaler.c:1stpos", "CategoriesRandomWalk.c:1stpos", "CategoriesSwapOperator.c:1stpos", "CategoriesUniform.c:1stpos", "relaxedUpDownOperator.c:1stpos");
    assertPriorsEqual("YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "YuleBirthRatePrior.t:coding", "YuleBirthRatePrior.t:1stpos", "YuleBirthRatePrior.t:noncoding", "YuleBirthRatePrior.t:3rdpos", "UCMeanRatePrior.c:noncoding", "YuleModel.t:coding", "UCMeanRatePrior.c:3rdpos", "YuleModel.t:3rdpos", "ucldStdevPrior.c:1stpos", "MeanRatePrior.c:1stpos");
    assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "treeLikelihood.coding", "birthRate.t:coding", "treeLikelihood.1stpos", "TreeHeight.t:1stpos", "YuleModel.t:1stpos", "birthRate.t:1stpos", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "treeLikelihood.3rdpos", "birthRate.t:3rdpos", "ucedMean.c:noncoding", "rateStat.c:noncoding", "TreeHeight.t:coding", "rateStat.c:coding", "YuleModel.t:coding", "ucedMean.c:3rdpos", "TreeHeight.t:3rdpos", "rateStat.c:3rdpos", "YuleModel.t:3rdpos", "ucldMean.c:1stpos", "ucldStdev.c:1stpos", "rate.c:1stpos");
    // 4. Clone the third to fourth partition
    warning("4. Clone the third to fourth partition");
    beautiFrame.list("listOfPartitions").selectItems(2, 3);
    beautiFrame.comboBox().selectItem(2);
    beautiFrame.button("ok").click();
    printBeautiState(f);
    makeSureXMLParses();
    System.err.println("done");
}
Also used : 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