Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 234195 Details for
Bug 414672
New SWT table actions (Checking checked-state of checkboxes in first column)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch adding new table actions
0006-Add-new_table_actions_verify_checkboxes.patch (text/plain), 7.81 KB, created by
Jan Philipp Wiegmann
on 2013-08-08 10:37:55 EDT
(
hide
)
Description:
Patch adding new table actions
Filename:
MIME Type:
Creator:
Jan Philipp Wiegmann
Created:
2013-08-08 10:37:55 EDT
Size:
7.81 KB
patch
obsolete
>From adccb488f2d3530deb5e105dc89d86ddbc982e16 Mon Sep 17 00:00:00 2001 >From: Jan Wiegmann <Jan.Wiegmann@bredex.de> >Date: Wed, 7 Aug 2013 15:04:56 +0200 >Subject: [PATCH] Added table actions "Verify checkbox of Selected cell" and > "Check selection of Checkbox in Cell by Index/Value" > >--- > .../eclipse/jubula/rc/swt/tester/TableTester.java | 57 ++++++++++++++++++++++ > .../resources/xml/ComponentConfiguration.xml | 4 +- > .../toolkit/provider/swt/I18nStrings.properties | 5 +- > 3 files changed, 63 insertions(+), 3 deletions(-) > >diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java >index 5f5ef2a..5398877 100644 >--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java >+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java >@@ -23,6 +23,7 @@ import org.eclipse.jubula.rc.common.implclasses.table.Cell; > import org.eclipse.jubula.rc.common.tester.AbstractTableTester; > import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITableComponent; > import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITextInputComponent; >+import org.eclipse.jubula.rc.common.util.Verifier; > import org.eclipse.jubula.rc.swt.driver.DragAndDropHelperSwt; > import org.eclipse.jubula.rc.swt.tester.adapter.StyledTextAdapter; > import org.eclipse.jubula.rc.swt.tester.adapter.TableAdapter; >@@ -661,4 +662,60 @@ public class TableTester extends AbstractTableTester { > pressOrReleaseModifiers(dndHelper.getModifier(), false); > } > } >+ >+ /** >+ * Verifies whether the checkbox of the first selected cell in the table is checked >+ * >+ * @param checked true if checkbox in cell is selected, false otherwise >+ * @throws StepExecutionException If no cell is selected or the verification fails. >+ */ >+ public void rcVerifyCheckboxOfSelectedCell(boolean checked) >+ throws StepExecutionException { >+ Boolean checkSelected = ((Boolean)getEventThreadQueuer().invokeAndWait( >+ "rcVerifyTableCheckbox", new IRunnable() { //$NON-NLS-1$ >+ public Object run() throws StepExecutionException { >+ Cell cell = ((ITableComponent) getComponent()). >+ getSelectedCell(); >+ TableItem item = getTable().getItem(cell.getRow()); >+ return new Boolean(item.getChecked()); >+ } >+ })); >+ >+ Verifier.equals(checked, checkSelected.booleanValue()); >+ } >+ >+ /** >+ * Verifies whether the checkbox of the cell with the given >+ * <code>index</code> in the table is checked >+ * >+ * @param checked true if checkbox in cell is selected, false otherwise >+ * @param index the row-index of the cell in which the checkbox-state should be verified >+ */ >+ public void rcVerifyCheckboxByIndex(boolean checked, final int index) { >+ >+ Boolean checkIndex = ((Boolean)getEventThreadQueuer().invokeAndWait( >+ "rcVerifyTableCheckboxIndex", new IRunnable() { //$NON-NLS-1$ >+ public Object run() throws StepExecutionException { >+ return new Boolean(getTable().getItem(index). >+ getChecked()); >+ } >+ })); >+ Verifier.equals(checked, checkIndex.booleanValue()); >+ } >+ >+ /** >+ * Verifies whether the checkbox of the cell which contains the <code>value</code> in the >+ * table (first column) is checked >+ * >+ * @param checked true if checkbox in cell is selected, false otherwise >+ * @param value the value to search for in the table >+ * @param operator the Operator >+ */ >+ public void rcVerifyCheckboxByValue(boolean checked, String value, >+ String operator) { >+ >+ ITableComponent adapter = (ITableComponent) getComponent(); >+ rcVerifyCheckboxByIndex(checked, >+ adapter.getRowFromString(value, operator)); >+ } > } >diff --git a/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml b/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml >index ca99e01..0889ceb 100644 >--- a/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml >+++ b/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml >@@ -234,10 +234,10 @@ > <componentClass name="org.eclipse.swt.custom.CTabFolder" /> > </toolkitComponent> > >- <toolkitComponent type="org.eclipse.swt.widgets.Table" visible="false"> >+ <toolkitComponent type="org.eclipse.swt.widgets.Table" visible="true"> > <realizes>guidancer.concrete.Table</realizes> > <testerClass>org.eclipse.jubula.rc.swt.tester.TableTester</testerClass> >- <componentClass name="org.eclipse.swt.widgets.Table" /> >+ <componentClass name="org.eclipse.swt.widgets.Table" /> <action name="CompSystem.VerifyCheckboxOfSelectedCell" changed="1.0"> <method>rcVerifyCheckboxOfSelectedCell</method> <param name="CompSystem.Checked"> <type>java.lang.Boolean</type> <defaultValue>true</defaultValue> <valueSet> <element name="CompSystem.True" value="true"/> <element name="CompSystem.False" value="false"/> </valueSet> </param> </action> <action name="CompSystem.VerifyCheckboxOfCellByIndex" changed="1.0"> <method>rcVerifyCheckboxByIndex</method> <param name="CompSystem.Checked"> <type>java.lang.Boolean</type> <defaultValue>true</defaultValue> <valueSet> <element name="CompSystem.True" value="true"/> <element name="CompSystem.False" value="false"/> </valueSet> </param> <param name="CompSystem.IndexOnly"> <type>java.lang.Integer</type> </param> </action> <action name="CompSystem.VerifyCheckboxOfCellByValue" changed="1.0"> <method>rcVerifyCheckboxByValue</method> <param name="CompSystem.Checked"> <type>java.lang.Boolean</type> <defaultValue>true</defaultValue> <valueSet> <element name="CompSystem.True" value="true"/> <element name="CompSystem.False" value="false"/> </valueSet> </param> <param name="CompSystem.Row"> <type>java.lang.String</type> </param> <param name="CompSystem.RowOperator"> <type>java.lang.String</type> <defaultValue>equals</defaultValue> <valueSet> <element name="CompSystem.Equals" value="equals"/> <element name="CompSystem.NotEquals" value="not equals"/> <element name="CompSystem.MatchesRegExp" value="matches"/> <element name="CompSystem.SimpleMatch" value="simple match"/> </valueSet> </param> </action> > </toolkitComponent> > > <toolkitComponent type="org.eclipse.swt.widgets.Tree" observable="false"> >diff --git a/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties b/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties >index e3420d7..aa44cd9 100644 >--- a/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties >+++ b/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties >@@ -31,4 +31,7 @@ org.eclipse.swt.widgets.Link=(SWT) Link > org.eclipse.swt.widgets.Spinner=(SWT) Spinner > org.eclipse.swt.widgets.Slider=(SWT) Slider > org.eclipse.swt.widgets.Scale=(SWT) Scale >-org.eclipse.swt.widgets.DateTime=(SWT) DateTime >\ No newline at end of file >+org.eclipse.swt.widgets.DateTime=(SWT) DateTime >+CompSystem.VerifyCheckboxOfSelectedCell=Check Selection of Checkbox in Selected Cell >+CompSystem.VerifyCheckboxOfCellByIndex=Check Selection of Checkbox in Cell by Index >+CompSystem.VerifyCheckboxOfCellByValue=Check Selection of Checkbox in Cell by Value >\ No newline at end of file >-- >1.7.11 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 414672
:
234195
|
234457
|
235088