Permalink
Browse files

Sprint task - patch for enhancement 394179 applied.

  • Loading branch information...
1 parent 8130f1b commit 87dcf3117f746a5bd16bd3d71fa23827ee508e58 Markus Tiede committed Dec 13, 2012
Showing with 14,288 additions and 24 deletions.
  1. +3 −0 org.eclipse.jubula.rc.common/META-INF/MANIFEST.MF
  2. +54 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractButtonCAPs.java
  3. +180 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractComboBoxCAPs.java
  4. +476 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractListCAPs.java
  5. +584 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractMenuCAPs.java
  6. +1,094 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractTableCAPs.java
  7. +205 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractTextComponent.java
  8. +53 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractTextInputSupport.java
  9. +49 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractTextVerifiable.java
  10. +754 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractTreeCAPs.java
  11. +88 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractUICAPs.java
  12. +539 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/AbstractWidgetCAPs.java
  13. +30 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/LabelCAPs.java
  14. +307 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/caps/TabbedPaneCAPs.java
  15. +18 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/driver/DragAndDropHelper.java
  16. +101 −0 ...ubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/factory/GUIAdapterFactoryRegistry.java
  17. +36 −0 ...clipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/factory/IUIAdapterFactory.java
  18. +34 −0 ...clipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/IButtonAdapter.java
  19. +79 −0 ...ipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/IComboBoxAdapter.java
  20. +35 −0 ...pse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/IComponentAdapter.java
  21. +52 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/IListAdapter.java
  22. +35 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/IMenuAdapter.java
  23. +80 −0 ...ipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/IMenuItemAdapter.java
  24. +52 −0 ...lipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/ITabPaneAdapter.java
  25. +128 −0 ...eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/ITableAdapter.java
  26. +52 −0 ...jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/ITextComponentAdapter.java
  27. +15 −0 ...lipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/ITextVerifiable.java
  28. +41 −0 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/ITreeAdapter.java
  29. +117 −0 ...clipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/uiadapter/interfaces/IWidgetAdapter.java
  30. +6 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/SwingAUTServer.java
  31. +45 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/caps/AbstractButtonCAPs.java
  32. +301 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/caps/CapUtil.java
  33. +29 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/caps/JListCAPs.java
  34. +191 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/caps/JMenuBarCAPs.java
  35. +190 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/caps/JTableCAPs.java
  36. +157 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/caps/JTreeCAPs.java
  37. +103 −0 ...clipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/AbstractButtonAdapter.java
  38. +28 −0 ...pse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/AbstractComponentAdapter.java
  39. +405 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JComboBoxAdapter.java
  40. +39 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JLabelAdapter.java
  41. +243 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JListAdapter.java
  42. +91 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JMenuAdapter.java
  43. +74 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JMenuBarAdapter.java
  44. +225 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JMenuItemAdapter.java
  45. +68 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JPopupMenuAdapter.java
  46. +98 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JTabbedPaneAdapter.java
  47. +385 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JTableAdapter.java
  48. +119 −0 ...clipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JTextComponentAdapter.java
  49. +65 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/JTreeAdapter.java
  50. +329 −0 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/WidgetAdapter.java
  51. +119 −0 ....jubula.rc.swing/src/org/eclipse/jubula/rc/swing/swing/uiadapter/factory/SwingAdapterFactory.java
  52. +7 −1 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java
  53. +35 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/caps/ButtonCAPs.java
  54. +96 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/caps/CAPUtil.java
  55. +30 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/caps/ListCAPs.java
  56. +305 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/caps/MenuCAPs.java
  57. +714 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/caps/TableCAPs.java
  58. +901 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/caps/TreeCAPs.java
  59. +318 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/AbstractComboBoxAdapter.java
  60. +29 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/AbstractComponentAdapter.java
  61. +70 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/ButtonAdapter.java
  62. +355 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/CComboAdapter.java
  63. +54 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/CLabelAdapter.java
  64. +121 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/CTabFolderAdapter.java
  65. +196 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/ComboAdapter.java
  66. +54 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/LabelAdapter.java
  67. +208 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/ListAdapter.java
  68. +106 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/MenuAdapter.java
  69. +532 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/MenuItemAdapter.java
  70. +151 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/StyledTextAdapter.java
  71. +105 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/TabFolderAdapter.java
  72. +534 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/TableAdapter.java
  73. +153 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/TextComponentAdapter.java
  74. +66 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/TreeAdapter.java
  75. +420 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/WidgetAdapter.java
  76. +104 −0 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/uiadapter/factory/SWTAdapterFactory.java
  77. +9 −9 org.eclipse.jubula.toolkit.provider.swing/resources/xml/ComponentConfiguration.xml
  78. +14 −14 org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml
@@ -7,6 +7,7 @@ Bundle-Vendor: Eclipse Jubula
Export-Package: org.eclipse.jubula.rc.common,
org.eclipse.jubula.rc.common.adaptable,
org.eclipse.jubula.rc.common.businessprocess,
+ org.eclipse.jubula.rc.common.caps,
org.eclipse.jubula.rc.common.classloader,
org.eclipse.jubula.rc.common.commands,
org.eclipse.jubula.rc.common.components,
@@ -18,6 +19,8 @@ Export-Package: org.eclipse.jubula.rc.common,
org.eclipse.jubula.rc.common.listener,
org.eclipse.jubula.rc.common.logger,
org.eclipse.jubula.rc.common.registration,
+ org.eclipse.jubula.rc.common.uiadapter.factory,
+ org.eclipse.jubula.rc.common.uiadapter.interfaces,
org.eclipse.jubula.rc.common.util
Require-Bundle: org.apache.commons.beanutils;bundle-version="[1.7.0,2.0.0)",
org.apache.commons.lang;bundle-version="[2.4.0,3.0.0)",
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BREDEX GmbH.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BREDEX GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jubula.rc.common.caps;
+
+import org.eclipse.jubula.rc.common.implclasses.MatchUtil;
+import org.eclipse.jubula.rc.common.implclasses.Verifier;
+import org.eclipse.jubula.rc.common.uiadapter.interfaces.IButtonAdapter;
+
+
+/**
+ * Implementation for all Button like classes, it holds the
+ * general methods for the testing of buttons.
+ *
+ * @author BREDEX GmbH
+ *
+ */
+public abstract class AbstractButtonCAPs extends AbstractTextVerifiable {
+
+ /**
+ *
+ * @return the IButtonAdapter for the component.
+ */
+ private IButtonAdapter getButtonAdapter() {
+ return (IButtonAdapter)getComponent();
+ }
+
+ /**
+ * Verifies the selected property.
+ *
+ * @param selected The selected property value to verify.
+ */
+ public void gdVerifySelected(boolean selected) {
+
+ Verifier.equals(selected, getButtonAdapter().isSelected());
+ }
+
+ /**
+ * Verifies the passed text.
+ *
+ * @param text The text to verify
+ */
+ public void gdVerifyText(String text) {
+ gdVerifyText(text, MatchUtil.DEFAULT_OPERATOR);
+ }
+
+}
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BREDEX GmbH.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BREDEX GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jubula.rc.common.caps;
+
+import org.eclipse.jubula.rc.common.exception.StepExecutionException;
+import org.eclipse.jubula.rc.common.implclasses.IndexConverter;
+import org.eclipse.jubula.rc.common.implclasses.MatchUtil;
+import org.eclipse.jubula.rc.common.implclasses.Verifier;
+import org.eclipse.jubula.rc.common.uiadapter.interfaces.IComboBoxAdapter;
+import org.eclipse.jubula.tools.constants.TestDataConstants;
+import org.eclipse.jubula.tools.utils.StringParsing;
+
+/**
+ * General implementation for ComboBoxes and ComboBox like components.
+ * @author BREDEX GmbH
+ *
+ */
+public class AbstractComboBoxCAPs extends AbstractTextInputSupport {
+
+ /** The dafault separator of a list of values */
+ public static final char VALUE_SEPARATOR =
+ TestDataConstants.VALUE_CHAR_DEFAULT;
+
+ /**
+ *
+ * @return the <code>IComboBoxAdapter</code>
+ */
+ private IComboBoxAdapter getCBAdapter() {
+ return (IComboBoxAdapter) getComponent();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String[] getTextArrayFromComponent() {
+ return null;
+ }
+
+ /**
+ * Verifies the editable property.
+ * @param editable The editable property to verify.
+ */
+ public void gdVerifyEditable(boolean editable) {
+ Verifier.equals(editable, getCBAdapter().isEditable());
+ }
+
+ /**
+ * Checks if the component contains the specified text.
+ * @param text check if this text is in the combobox
+ */
+ public void gdVerifyContainsValue(final String text) {
+ Verifier.equals(true, getCBAdapter().containsValue(text));
+ }
+
+ /**
+ * Verifies if the list contains an element that renderes <code>value</code>.
+ * @param value The text to verify
+ * @param operator The operator used to verify
+ * @param exists If the value should exist or not.
+ */
+ public void gdVerifyContainsValue(String value, String operator,
+ boolean exists) {
+ final boolean contains = getCBAdapter().containsValue(value, operator);
+ Verifier.equals(exists, contains);
+ }
+
+ /**
+ * @see org.eclipse.jubula.rc.swing.swing.implclasses.AbstractSwingImplClass#getText()
+ * @return value from ComboBoxHelper
+ */
+ protected String getText() {
+ return getCBAdapter().getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void gdInputText(String text) {
+ getCBAdapter().input(text, false);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void gdReplaceText(String text) throws StepExecutionException {
+ getCBAdapter().input(text, true);
+ }
+
+ /**
+ * Selects <code>index</code> in the combobox.
+ *
+ * @param index
+ * The index to select
+ */
+ public void gdSelectIndex(String index) {
+ int implIdx = IndexConverter.toImplementationIndex(
+ IndexConverter.intValue(index));
+ getCBAdapter().select(implIdx);
+
+ }
+
+ /**
+ * Selects a value from the list of the combobox
+ * @param valueList The value or list of values to (not)select
+ * @param operator if regular expressions are used
+ * @param searchType Determines where the search begins ("relative" or "absolute")
+ */
+ public void gdSelectValue(String valueList, String operator,
+ final String searchType) {
+ gdSelectValue(valueList, String.valueOf(VALUE_SEPARATOR), operator,
+ searchType);
+ }
+
+ /**
+ * Selects a value from the list of the combobox
+ *
+ * @param valueList
+ * the item(s) which should be (not)selected.
+ * @param separator
+ * The seperator if <code>text</code> is an enumeration of
+ * values. Not supported by this implementation class
+ * @param operator
+ * if regular expressions are used
+ * @param searchType
+ * Determines where the search begins ("relative" or "absolute")
+ */
+ private void gdSelectValue(String valueList, String separator,
+ String operator, final String searchType) {
+ String[] values = split(valueList, separator);
+ getCBAdapter().select(values, operator, searchType);
+
+ }
+
+ /**
+ * Verifies if the combobox has <code>index</code> selected.
+ * @param index The index to verify
+ * @param isSelected If the index should be selected or not.
+ */
+ public void gdVerifySelectedIndex(String index, boolean isSelected) {
+ int implIdx = IndexConverter.toImplementationIndex(
+ IndexConverter.intValue(index));
+ int actual = getCBAdapter().getSelectedIndex();
+ Verifier.equals(implIdx, actual, isSelected);
+ }
+
+ /**
+ * Verifies if the passed text is currently selected in the combobox.
+ * @param text The text to verify.
+ */
+ public void gdVerifyText(String text) {
+ gdVerifyText(text, MatchUtil.DEFAULT_OPERATOR);
+ }
+
+ /**
+ * Splits the enumeration of values.
+ *
+ * @param values
+ * The values to split
+ * @param separator
+ * The separator, may be <code>null</code>
+ * @return The array of values
+ */
+ private String[] split(String values, String separator) {
+ String[] list = StringParsing.splitToArray(values, ((separator == null)
+ || (separator.length() == 0) ? INDEX_LIST_SEP_CHAR
+ : separator.charAt(0)),
+ TestDataConstants.ESCAPE_CHAR_DEFAULT);
+ return list;
+ }
+
+}
Oops, something went wrong.

0 comments on commit 87dcf31

Please sign in to comment.