/** * Get ComboBox available values * * @return {@link String} array with all the available values * @throws VerificationException if the element doesn't exist */ @PublicAtsApi public String[] getAvailableValues() { new SwingElementState(this).waitToBecomeExisting(); return ((JComboBoxFixture) SwingElementLocator.findFixture(this)).contents(); }
/** * Basic test showing usage of FEST and checking combo box */ @Test public void testChromoBoxContents() throws Exception { String[] chromos = frame.comboBox("chromosomeComboBox").contents(); assertEquals(26, chromos.length); }
/** * Basic test showing usage of FEST and checking combo box * * @throws Exception */ //@Test public void scratchTestFEST() throws Exception { FrameFixture frame = new FrameFixture(IGV.getMainFrame()); JPanelFixture contentFixture = frame.panel("contentPane"); JPanelFixture commandBar = frame.panel("igvCommandBar"); JComboBoxFixture chromoBox = frame.comboBox("chromosomeComboBox"); String[] chromos = commandBar.comboBox("chromosomeComboBox").contents(); Assert.assertEquals(26, chromos.length); }
@Test @Ignore(value = "Issue in maven compilation :(") public void displaySimpleJob() throws Exception { createDialog(JOB_WITH_GOOD_PARAMS); // assertEquals("This build requires parameters", uispecDialog.getTitle()); dialogFixture.checkBox("integrationTest").requireSelected(); String[] contents = dialogFixture.comboBox() .requireItemCount(4) .requireSelection("development") .contents(); assertTrue(Arrays.equals(new String[]{"development", "integration", "acceptance", "production"}, contents)); dialogFixture.textBox(JTextComponentMatcher.any()).requireText(""); dialogFixture.button(JButtonMatcher.withText("OK")).requireEnabled(); }