use of org.fest.swing.fixture.JTextComponentFixture in project ats-framework by Axway.
the class SwingTextArea method appendValue.
/**
* Works in same way as the 'set text' method
*
* @param value
*/
@Override
@PublicAtsApi
public void appendValue(String value) {
new SwingElementState(this).waitToBecomeExisting();
((JTextComponentFixture) SwingElementLocator.findFixture(this)).setText(value);
}
use of org.fest.swing.fixture.JTextComponentFixture in project ats-framework by Axway.
the class SwingTextArea method setValue.
/**
* Set text area 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();
((JTextComponentFixture) SwingElementLocator.findFixture(this)).setText(value);
}
use of org.fest.swing.fixture.JTextComponentFixture in project intellij-community by JetBrains.
the class NewProjectWizardFixture method getLocationInFileSystem.
@NotNull
public File getLocationInFileSystem() {
String labelText = GuiTestUtil.adduction(IdeBundle.message("label.project.files.location"));
//noinspection ConstantConditions
final JTextComponentFixture locationTextField = findTextField(labelText);
return execute(new GuiQuery<File>() {
@Override
protected File executeInEDT() throws Throwable {
String location = locationTextField.text();
assertThat(location).isNotNull().isNotEmpty();
return new File(location);
}
});
}
use of org.fest.swing.fixture.JTextComponentFixture in project android by JetBrains.
the class TranslationsEditorTest method translationTextFieldFontCanDisplayPastedHebrew.
@Test
public void translationTextFieldFontCanDisplayPastedHebrew() {
myTranslationsEditor.getTable().selectCell(TableCell.row(1).column(5));
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection("יישום פשוט"), EmptyClipboardOwner.INSTANCE);
JTextComponentFixture translationTextField = myTranslationsEditor.getTranslationTextField();
KeyStroke keyStroke = getKeyStroke(translationTextField.target().getInputMap(), DefaultEditorKit.pasteAction);
translationTextField.pressAndReleaseKey(KeyPressInfo.keyCode(keyStroke.getKeyCode()).modifiers(keyStroke.getModifiers()));
assertEquals(-1, translationTextField.font().target().canDisplayUpTo("יישום פשוט"));
}
use of org.fest.swing.fixture.JTextComponentFixture 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