orca r3434 - in trunk: . test/keystrokes/java
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3434 - in trunk: . test/keystrokes/java
- Date: Mon, 7 Jan 2008 18:28:54 +0000 (GMT)
Author: wwalker
Date: Mon Jan 7 18:28:54 2008
New Revision: 3434
URL: http://svn.gnome.org/viewvc/orca?rev=3434&view=rev
Log:
Add test assertions to the given tests.
Modified:
trunk/ChangeLog
trunk/test/keystrokes/java/role_check_box.py
trunk/test/keystrokes/java/role_check_menu_item.py
Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Mon Jan 7 18:28:54 2008
@@ -1,5 +1,12 @@
2008-01-07 Willie Walker <william walker sun com>
+ * test/keystrokes/java/role_check_menu_item.py:
+ test/keystrokes/java/role_check_box.py:
+ Add test assertions to tests, also verifying that potential
+ bugs have been resolved.
+
+2008-01-07 Willie Walker <william walker sun com>
+
* src/orca/J2SE-access-bridge.py: Fix for bug #507886 - Orca+Space
when in Java application presents script summary debug
Modified: trunk/test/keystrokes/java/role_check_box.py
==============================================================================
--- trunk/test/keystrokes/java/role_check_box.py (original)
+++ trunk/test/keystrokes/java/role_check_box.py Mon Jan 7 18:28:54 2008
@@ -3,7 +3,8 @@
"""Test of check boxes in Java's SwingSet2.
"""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -14,7 +15,7 @@
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
# Wait for entire window to get populated.
-sequence.append(PauseAction(5000))
+sequence.append(PauseAction(10000))
##########################################################################
# Tab over to the button demo, and activate it.
@@ -70,98 +71,124 @@
##########################################################################
# Tab into check boxes container
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
-
-########################################################################
-# [[[BUG 483206: Braille output of unchecked checkbox appears as checked.]]]
-# When the "One" checkbox gets focus, the following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Check Boxes TabList Check Boxes Text CheckBoxes Panel <x> One CheckBox'
-# VISIBLE: '<x> One CheckBox', cursor=1
-#
-# SPEECH OUTPUT: 'Text CheckBoxes panel'
-# SPEECH OUTPUT: 'One check box not checked'
-
sequence.append(WaitForFocus("One ", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+ "One checkbox unchecked",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel < > One CheckBox'",
+ " VISIBLE: '< > One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'Text CheckBoxes panel'",
+ "SPEECH OUTPUT: 'One check box not checked'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'One check box'
-# SPEECH OUTPUT: 'not checked'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "One checkbox unchecked Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel < > One CheckBox'",
+ " VISIBLE: '< > One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'One check box not checked'",
+ "SPEECH OUTPUT: ''"]))
########################################################################
-# Now, change its state. The following should be presented in speech
-# and braille:
-#
-# BRAILLE LINE: 'gtk-demo Application Panes Frame Horizontal Horizontal Panel <x> Resize CheckBox'
-# VISIBLE: '<x> Resize CheckBox', cursor=1
-#
-# SPEECH OUTPUT: 'checked'
+# Now, change its state.
#
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(' '))
sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX,5000))
+sequence.append(utils.AssertPresentationAction(
+ "One checkbox checked",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel <x> One CheckBox'",
+ " VISIBLE: '<x> One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'checked'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'One check box'
-# SPEECH OUTPUT: 'checked'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "One checked Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel <x> One CheckBox'",
+ " VISIBLE: '<x> One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'One check box checked'",
+ "SPEECH OUTPUT: ''"]))
########################################################################
# Change the state back and move on to a few more check boxes. The
# presentation in speech and braille should be similar to the above.
#
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(' '))
sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "One checkbox unchecked",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel < > One CheckBox'",
+ " VISIBLE: '< > One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'not checked'"]))
+
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Two", acc_role=pyatspi.ROLE_CHECK_BOX))
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Three", acc_role=pyatspi.ROLE_CHECK_BOX))
-sequence.append(KeyComboAction("Tab"))
########################################################################
-# When the "One" checkbox gets focus, the following should be
-# presented in speech and braille:
+# Tab to the One lightbulb
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Check Boxes TabList Check Boxes Text CheckBoxes Panel <x> One CheckBox'
-# VISIBLE: '<x> One CheckBox', cursor=1
-#
-# SPEECH OUTPUT: 'Text CheckBoxes panel'
-# SPEECH OUTPUT: 'One check box not checked'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("One ", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+ "One lightbulb checkbox unchecked",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel < > One CheckBox'",
+ " VISIBLE: '< > One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'Image CheckBoxes panel'",
+ "SPEECH OUTPUT: 'One check box not checked'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'One check box'
-# SPEECH OUTPUT: 'checked'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "One lightbulb unchecked checkbox Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel < > One CheckBox'",
+ " VISIBLE: '< > One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'One check box not checked'",
+ "SPEECH OUTPUT: ''"]))
########################################################################
# Change the state back and move on to a few more check boxes. The
# presentation in speech and braille should be similar to the above.
#
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(' '))
sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "One lightbulb checkbox checked",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel <x> One CheckBox'",
+ " VISIBLE: '<x> One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'checked'"]))
+
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(' '))
sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "One lightbulb unchecked checkbox",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel < > One CheckBox'",
+ " VISIBLE: '< > One CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'not checked'"]))
+
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Two", acc_role=pyatspi.ROLE_CHECK_BOX))
sequence.append(KeyComboAction("Tab"))
@@ -185,8 +212,10 @@
sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
-sequence.append(TypeAction (" "))
+sequence.append(TypeAction(" "))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
Modified: trunk/test/keystrokes/java/role_check_menu_item.py
==============================================================================
--- trunk/test/keystrokes/java/role_check_menu_item.py (original)
+++ trunk/test/keystrokes/java/role_check_menu_item.py Mon Jan 7 18:28:54 2008
@@ -3,7 +3,8 @@
"""Test of check menu items in Java's SwingSet2.
"""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -24,105 +25,94 @@
sequence.append(WaitForFocus("Themes", acc_role=pyatspi.ROLE_MENU))
sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("Options", acc_role=pyatspi.ROLE_MENU))
-sequence.append(KeyComboAction("Down"))
########################################################################
-# When the first menu item "Enable Tool Tips" gets focus, the following
-# should be presented in speech and braille:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swingdemo menu bar MenuBar <x> Enable Tool Tips CheckItem'
-# VISIBLE: '<x> Enable Tool Tips CheckItem', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Enable Tool Tips check item checked'
+# Go Down to the Enable Tool Tips menu item
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Enable Tool Tips",
acc_role=pyatspi.ROLE_CHECK_BOX))
-sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+ "Enable Tool Tips checked check menu item",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar <x> Enable Tool Tips CheckBox'",
+ " VISIBLE: '<x> Enable Tool Tips CheckBox', cursor=1",
+ "SPEECH OUTPUT: ''",
+ "SPEECH OUTPUT: 'Enable Tool Tips check box checked'"]))
########################################################################
-# When the second menu item "Enable Drag Support" gets focus, the following
-# should be presented in speech and braille:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swingdemo menu bar MenuBar < > Enable Drag Support CheckItem'
-# VISIBLE: '< > Enable Drag Support CheckIte', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Enable Drag Support check item not checked'
+# Go Down to the Enable Drag Support menu item
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Enable Drag Support",
acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+ "Enable Drag Support unchecked menu item",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar < > Enable Drag Support CheckBox'",
+ " VISIBLE: '< > Enable Drag Support CheckBox', cursor=1",
+ "SPEECH OUTPUT: ''",
+ "SPEECH OUTPUT: 'Enable Drag Support check box not checked'"]))
########################################################################
-# [[[Bug 483208: Exception raised when performing where am I]]]
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
-#
-# SPEECH OUTPUT: ' popup menu'
-# SPEECH OUTPUT: 'Enable Drag Support'
-# SPEECH OUTPUT: 'check item'
-# SPEECH OUTPUT: 'not checked'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'item 2 of 2'
-# SPEECH OUTPUT: ''
+# Do a basic "Where Am I" via KP_Enter.
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "Enable Drag Support unchecked menu item Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar < > Enable Drag Support CheckBox'",
+ " VISIBLE: '< > Enable Drag Support CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'Enable Drag Support check box not checked'",
+ "SPEECH OUTPUT: 'D'",
+ "SPEECH OUTPUT: 'Enable or disable drag support'"]))
########################################################################
-# Check the menu item. Expected output:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swingdemo menu bar MenuBar <x> Enable Drag Support CheckItem'
-# VISIBLE: '<x> Enable Drag Support CheckIte', cursor=1
+# Check the menu item.
#
-# SPEECH OUTPUT: 'checked'
sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX, 5000))
########################################################################
-# Go directly back to the checked menu item, and uncheck it.
-
-sequence.append(KeyComboAction("<Alt>p"))
-sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_ROOT_PANE))
-sequence.append(KeyComboAction("Down"))
-
-########################################################################
-# [[[Bug 483209: Context that appears in braille differs on same item.]]]
-# Maybe because we invoked the menu with <Alt>p?
-# When the second menu item "Enable Drag Support" gets focus, the following
-# should be presented in speech and braille:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu <x> Enable Drag Support CheckItem'
-# VISIBLE: '<x> Enable Drag Support CheckIte', cursor=1
+# Go directly back to the checked menu item.
#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Enable Drag Support check item checked'
+sequence.append(KeyComboAction("<Alt>p"))
+sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Enable Drag Support",
acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+ "Enable Drag Support checked menu item",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar <x> Enable Drag Support CheckBox'",
+ " VISIBLE: '<x> Enable Drag Support CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'Swing demo menu bar menu bar Options menu'",
+ "SPEECH OUTPUT: 'Enable Drag Support check box checked'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: ' popup menu'
-# SPEECH OUTPUT: 'Enable Drag Support'
-# SPEECH OUTPUT: 'check item'
-# SPEECH OUTPUT: 'checked'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'item 2 of 2'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "Enable Drag Support checked menu item Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar <x> Enable Drag Support CheckBox'",
+ " VISIBLE: '<x> Enable Drag Support CheckBox', cursor=1",
+ "SPEECH OUTPUT: 'Enable Drag Support check box checked'",
+ "SPEECH OUTPUT: 'D'",
+ "SPEECH OUTPUT: 'Enable or disable drag support'"]))
########################################################################
-# Uncheck the menu item. Expected output:
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu < > Enable Drag Support CheckItem'
-# VISIBLE: '< > Enable Drag Support CheckIte', cursor=1
+# Uncheck the menu item.
#
-# SPEECH OUTPUT: 'not checked'
-sequence.append(TypeAction (" "))
-sequence.append(WaitAction("object:state-changed:checked", None,
- None, pyatspi.ROLE_CHECK_BOX, 5000))
+sequence.append(TypeAction(" "))
sequence.append(PauseAction(5000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]