• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java JButtonFixture类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.fest.swing.fixture.JButtonFixture的典型用法代码示例。如果您正苦于以下问题:Java JButtonFixture类的具体用法?Java JButtonFixture怎么用?Java JButtonFixture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JButtonFixture类属于org.fest.swing.fixture包,在下文中一共展示了JButtonFixture类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: popdownButtonTortureTest

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@GUITest
@Test
public void popdownButtonTortureTest() {
  window.textBox("searchField").enterText("calf");
  window.button("searchButton").click();
  window.label("statusLabel").requireText(overviewFor("calf"));
  // triggers Noun RelationTypeComboBox to show JPopupMenu
  final JButtonFixture nounButton = window.button("RelationTypeComboBox::Noun");
  nounButton.click();
  final JPopupMenu popupMenu = nounButton.component().getComponentPopupMenu();
  final JPopupMenuFixture popup = new JPopupMenuFixture(window.robot, popupMenu);
  popup.requireVisible();
  nounButton.click();
  popup.requireNotVisible();
  nounButton.pressAndReleaseKeys(KeyEvent.VK_ENTER);
  popup.requireVisible();
  nounButton.click(); // 1
  nounButton.pressAndReleaseKeys(KeyEvent.VK_SPACE); // 2
  nounButton.click(); // 3
  nounButton.pressAndReleaseKeys(KeyEvent.VK_ENTER); // 4
  nounButton.click(); // 5
  // odd number of "clicks" should leave popup not visible
  popup.requireNotVisible();
}
 
开发者ID:nezda,项目名称:yawni,代码行数:25,代码来源:BrowserFESTTest.java


示例2: hyponymsThenNoMatchTest

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@GUITest
  @Test
  public void hyponymsThenNoMatchTest() {
    final JTextComponentFixture searchField = window.textBox("searchField");
    searchField.enterText("kid").pressAndReleaseKeys(KeyEvent.VK_ENTER);
    final JButtonFixture nounButton = window.button("RelationTypeComboBox::Noun");
    nounButton.click();
    final JPopupMenu popupMenu = nounButton.component().getComponentPopupMenu();
    final JPopupMenuFixture popup = new JPopupMenuFixture(window.robot, popupMenu);
//    popup.menuItemWithPath("Hypernyms (kid is a kind of...)").click();

    // key stroke goes to popup
    window.robot.type('h');
    window.robot.type('y');
    window.robot.type('p');
    window.robot.type('e');
    window.robot.pressAndReleaseKeys(KeyEvent.VK_ENTER);
    
    searchField.enterText("performant").pressAndReleaseKeys(KeyEvent.VK_ENTER);
    window.label("statusLabel").requireText("No matches found.");
    searchField.enterText("").pressAndReleaseKeys(KeyEvent.VK_ENTER);
//    searchField.enterText(" ").pressAndReleaseKeys(KeyEvent.VK_ENTER);
    window.label("statusLabel").requireText("No matches found.");
//    window.label("statusLabel").requireText("Enter search word and press return");
  }
 
开发者ID:nezda,项目名称:yawni,代码行数:26,代码来源:BrowserFESTTest.java


示例3: click

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
/**
 * Click button
 * @throws VerificationException if the element doesn't exist
 */
@Override
@PublicAtsApi
public void click() {

    new SwingElementState(this).waitToBecomeExisting();

    ((JButtonFixture) SwingElementLocator.findFixture(this)).click();
}
 
开发者ID:Axway,项目名称:ats-framework,代码行数:13,代码来源:SwingButton.java


示例4: isEnabled

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
/**
 * Check whether the button is Enabled or Disabled
 * @return <code>true</code> if the button is enabled
 */
@PublicAtsApi
public boolean isEnabled() {

    new SwingElementState(this).waitToBecomeExisting();

    return ((JButtonFixture) SwingElementLocator.findFixture(this)).target.isEnabled();
}
 
开发者ID:Axway,项目名称:ats-framework,代码行数:12,代码来源:SwingButton.java


示例5: createNew

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
public AvdEditWizardFixture createNew() {
  JButton newAvdButton = findButtonByText("Create Virtual Device...");
  final JButtonFixture button = new JButtonFixture(robot(), newAvdButton);
  button.requireEnabled();
  button.requireVisible();
  button.click();
  return AvdEditWizardFixture.find(robot());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AvdManagerDialogFixture.java


示例6: click

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
private void click() throws ClassNotFoundException {
  final Class<?> comboBoxButtonClass = getClass().getClassLoader().loadClass(ComboBoxAction.class.getCanonicalName() + "$ComboBoxButton");
  final ActionButtonFixture runButton = projectFrame.findRunApplicationButton();

  Container actionToolbarContainer = execute(new GuiQuery<Container>() {
    @Override
    protected Container executeInEDT() throws Throwable {
      return runButton.target().getParent();
    }
  });
  assertNotNull(actionToolbarContainer);

  JButton comboBoxButton = robot.finder().find(actionToolbarContainer, new GenericTypeMatcher<JButton>(JButton.class) {
    @Override
    protected boolean isMatching(@NotNull JButton component) {
      return comboBoxButtonClass.isInstance(component);
    }
  });

  final JButtonFixture comboBoxButtonFixture = new JButtonFixture(robot, comboBoxButton);
  pause(new Condition("Wait until comboBoxButton is enabled") {
    @Override
    public boolean test() {
      //noinspection ConstantConditions
      return execute(new GuiQuery<Boolean>() {
        @Override
        protected Boolean executeInEDT() throws Throwable {
          return comboBoxButtonFixture.target().isEnabled();
        }
      });
    }
  }, SHORT_TIMEOUT);
  comboBoxButtonFixture.click();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:ComboBoxActionFixture.java


示例7: testShowHideLog

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@Test
public void testShowHideLog() {
    FrameFixture console = createConsole(true);
    try {
        JButtonFixture showHideButton = console.button(LogShowHideComponent.class.getSimpleName());
        try {
            console.scrollPane(LogDisplayComponent.class.getSimpleName());
            showHideButton.click();
            try {
                console.scrollPane(LogDisplayComponent.class.getSimpleName());
                fail("ShowHide scroll pane should now be hidden.");
            } catch (ComponentLookupException e3) {
                showHideButton.click();
                try {
                    console.scrollPane(LogDisplayComponent.class.getSimpleName());
                    assertTrue("Successfully toggling visibility", true);
                } catch (ComponentLookupException e4) {
                    fail("ShowHide scroll pane should now be visible.");
                }
            }
        } catch (ComponentLookupException e2) {
            fail("ShowHide scroll pane should not be hidden at first.");
        }
    } catch (ComponentLookupException e1) {
        fail("ShowHide button is missing.");
    }
}
 
开发者ID:Elegie,项目名称:luchess,代码行数:28,代码来源:ConsoleTest.java


示例8: testStartStopServer

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@Test
public void testStartStopServer() {
    FrameFixture console = createConsole(true);
    JButtonFixture startStopButton = console.button(WebAppStartStopComponent.class.getSimpleName());
    JScrollPaneFixture logViewContainer = console.scrollPane(LogDisplayComponent.class.getSimpleName());
    JTextArea logViewArea = (JTextArea) logViewContainer.component().getViewport().getView();
    assertFalse(serverService.isStarted());
    assertTrue(serverService.isStopped());
    assertTrue(logViewArea.getText().isEmpty());
    startStopButton.click();
    assertTrue(serverService.isStarted());
    assertFalse(serverService.isStopped());
    assertTrue(logViewArea.getText().contains(ServerServiceHelper.STARTED));
    assertTrue(logViewArea.getText().contains(WebAppServiceHelper.CONTEXT_PATH));
    startStopButton.click();
    assertFalse(serverService.isStarted());
    assertTrue(serverService.isStopped());
    assertTrue(logViewArea.getText().contains(ServerServiceHelper.STOPPED));

    serverService.setExceptionOnStart(true);
    String textStopped = startStopButton.component().getText();
    startStopButton.click();
    assertFalse(serverService.isStarted());
    assertTrue(serverService.isStopped());
    assertEquals(textStopped, startStopButton.component().getText());
    serverService.setExceptionOnStart(false);

    serverService.setExceptionOnStop(true);
    startStopButton.click();
    String textStarted = startStopButton.component().getText();
    startStopButton.click();
    assertTrue(serverService.isStarted());
    assertFalse(serverService.isStopped());
    assertEquals(textStarted, startStopButton.component().getText());
    serverService.setExceptionOnStop(false);
    startStopButton.click();
    assertEquals(textStopped, startStopButton.component().getText());
}
 
开发者ID:Elegie,项目名称:luchess,代码行数:39,代码来源:ConsoleTest.java


示例9: unfortunateGerbilTestKeyboardTest

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@GUITest
@Test
public void unfortunateGerbilTestKeyboardTest() {
  final JTextComponentFixture searchField = window.textBox("searchField");
  searchField.focus().requireFocused();
  searchField.enterText("gerbil").pressAndReleaseKeys(KeyEvent.VK_ENTER);
  window.label("statusLabel").requireText(overviewFor("gerbil"));
  final JButtonFixture nounButton = window.button("RelationTypeComboBox::Noun");
  // clear searchField
  searchField.enterText(" ").pressAndReleaseKeys(KeyEvent.VK_ENTER);

  // since Noun triggers an action that looks at the searchField's text
  // and expects it to be compatible with itself, it must be disabled
  nounButton.requireDisabled();
}
 
开发者ID:nezda,项目名称:yawni,代码行数:16,代码来源:BrowserFESTTest.java


示例10: testSyncMissingAppCompat

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@Test @IdeGuiTest
public void testSyncMissingAppCompat() throws IOException {
  if (myAndroidRepoPath.isDirectory()) {
    // Instead of deleting the Android repo folder, we rename it and later on restore it in a @SetUp method, so if this fails, the SDK
    // will be in good state.
    delete(myAndroidRepoTempPath);
    rename(myAndroidRepoPath, myAndroidRepoTempPath);
  }
  assertThat(myAndroidRepoPath).doesNotExist();

  IdeFrameFixture projectFrame = importSimpleApplication();

  projectFrame.requestProjectSync().waitForGradleProjectSyncToFinish();

  MessageFixture message =
    projectFrame.getMessagesToolWindow().getGradleSyncContent().findMessage(ERROR, firstLineStartingWith("Failed to resolve:"));

  HyperlinkFixture hyperlink = message.findHyperlink("Install Repository and sync project");
  hyperlink.clickAndContinue();

  // TODO implement a proper "SDK Quick Fix wizard" fixture that wraps a SdkQuickfixWizard
  DialogFixture quickFixDialog = findDialog(new GenericTypeMatcher<Dialog>(Dialog.class) {
    @Override
    protected boolean isMatching(@NotNull Dialog dialog) {
      return "Install Missing Components".equals(dialog.getTitle());
    }
  }).withTimeout(SHORT_TIMEOUT.duration()).using(myRobot);

  final JButtonFixture finish = quickFixDialog.button(withText("Finish"));

  // Wait until installation is finished. By then the "Finish" button will be enabled.
  pause(new Condition("Android Support Repository is installed") {
    @Override
    public boolean test() {
      //noinspection ConstantConditions
      return execute(new GuiQuery<Boolean>() {
        @Override
        protected Boolean executeInEDT() {
          return finish.target().isEnabled();
        }
      });
    }
  }, LONG_TIMEOUT);

  // Installation finished. Click finish to resync project.
  finish.click();

  projectFrame.waitForGradleProjectSyncToFinish().waitForBackgroundTasksToFinish();

  assertThat(myAndroidRepoPath).as("Android Support Repository must have been reinstalled").isDirectory();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:52,代码来源:GradleSyncTest.java


示例11: testDownloadSdkSource

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@Test @IdeGuiTest
public void testDownloadSdkSource() throws IOException {
  if (mySdk == null) {
    printPlatformNotFound();
    skip("testDownloadSdkSource");
    return;
  }

  if (mySdkSourcePath.isDirectory()) {
    delete(mySdkSourceTmpPath);
    rename(mySdkSourcePath, mySdkSourceTmpPath);
  }
  updateSdkSourceRoot(mySdk);

  IdeFrameFixture projectFrame = importSimpleApplication();
  final EditorFixture editor = projectFrame.getEditor();

  final VirtualFile classFile = findActivityClassFile();
  editor.open(classFile, EditorFixture.Tab.EDITOR);

  acceptLegalNoticeIfNeeded();

  // Download the source.
  findNotificationPanel(projectFrame).performAction("Download");

  DialogFixture downloadDialog = findDialog(withTitle("SDK Quickfix Installation")).withTimeout(SHORT_TIMEOUT.duration()).using(myRobot);
  final JButtonFixture finish = downloadDialog.button(withText("Finish"));

  // Wait until installation is finished. By then the "Finish" button will be enabled.
  pause(new Condition("Android source is installed") {
    @Override
    public boolean test() {
      return finish.isEnabled();
    }
  });
  finish.click();

  pause(new Condition("Source file is opened") {
    @Override
    public boolean test() {
      return !classFile.equals(editor.getCurrentFile());
    }
  }, SHORT_TIMEOUT);

  VirtualFile sourceFile = editor.getCurrentFile();
  assertNotNull(sourceFile);
  assertIsActivityJavaFile(sourceFile);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:49,代码来源:AndroidSdkSourceAttachTest.java


示例12: simpleSiteModelCloneTest

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@Test
 	public void simpleSiteModelCloneTest() 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 site model to HKY+G4 (estimated)
        warning("1. Set the site model of first partition to HKY+G4 (estimated)");
        f.selectTab("Site Model");
        JComboBoxFixture substModel = beautiFrame.comboBox("substModel");
        substModel.selectItem("HKY");

        JTextComponentFixture categoryCount = beautiFrame.textBox("gammaCategoryCount");
        categoryCount.setText("4");

        JCheckBoxFixture shapeIsEstimated = beautiFrame.checkBox("shape.isEstimated");
        shapeIsEstimated.check();
        printBeautiState(f);
        assertStateEquals("Tree.t:coding", "birthRate.t:coding", "Tree.t:noncoding", "clockRate.c:noncoding", "birthRate.t:noncoding", "Tree.t:3rdpos", "clockRate.c:3rdpos", "birthRate.t:3rdpos", "Tree.t:1stpos", "clockRate.c:1stpos", "birthRate.t:1stpos", "Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "kappa.s:coding", "gammaShape.s:coding", "freqParameter.s:coding");
        assertOperatorsEqual("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:noncoding", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "strictClockUpDownOperator.c:noncoding", "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", "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", "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", "KappaScaler.s:coding", "gammaShapeScaler.s:coding", "FrequenciesExchanger.s:coding");
        assertPriorsEqual("YuleModel.t:coding", "YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "YuleModel.t:3rdpos", "YuleBirthRatePrior.t:coding", "ClockPrior.c:noncoding", "YuleBirthRatePrior.t:noncoding", "ClockPrior.c:3rdpos", "YuleBirthRatePrior.t:3rdpos", "ClockPrior.c:1stpos", "YuleBirthRatePrior.t:1stpos", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "KappaPrior.s:coding", "GammaShapePrior.s:coding");
        assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.coding", "TreeHeight.t:coding", "YuleModel.t:coding", "birthRate.t:coding", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "clockRate.c:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "treeLikelihood.3rdpos", "TreeHeight.t:3rdpos", "clockRate.c:3rdpos", "YuleModel.t:3rdpos", "birthRate.t:3rdpos", "treeLikelihood.1stpos", "TreeHeight.t:1stpos", "clockRate.c:1stpos", "YuleModel.t:1stpos", "birthRate.t:1stpos", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "kappa.s:coding", "gammaShape.s:coding", "freqParameter.s:coding");

        //2. select all models, clone from first model
        warning("2. select all models, clone from first model");
        JListFixture partitionlist = beautiFrame.list("listOfPartitions");
        partitionlist.selectItems(0, 1, 2, 3, 4);
        
        JButtonFixture cloneButton = beautiFrame.button("ok");
        cloneButton.click();
        printBeautiState(f);
        assertStateEquals("Tree.t:1stpos", "clockRate.c:1stpos", "birthRate.t:1stpos", "Tree.t:coding", "birthRate.t:coding", "Tree.t:3rdpos", "clockRate.c:3rdpos", "birthRate.t:3rdpos", "Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "Tree.t:noncoding", "clockRate.c:noncoding", "birthRate.t:noncoding", "kappa.s:coding", "gammaShape.s:coding", "gammaShape.s:noncoding", "kappa.s:noncoding", "gammaShape.s:1stpos", "kappa.s:1stpos", "gammaShape.s:2ndpos", "kappa.s:2ndpos", "gammaShape.s:3rdpos", "kappa.s:3rdpos", "freqParameter.s:1stpos", "freqParameter.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:noncoding", "freqParameter.s:coding");
        assertOperatorsEqual("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:coding", "YuleModelTreeScaler.t:coding", "YuleModelTreeRootScaler.t:coding", "YuleModelUniformOperator.t:coding", "YuleModelSubtreeSlide.t:coding", "YuleModelNarrow.t:coding", "YuleModelWide.t:coding", "YuleModelWilsonBalding.t:coding", "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", "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", "StrictClockRateScaler.c:noncoding", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "strictClockUpDownOperator.c:noncoding", "KappaScaler.s:coding", "gammaShapeScaler.s:coding", "gammaShapeScaler.s:noncoding", "KappaScaler.s:noncoding", "gammaShapeScaler.s:1stpos", "KappaScaler.s:1stpos", "gammaShapeScaler.s:2ndpos", "KappaScaler.s:2ndpos", "gammaShapeScaler.s:3rdpos", "KappaScaler.s:3rdpos", "FrequenciesExchanger.s:1stpos", "FrequenciesExchanger.s:3rdpos", "FrequenciesExchanger.s:2ndpos", "FrequenciesExchanger.s:noncoding", "FrequenciesExchanger.s:coding");
        assertPriorsEqual("YuleModel.t:coding", "YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "YuleModel.t:3rdpos", "ClockPrior.c:1stpos", "YuleBirthRatePrior.t:1stpos", "YuleBirthRatePrior.t:coding", "ClockPrior.c:3rdpos", "YuleBirthRatePrior.t:3rdpos", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "ClockPrior.c:noncoding", "YuleBirthRatePrior.t:noncoding", "KappaPrior.s:coding", "GammaShapePrior.s:coding", "GammaShapePrior.s:noncoding", "KappaPrior.s:noncoding", "GammaShapePrior.s:1stpos", "KappaPrior.s:1stpos", "GammaShapePrior.s:2ndpos", "KappaPrior.s:2ndpos", "GammaShapePrior.s:3rdpos", "KappaPrior.s:3rdpos");
        assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.1stpos", "TreeHeight.t:1stpos", "clockRate.c:1stpos", "YuleModel.t:1stpos", "birthRate.t:1stpos", "treeLikelihood.coding", "TreeHeight.t:coding", "YuleModel.t:coding", "birthRate.t:coding", "treeLikelihood.3rdpos", "TreeHeight.t:3rdpos", "clockRate.c:3rdpos", "YuleModel.t:3rdpos", "birthRate.t:3rdpos", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "clockRate.c:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "kappa.s:coding", "gammaShape.s:coding", "gammaShape.s:noncoding", "kappa.s:noncoding", "gammaShape.s:1stpos", "kappa.s:1stpos", "gammaShape.s:2ndpos", "kappa.s:2ndpos", "gammaShape.s:3rdpos", "kappa.s:3rdpos", "freqParameter.s:1stpos", "freqParameter.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:noncoding", "freqParameter.s:coding");

        //3. set second model back to JC
        warning("3. select all models, clone from first model");
        partitionlist.selectItems(1);
        beautiFrame.comboBox("substModel").selectItem("JC69");
        beautiFrame.textBox("gammaCategoryCount").setText("6");
        printBeautiState(f);
        assertStateEquals("Tree.t:3rdpos", "clockRate.c:3rdpos", "birthRate.t:3rdpos", "Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "Tree.t:noncoding", "clockRate.c:noncoding", "birthRate.t:noncoding", "Tree.t:coding", "birthRate.t:coding", "Tree.t:1stpos", "clockRate.c:1stpos", "birthRate.t:1stpos", "kappa.s:coding", "gammaShape.s:coding", "gammaShape.s:noncoding", "kappa.s:1stpos", "gammaShape.s:1stpos", "kappa.s:2ndpos", "gammaShape.s:2ndpos", "kappa.s:3rdpos", "gammaShape.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:3rdpos", "freqParameter.s:1stpos", "freqParameter.s:coding");
        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", "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", "StrictClockRateScaler.c:noncoding", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "strictClockUpDownOperator.c:noncoding", "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", "KappaScaler.s:coding", "gammaShapeScaler.s:coding", "gammaShapeScaler.s:noncoding", "KappaScaler.s:1stpos", "gammaShapeScaler.s:1stpos", "KappaScaler.s:2ndpos", "gammaShapeScaler.s:2ndpos", "KappaScaler.s:3rdpos", "gammaShapeScaler.s:3rdpos", "FrequenciesExchanger.s:2ndpos", "FrequenciesExchanger.s:3rdpos", "FrequenciesExchanger.s:1stpos", "FrequenciesExchanger.s:coding");
        assertPriorsEqual("YuleModel.t:coding", "YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "YuleModel.t:3rdpos", "ClockPrior.c:3rdpos", "YuleBirthRatePrior.t:3rdpos", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "ClockPrior.c:noncoding", "YuleBirthRatePrior.t:noncoding", "YuleBirthRatePrior.t:coding", "ClockPrior.c:1stpos", "YuleBirthRatePrior.t:1stpos", "KappaPrior.s:coding", "GammaShapePrior.s:coding", "GammaShapePrior.s:noncoding", "GammaShapePrior.s:1stpos", "KappaPrior.s:1stpos", "GammaShapePrior.s:2ndpos", "KappaPrior.s:2ndpos", "GammaShapePrior.s:3rdpos", "KappaPrior.s:3rdpos");
        assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.3rdpos", "TreeHeight.t:3rdpos", "clockRate.c:3rdpos", "YuleModel.t:3rdpos", "birthRate.t:3rdpos", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "clockRate.c:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "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", "kappa.s:coding", "gammaShape.s:coding", "gammaShape.s:noncoding", "kappa.s:1stpos", "gammaShape.s:1stpos", "kappa.s:2ndpos", "gammaShape.s:2ndpos", "kappa.s:3rdpos", "gammaShape.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:3rdpos", "freqParameter.s:1stpos", "freqParameter.s:coding");

        // set category count back to 1
        beautiFrame.checkBox("shape.isEstimated").uncheck();
        beautiFrame.textBox("gammaCategoryCount").setText("1");
        printBeautiState(f);
        assertStateEquals("Tree.t:3rdpos", "clockRate.c:3rdpos", "birthRate.t:3rdpos", "Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "Tree.t:noncoding", "clockRate.c:noncoding", "birthRate.t:noncoding", "Tree.t:coding", "birthRate.t:coding", "Tree.t:1stpos", "clockRate.c:1stpos", "birthRate.t:1stpos", "kappa.s:coding", "gammaShape.s:coding", "kappa.s:1stpos", "gammaShape.s:1stpos", "kappa.s:2ndpos", "gammaShape.s:2ndpos", "kappa.s:3rdpos", "gammaShape.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:3rdpos", "freqParameter.s:1stpos", "freqParameter.s:coding");
        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", "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", "StrictClockRateScaler.c:noncoding", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "strictClockUpDownOperator.c:noncoding", "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", "KappaScaler.s:coding", "gammaShapeScaler.s:coding", "KappaScaler.s:1stpos", "gammaShapeScaler.s:1stpos", "KappaScaler.s:2ndpos", "gammaShapeScaler.s:2ndpos", "KappaScaler.s:3rdpos", "gammaShapeScaler.s:3rdpos", "FrequenciesExchanger.s:2ndpos", "FrequenciesExchanger.s:3rdpos", "FrequenciesExchanger.s:1stpos", "FrequenciesExchanger.s:coding");
        assertPriorsEqual("YuleModel.t:coding", "YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "YuleModel.t:3rdpos", "ClockPrior.c:3rdpos", "YuleBirthRatePrior.t:3rdpos", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "ClockPrior.c:noncoding", "YuleBirthRatePrior.t:noncoding", "YuleBirthRatePrior.t:coding", "ClockPrior.c:1stpos", "YuleBirthRatePrior.t:1stpos", "KappaPrior.s:coding", "GammaShapePrior.s:coding", "GammaShapePrior.s:1stpos", "KappaPrior.s:1stpos", "GammaShapePrior.s:2ndpos", "KappaPrior.s:2ndpos", "GammaShapePrior.s:3rdpos", "KappaPrior.s:3rdpos");
        assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.3rdpos", "TreeHeight.t:3rdpos", "clockRate.c:3rdpos", "YuleModel.t:3rdpos", "birthRate.t:3rdpos", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "clockRate.c:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "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", "kappa.s:coding", "gammaShape.s:coding", "kappa.s:1stpos", "gammaShape.s:1stpos", "kappa.s:2ndpos", "gammaShape.s:2ndpos", "kappa.s:3rdpos", "gammaShape.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:3rdpos", "freqParameter.s:1stpos", "freqParameter.s:coding");


        // 4. clone second model to first model
        warning("4. clone second model to first model");
        beautiFrame.list("listOfPartitions").selectItems(0, 1);
        beautiFrame.comboBox().selectItem(1);
        beautiFrame.button("ok").click();
        
        printBeautiState(f);
        assertStateEquals("Tree.t:3rdpos", "clockRate.c:3rdpos", "birthRate.t:3rdpos", "Tree.t:2ndpos", "clockRate.c:2ndpos", "birthRate.t:2ndpos", "Tree.t:noncoding", "clockRate.c:noncoding", "birthRate.t:noncoding", "Tree.t:coding", "birthRate.t:coding", "Tree.t:1stpos", "clockRate.c:1stpos", "birthRate.t:1stpos", "kappa.s:1stpos", "gammaShape.s:1stpos", "kappa.s:2ndpos", "gammaShape.s:2ndpos", "kappa.s:3rdpos", "gammaShape.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:3rdpos", "freqParameter.s:1stpos");
        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", "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", "StrictClockRateScaler.c:noncoding", "YuleBirthRateScaler.t:noncoding", "YuleModelTreeScaler.t:noncoding", "YuleModelTreeRootScaler.t:noncoding", "YuleModelUniformOperator.t:noncoding", "YuleModelSubtreeSlide.t:noncoding", "YuleModelNarrow.t:noncoding", "YuleModelWide.t:noncoding", "YuleModelWilsonBalding.t:noncoding", "strictClockUpDownOperator.c:noncoding", "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", "KappaScaler.s:1stpos", "gammaShapeScaler.s:1stpos", "KappaScaler.s:2ndpos", "gammaShapeScaler.s:2ndpos", "KappaScaler.s:3rdpos", "gammaShapeScaler.s:3rdpos", "FrequenciesExchanger.s:2ndpos", "FrequenciesExchanger.s:3rdpos", "FrequenciesExchanger.s:1stpos");
        assertPriorsEqual("YuleModel.t:coding", "YuleModel.t:noncoding", "YuleModel.t:1stpos", "YuleModel.t:2ndpos", "YuleModel.t:3rdpos", "ClockPrior.c:3rdpos", "YuleBirthRatePrior.t:3rdpos", "ClockPrior.c:2ndpos", "YuleBirthRatePrior.t:2ndpos", "ClockPrior.c:noncoding", "YuleBirthRatePrior.t:noncoding", "YuleBirthRatePrior.t:coding", "ClockPrior.c:1stpos", "YuleBirthRatePrior.t:1stpos", "GammaShapePrior.s:1stpos", "KappaPrior.s:1stpos", "GammaShapePrior.s:2ndpos", "KappaPrior.s:2ndpos", "GammaShapePrior.s:3rdpos", "KappaPrior.s:3rdpos");
        assertTraceLogEqual("posterior", "likelihood", "prior", "treeLikelihood.3rdpos", "TreeHeight.t:3rdpos", "clockRate.c:3rdpos", "YuleModel.t:3rdpos", "birthRate.t:3rdpos", "treeLikelihood.2ndpos", "TreeHeight.t:2ndpos", "clockRate.c:2ndpos", "YuleModel.t:2ndpos", "birthRate.t:2ndpos", "treeLikelihood.noncoding", "TreeHeight.t:noncoding", "clockRate.c:noncoding", "YuleModel.t:noncoding", "birthRate.t:noncoding", "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", "kappa.s:1stpos", "gammaShape.s:1stpos", "kappa.s:2ndpos", "gammaShape.s:2ndpos", "kappa.s:3rdpos", "gammaShape.s:3rdpos", "freqParameter.s:2ndpos", "freqParameter.s:3rdpos", "freqParameter.s:1stpos");

        makeSureXMLParses();       
	}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:78,代码来源:CloneTest.java


示例13: kittenKeyboardTest

import org.fest.swing.fixture.JButtonFixture; //导入依赖的package包/类
@GUITest
  @Test
  public void kittenKeyboardTest() {
    final JTextComponentFixture searchField = window.textBox("searchField");
    final JTextComponent searchFieldComponent = searchField.component();
    assertThat(searchFieldComponent).isNotNull();
    searchField.requireFocused(); // defaults to focused
//    searchField.focus().requireFocused();
    searchField.enterText("kitten").pressAndReleaseKeys(KeyEvent.VK_ENTER);
    window.label("statusLabel").requireText(overviewFor("kitten"));
    final JButtonFixture nounButton = window.button("RelationTypeComboBox::Noun");
    // transfer focus from searchField to Noun button with keyboard
    searchField.pressAndReleaseKeys(KeyEvent.VK_TAB);
    nounButton.requireFocused();
    // triggers Noun RelationTypeComboBox to show JPopupMenu
    nounButton.pressAndReleaseKeys(KeyEvent.VK_ENTER);
    // key stroke goes to popup
    window.robot.type('s');

    // only need popup to verify correctness
    final JPopupMenu popupMenu = nounButton.component().getComponentPopupMenu();
    assertThat(popupMenu).isNotNull();
    final JPopupMenuFixture popup = new JPopupMenuFixture(window.robot, popupMenu);
    window.robot.waitForIdle();
    popup.requireVisible();
    final JMenuItem sensesItem = popup.menuItemWithPath("Senses").component();
    assertThat(sensesItem.isArmed()).isTrue();
    assertThat(sensesItem.hasFocus()).isFalse();
//    assertThat(sensesItem.isSelected()).isFalse();
    
    assertThat(popup.menuItemWithPath("Derivationally related forms").component().isArmed()).isFalse();

    // key stroke goes to popup
    window.robot.type('s');
    window.robot.type('e');
    assertThat(sensesItem.isArmed()).isTrue();

    // hit enter
    window.robot.pressAndReleaseKeys(KeyEvent.VK_ENTER);
    window.label("statusLabel").requireText("Synonyms search for noun \"kitten\"");
  }
 
开发者ID:nezda,项目名称:yawni,代码行数:42,代码来源:BrowserFESTTest.java



注:本文中的org.fest.swing.fixture.JButtonFixture类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TableSchema类代码示例发布时间:2022-05-22
下一篇:
Java RegionInfo类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap