use of org.fest.swing.fixture.JListFixture in project ats-framework by Axway.
the class SwingSingleSelectList method setValue.
/**
* Set SingleSelectList value
*
* @param value the value to set
* @throws VerificationException if the element doesn't exist
*/
@Override
@PublicAtsApi
public void setValue(String value) {
new SwingElementState(this).waitToBecomeExisting();
((JListFixture) SwingElementLocator.findFixture(this)).selectItem(value);
}
use of org.fest.swing.fixture.JListFixture in project ats-framework by Axway.
the class SwingSingleSelectList method clearSelection.
/**
* Clears the selection
*
* @throws VerificationException if the element doesn't exist
*/
@PublicAtsApi
public void clearSelection() {
new SwingElementState(this).waitToBecomeExisting();
((JListFixture) SwingElementLocator.findFixture(this)).clearSelection();
}
use of org.fest.swing.fixture.JListFixture in project ats-framework by Axway.
the class SwingMultiSelectList method rightClick.
/**
*
* @param contextMenuItems context menu items to select
*/
@PublicAtsApi
public void rightClick(String... contextMenuItems) {
new SwingElementState(this).waitToBecomeExisting();
JListFixture listFixture = ((JListFixture) SwingElementLocator.findFixture(this));
JPopupMenuFixture popUpMenu = listFixture.showPopupMenu();
popUpMenu.menuItemWithPath(contextMenuItems).click();
}
use of org.fest.swing.fixture.JListFixture in project android by JetBrains.
the class AddGradleDependencyTest method assertIntentionNotIncluded.
private void assertIntentionNotIncluded(@NotNull EditorFixture editor, @NotNull String intention) {
editor.invokeAction(SHOW_INTENTION_ACTIONS);
Robot robot = guiTest.robot();
JListFixture popup = new JListFixture(robot, waitForPopup(robot));
String[] intentions = popup.contents();
assertThat(intentions).asList().doesNotContain(intention);
}
use of org.fest.swing.fixture.JListFixture in project android by JetBrains.
the class ThemeConfigurationTest method testThemesWithConfiguration.
/**
* Tests that the theme editor deals well with themes defined only in certain configurations
*/
@Test
public void testThemesWithConfiguration() throws IOException {
guiTest.importSimpleApplication();
ThemeEditorFixture themeEditor = ThemeEditorGuiTestUtils.openThemeEditor(guiTest.ideFrame());
JComboBoxFixture themesComboBox = themeEditor.getThemesComboBox();
themesComboBox.selectItem("Create New Theme");
NewStyleDialogFixture newStyleDialog = NewStyleDialogFixture.find(guiTest.robot());
JComboBoxFixture parentComboBox = newStyleDialog.getParentComboBox();
parentComboBox.selectItem("Show all themes");
ThemeSelectionDialogFixture themeSelectionDialog = ThemeSelectionDialogFixture.find(guiTest.robot());
final JTreeFixture categoriesTree = themeSelectionDialog.getCategoriesTree();
JListFixture themeList = themeSelectionDialog.getThemeList();
categoriesTree.clickPath("Material Dark");
guiTest.robot().waitForIdle();
themeList.clickItem("android:Theme.Material");
themeSelectionDialog.clickOk();
parentComboBox.requireSelection("android:Theme.Material");
JTextComponentFixture newNameTextField = newStyleDialog.getNewNameTextField();
newNameTextField.click();
newNameTextField.deleteText();
newNameTextField.enterText("MyMaterialTheme");
newStyleDialog.clickOk();
themeEditor.waitForThemeSelection("MyMaterialTheme");
AndroidThemePreviewPanelFixture themePreviewPanel = themeEditor.getPreviewComponent().getThemePreviewPanel();
themePreviewPanel.requirePreviewPanel();
JButton apiButton = themeEditor.findToolbarButton("API Version in Editor");
guiTest.robot().click(apiButton);
clickPopupMenuItem("API 19", "19", apiButton, guiTest.robot());
themePreviewPanel.requireErrorPanel();
themesComboBox.selectItem("AppTheme");
themePreviewPanel.requirePreviewPanel();
themesComboBox.selectItem("MyMaterialTheme");
themePreviewPanel.requireErrorPanel();
}
Aggregations