[orca] Work on getting Orca's regression tests for Java up-to-date.
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Work on getting Orca's regression tests for Java up-to-date.
- Date: Thu, 22 Apr 2010 21:48:11 +0000 (UTC)
commit 3f0e6f01b0745cac04fbc5ae9cefc80f329d2860
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Thu Apr 22 17:44:42 2010 -0400
Work on getting Orca's regression tests for Java up-to-date.
test/harness/runone.sh | 2 +-
test/keystrokes/java/role_accel_label.py | 75 +++--
test/keystrokes/java/role_check_box.py | 42 ++-
test/keystrokes/java/role_check_menu_item.py | 19 +-
test/keystrokes/java/role_combo_box.py | 210 ++++++------
test/keystrokes/java/role_dialog.py | 82 +++---
test/keystrokes/java/role_menu.py | 148 ++++++---
test/keystrokes/java/role_page_tab.py | 138 +++++---
test/keystrokes/java/role_push_button.py | 100 +++---
test/keystrokes/java/role_radio_button.py | 278 +++++++++-------
test/keystrokes/java/role_radio_menu_item.py | 299 ++++++++++-------
test/keystrokes/java/role_table.py | 262 ++++++++++------
test/keystrokes/java/role_tree.py | 458 +++++++++++++++-----------
13 files changed, 1244 insertions(+), 869 deletions(-)
---
diff --git a/test/harness/runone.sh b/test/harness/runone.sh
index ba7bd87..5c4d8c1 100755
--- a/test/harness/runone.sh
+++ b/test/harness/runone.sh
@@ -80,7 +80,7 @@ if [ -f $PARAMS_FILE ]
then
if [ "x$JDK_DEMO_DIR" == "x" ]
then
- JDK_DEMO_DIR="/usr/share/doc/sun-java6-jdk/demo"
+ JDK_DEMO_DIR="/usr/jdk/latest/demo"
fi
TEST_DIR=`dirname $1`
source $PARAMS_FILE
diff --git a/test/keystrokes/java/role_accel_label.py b/test/keystrokes/java/role_accel_label.py
index 818448e..1731937 100644
--- a/test/keystrokes/java/role_accel_label.py
+++ b/test/keystrokes/java/role_accel_label.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of accelerator labels in Java's SwingSet2.
-"""
+"""Test of accelerator labels in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -15,54 +15,69 @@ sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
sequence.append(PauseAction(5000))
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("F10"))
sequence.append(WaitForFocus("File", acc_role=pyatspi.ROLE_MENU))
+sequence.append(utils.AssertPresentationAction(
+ "1. F10 for File menu",
+ ["KNOWN ISSUE - Sometimes more of the hierarchy is included in the braille; other times it is not. This applies to all tests here.",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane File Menu'",
+ " VISIBLE: 'File Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane File Menu'",
+ " VISIBLE: 'File Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane'",
+ " VISIBLE: 'RootPane', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 frame Swing demo menu bar menu bar File menu'",
+ "SPEECH OUTPUT: 'root pane'"]))
+
########################################################################
-# TODO: This seems to be wrong.
-# When the "About" menu item gets focus, the following should be
-# presented in speech and braille:
+# Down Arrow to the About menu item
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu About'
-# VISIBLE: 'About', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'About'
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("About", acc_role=pyatspi.ROLE_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "2. Arrow Down",
+ ["BUG? - Too chatty.",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar About'",
+ " VISIBLE: 'About', cursor=1",
+ "SPEECH OUTPUT: 'Swing demo menu bar menu bar File menu About'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech and braille:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: ' popup menu'
-# SPEECH OUTPUT: 'About'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: '1 of 5'
-# SPEECH OUTPUT: ''
-
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "3. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar About'",
+ " VISIBLE: 'About', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Swing demo menu bar menu bar File menu About 1 of 5.'",
+ "SPEECH OUTPUT: 'B'",
+ "SPEECH OUTPUT: 'Find out about the SwingSet2 application'"]))
########################################################################
-# TODO: This seems to be wrong.
-# When the "Exit" menu item gets focus, the following should be
-# presented in speech and braille:
+# Down Arrow to the Exit menu item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu Exit'
-# VISIBLE: 'Exit', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Exit'
-
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Exit", acc_role=pyatspi.ROLE_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "4. Arrow Down",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Exit'",
+ " VISIBLE: 'Exit', cursor=1",
+ "SPEECH OUTPUT: 'Exit'"]))
########################################################################
# Return SwingSet2 to begining state.
sequence.append(KeyComboAction("Escape"))
-sequence.append(PauseAction(5000))
+# Just a little extra wait to let some events get through.
+#
+sequence.append(PauseAction(3000))
+
+sequence.append(utils.AssertionSummaryAction())
sequence.start()
diff --git a/test/keystrokes/java/role_check_box.py b/test/keystrokes/java/role_check_box.py
index 008370a..402e010 100644
--- a/test/keystrokes/java/role_check_box.py
+++ b/test/keystrokes/java/role_check_box.py
@@ -67,6 +67,7 @@ sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("Radio Buttons", acc_role=pyatspi.ROLE_PAGE_TAB))
sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("Check Boxes", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(PauseAction(5000))
##########################################################################
# Tab into check boxes container
@@ -78,8 +79,7 @@ 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'"]))
+ "SPEECH OUTPUT: 'Text CheckBoxes panel One check box not checked'"]))
########################################################################
# Do a basic "Where Am I" via KP_Enter.
@@ -91,8 +91,7 @@ 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: ''"]))
+ "SPEECH OUTPUT: 'Text CheckBoxes One check box not checked'"]))
########################################################################
# Now, change its state.
@@ -103,8 +102,12 @@ 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'",
+ ["BUG? - Why are we presenting the state twice?",
+ "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",
+ "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'",
"SPEECH OUTPUT: 'checked'"]))
########################################################################
@@ -117,8 +120,7 @@ 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: ''"]))
+ "SPEECH OUTPUT: 'Text CheckBoxes One check box checked'"]))
########################################################################
# Change the state back and move on to a few more check boxes. The
@@ -130,8 +132,12 @@ 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'",
+ ["BUG? - Why are we presenting the state twice?",
+ "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",
+ "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'",
"SPEECH OUTPUT: 'not checked'"]))
sequence.append(KeyComboAction("Tab"))
@@ -149,8 +155,7 @@ 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'"]))
+ "SPEECH OUTPUT: 'Image CheckBoxes panel One check box not checked'"]))
########################################################################
# Do a basic "Where Am I" via KP_Enter.
@@ -162,8 +167,7 @@ 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: ''"]))
+ "SPEECH OUTPUT: 'Image CheckBoxes One check box not checked'"]))
########################################################################
# Change the state back and move on to a few more check boxes. The
@@ -175,8 +179,12 @@ 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'",
+ ["BUG? - Why are we presenting the state twice?",
+ "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",
+ "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'",
"SPEECH OUTPUT: 'checked'"]))
sequence.append(utils.StartRecordingAction())
@@ -185,8 +193,12 @@ 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'",
+ ["BUG? - Why are we presenting the state twice?",
+ "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",
+ "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'",
"SPEECH OUTPUT: 'not checked'"]))
sequence.append(KeyComboAction("Tab"))
@@ -214,6 +226,8 @@ sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
sequence.append(TypeAction(" "))
+# Just a little extra wait to let some events get through.
+#
sequence.append(PauseAction(3000))
sequence.append(utils.AssertionSummaryAction())
diff --git a/test/keystrokes/java/role_check_menu_item.py b/test/keystrokes/java/role_check_menu_item.py
index 41f08ab..f3af40c 100644
--- a/test/keystrokes/java/role_check_menu_item.py
+++ b/test/keystrokes/java/role_check_menu_item.py
@@ -16,9 +16,13 @@ sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
sequence.append(PauseAction(5000))
+# Hack to deal with a timing issue which seems to interfere with our
+# setting the locusOfFocus reliably.
+sequence.append(KeyComboAction("Tab"))
+sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
+
sequence.append(KeyComboAction("F10"))
sequence.append(WaitForFocus("File", acc_role=pyatspi.ROLE_MENU))
-
sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("Look & Feel", acc_role=pyatspi.ROLE_MENU))
sequence.append(KeyComboAction("Right"))
@@ -37,7 +41,6 @@ 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'"]))
########################################################################
@@ -51,7 +54,6 @@ 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'"]))
########################################################################
@@ -64,7 +66,7 @@ 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: 'Enable Drag Support check box not checked.'",
"SPEECH OUTPUT: 'D'",
"SPEECH OUTPUT: 'Enable or disable drag support'"]))
@@ -89,8 +91,7 @@ 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'"]))
+ "SPEECH OUTPUT: 'Swing demo menu bar menu bar Options menu Enable Drag Support check box checked'"]))
########################################################################
# Do a basic "Where Am I" via KP_Enter.
@@ -102,7 +103,7 @@ 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: 'Enable Drag Support check box checked.'",
"SPEECH OUTPUT: 'D'",
"SPEECH OUTPUT: 'Enable or disable drag support'"]))
@@ -111,7 +112,9 @@ sequence.append(utils.AssertPresentationAction(
#
sequence.append(TypeAction(" "))
-sequence.append(PauseAction(5000))
+# Just a little extra wait to let some events get through.
+#
+sequence.append(PauseAction(3000))
sequence.append(utils.AssertionSummaryAction())
diff --git a/test/keystrokes/java/role_combo_box.py b/test/keystrokes/java/role_combo_box.py
index f936fe6..e14f96f 100644
--- a/test/keystrokes/java/role_combo_box.py
+++ b/test/keystrokes/java/role_combo_box.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of combo boxes in Java's SwingSet2.
-"""
+"""Test of combo boxes in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -58,66 +58,64 @@ sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("ComboBox Demo", acc_role=pyatspi.ROLE_PAGE_TAB))
##########################################################################
-# Expected output when focusing over first combo box
+# Focusing over first combo box
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Presets: Philip, Howard, Jeff Combo'
-# VISIBLE: 'Philip, Howard, Jeff Combo', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Presets: Philip, Howard, Jeff combo box'
-
-
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Philip, Howard, Jeff",
acc_role=pyatspi.ROLE_COMBO_BOX))
-
+sequence.append(utils.AssertPresentationAction(
+ "1. focusing over first combo box",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Philip, Howard, Jeff Combo'",
+ " VISIBLE: 'Presets: Philip, Howard, Jeff Co', cursor=10",
+ "SPEECH OUTPUT: 'ComboBox Demo page Presets: Philip, Howard, Jeff combo box'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'Presets:'
-# SPEECH OUTPUT: 'combo box'
-# SPEECH OUTPUT: 'Philip, Howard, Jeff'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "2. basic Where Am I",
+ ["BUG? - Missing the item count. See bug 483212",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Philip, Howard, Jeff Combo'",
+ " VISIBLE: 'Presets: Philip, Howard, Jeff Co', cursor=10",
+ "SPEECH OUTPUT: 'Presets: combo box Philip, Howard, Jeff'"]))
##########################################################################
-# Bring up combo box list by pressing space, the following should be
-# in output:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo ComboPhilip, Howard, JeffPresets: PopupMenu ScrollPane Viewport List Philip, Howard, Jeff Label'
-# VISIBLE: 'Philip, Howard, Jeff Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Philip, Howard, Jeff label unselected'
-
+# Bring up combo box list by pressing space
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(" "))
-
+sequence.append(utils.AssertPresentationAction(
+ "3. Expand combo box",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Philip, Howard, Jeff Combo'",
+ " VISIBLE: 'Presets: Philip, Howard, Jeff Co', cursor=10",
+ "SPEECH OUTPUT: 'Philip, Howard, Jeff'"]))
##########################################################################
# Arrow down to next list item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo ComboHoward, Scott, HansPresets: PopupMenu ScrollPane Viewport List Jeff, Larry, Philip Label'
-# VISIBLE: 'Jeff, Larry, Philip Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Jeff, Larry, Philip label unselected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Jeff, Larry, Philip", acc_role=pyatspi.ROLE_LABEL))
+sequence.append(utils.AssertPresentationAction(
+ "4. Arrow Down",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Jeff, Larry, Philip Combo'",
+ " VISIBLE: 'Presets: Jeff, Larry, Philip Com', cursor=10",
+ "SPEECH OUTPUT: 'Jeff, Larry, Philip'"]))
##########################################################################
# Arrow down to next list item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo ComboPhilip, Jeff, HansPresets: PopupMenu ScrollPane Viewport List Howard, Scott, Hans Label'
-# VISIBLE: 'Howard, Scott, Hans Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Howard, Scott, Hans label unselected'
-
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Howard, Scott, Hans", acc_role=pyatspi.ROLE_LABEL))
+sequence.append(utils.AssertPresentationAction(
+ "5. Arrow Down",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Howard, Scott, Hans Combo'",
+ " VISIBLE: 'Presets: Howard, Scott, Hans Com', cursor=10",
+ "SPEECH OUTPUT: 'Howard, Scott, Hans'"]))
########################################################################
# [[[BUG 483212: Missing significant information when performing where am i on combo box items]]]
@@ -126,132 +124,142 @@ sequence.append(WaitForFocus("Howard, Scott, Hans", acc_role=pyatspi.ROLE_LABEL)
#
# SPEECH OUTPUT: 'Howard, Scott, Hans'
# SPEECH OUTPUT: 'label'
-
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "6. basic Where Am I",
+ ["BUG? - Missing the item count. See bug 483212",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Howard, Scott, Hans Combo'",
+ " VISIBLE: 'Presets: Howard, Scott, Hans Com', cursor=10",
+ "SPEECH OUTPUT: 'Presets: combo box Howard, Scott, Hans'"]))
##########################################################################
# Arrow down to next list item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo ComboPhilip, Jeff, HansPresets: PopupMenu ScrollPane Viewport List Philip, Jeff, Hans Label'
-# VISIBLE: 'Philip, Jeff, Hans Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Philip, Jeff, Hans label selected'
-
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Philip, Jeff, Hans", acc_role=pyatspi.ROLE_LABEL))
+sequence.append(utils.AssertPresentationAction(
+ "7. Arrow Down",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Philip, Jeff, Hans Combo'",
+ " VISIBLE: 'Presets: Philip, Jeff, Hans Comb', cursor=10",
+ "SPEECH OUTPUT: 'Philip, Jeff, Hans'"]))
##########################################################################
# Press return to close list and select current item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Presets: Philip, Jeff, Hans Combo'
-# VISIBLE: 'Philip, Jeff, Hans Combo', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Presets: Philip, Jeff, Hans combo box'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Return"))
+sequence.append(utils.AssertPresentationAction(
+ "8. Collapse combo box",
+ ["KNOWN ISSUE - Orca often doesn't speak when Return is used to collapse a combo box; this is not limited to Java."]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'Presets:'
-# SPEECH OUTPUT: 'combo box'
-# SPEECH OUTPUT: 'Philip, Jeff, Hans'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "9. basic Where Am I",
+ ["BUG? - Missing the item count. See bug 483212",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Philip, Jeff, Hans Combo'",
+ " VISIBLE: 'Presets: Philip, Jeff, Hans Comb', cursor=10",
+ "SPEECH OUTPUT: 'Presets: combo box Philip, Jeff, Hans'"]))
##########################################################################
# Bring up combo box list by pressing space, the following should be
# in output:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo ComboPhilip, Jeff, HansPresets: PopupMenu ScrollPane Viewport List Philip, Jeff, Hans Label'
-# VISIBLE: 'Philip, Jeff, Hans Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Philip, Jeff, Hans label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+ "10. Expand combo box",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Philip, Jeff, Hans Combo'",
+ " VISIBLE: 'Presets: Philip, Jeff, Hans Comb', cursor=10",
+ "SPEECH OUTPUT: 'Philip, Jeff, Hans'"]))
##########################################################################
# Arrow up to previous list item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo ComboHoward, Scott, HansPresets: PopupMenu ScrollPane Viewport List Howard, Scott, Hans Label'
-# VISIBLE: 'Howard, Scott, Hans Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Howard, Scott, Hans label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitForFocus("Howard, Scott, Hans", acc_role=pyatspi.ROLE_LABEL))
+sequence.append(utils.AssertPresentationAction(
+ "11. Arrow Up",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Howard, Scott, Hans Combo'",
+ " VISIBLE: 'Presets: Howard, Scott, Hans Com', cursor=10",
+ "SPEECH OUTPUT: 'Howard, Scott, Hans'"]))
##########################################################################
# Arrow up to previous list item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Combo
-# Box Demo TabList ComboBox Demo ComboJeff, Larry, PhilipPresets: PopupMenu ScrollPane Viewport List Jeff, Larry, Philip Label'
-# VISIBLE: 'Jeff, Larry, Philip Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Jeff, Larry, Philip label unselected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitForFocus("Jeff, Larry, Philip", acc_role=pyatspi.ROLE_LABEL))
+sequence.append(utils.AssertPresentationAction(
+ "12. Arrow Up",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Jeff, Larry, Philip Combo'",
+ " VISIBLE: 'Presets: Jeff, Larry, Philip Com', cursor=10",
+ "SPEECH OUTPUT: 'Jeff, Larry, Philip'"]))
##########################################################################
# Arrow up to previous list item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo ComboPhilip, Howard, JeffPresets: PopupMenu ScrollPane Viewport List Philip, Howard, Jeff Label'
-# VISIBLE: 'Philip, Howard, Jeff Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Philip, Howard, Jeff label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitForFocus("Philip, Howard, Jeff", acc_role=pyatspi.ROLE_LABEL))
+sequence.append(utils.AssertPresentationAction(
+ "13. Arrow Up",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Presets: Philip, Howard, Jeff Combo'",
+ " VISIBLE: 'Presets: Philip, Howard, Jeff Co', cursor=10",
+ "SPEECH OUTPUT: 'Philip, Howard, Jeff'"]))
##########################################################################
# Press return to close list and select current item.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Presets: Philip, Howard, Jeff Combo'
-# VISIBLE: 'Philip, Howard, Jeff Combo', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Presets: Philip, Howard, Jeff combo box'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Return"))
+sequence.append(utils.AssertPresentationAction(
+ "14. Collapse combo box",
+ ["KNOWN ISSUE - Orca often doesn't speak when Return is used to collapse a combo box; this is not limited to Java."]))
##########################################################################
# Tab to next combo box.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Hair: Philip Combo'
-# VISIBLE: 'Philip Combo', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Hair: Philip combo box'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Philip", acc_role=pyatspi.ROLE_COMBO_BOX))
+sequence.append(utils.AssertPresentationAction(
+ "15. Tab to next combo box",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Hair: Philip Combo'",
+ " VISIBLE: 'Hair: Philip Combo', cursor=7",
+ "SPEECH OUTPUT: 'Hair: Philip combo box'"]))
##########################################################################
# Tab to next combo box.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Eyes & Nose: Howard Combo'
-# VISIBLE: 'Howard Combo', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Eyes & Nose: Howard combo box'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Howard", acc_role=pyatspi.ROLE_COMBO_BOX))
+sequence.append(utils.AssertPresentationAction(
+ "16. Tab to next combo box",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Eyes & Nose: Howard Combo'",
+ " VISIBLE: 'Eyes & Nose: Howard Combo', cursor=14",
+ "SPEECH OUTPUT: 'Eyes & Nose: Howard combo box'"]))
##########################################################################
# Tab to next combo box.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Mouth: Jeff Combo'
-# VISIBLE: 'Jeff Combo', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Mouth: Jeff combo box'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Jeff", acc_role=pyatspi.ROLE_COMBO_BOX))
-
+sequence.append(utils.AssertPresentationAction(
+ "17. Tab to next combo box",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ComboBox Demo TabList ComboBox Demo Page Mouth: Jeff Combo'",
+ " VISIBLE: 'Mouth: Jeff Combo', cursor=8",
+ "SPEECH OUTPUT: 'Mouth: Jeff combo box'"]))
##########################################################################
# Tab back up to starting state
diff --git a/test/keystrokes/java/role_dialog.py b/test/keystrokes/java/role_dialog.py
index 18e0987..e852eb6 100644
--- a/test/keystrokes/java/role_dialog.py
+++ b/test/keystrokes/java/role_dialog.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of dialogs in Java's SwingSet2.
-"""
+"""Test of dialogs in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -59,64 +59,56 @@ sequence.append(WaitForFocus("Option Pane Demo", acc_role=pyatspi.ROLE_PAGE_TAB)
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Show Input Dialog", acc_role=pyatspi.ROLE_PUSH_BUTTON))
-sequence.append(TypeAction(" "))
-
-########################################################################
-# [[[BUG 483213: Braille does not output unrelated text when a dialog pops up]]]
-# Expected output when "Input" dialog is activated
-#
-# BRAILLE LINE: 'SwingSet2 Application Input Dialog'
-# VISIBLE: 'Input Dialog', cursor=1
-#
-# SPEECH OUTPUT: 'Input What is your favorite movie?'
-# sequence.append(WaitForWindowActivate("Input",None))
########################################################################
-# Expected output when the text input field gets focus.
+# Dialog is activated
#
-# BRAILLE LINE: 'SwingSet2 Application Input Dialog RootPane LayeredPane OptionPane $l'
-# VISIBLE: ' $l', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'text '
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TEXT))
+sequence.append(utils.AssertPresentationAction(
+ "1. Dialog is activated",
+ ["BRAILLE LINE: 'SwingSet2 Application Input Dialog'",
+ " VISIBLE: 'Input Dialog', cursor=1",
+ "BRAILLE LINE: ' $l'",
+ " VISIBLE: ' $l', cursor=1",
+ "SPEECH OUTPUT: 'Input What is your favorite movie?'",
+ "SPEECH OUTPUT: 'text '"]))
########################################################################
# Type the best movie ever, and press return.
+#
+sequence.append(PauseAction(3000))
sequence.append(TypeAction("RoboCop"))
+sequence.append(PauseAction(3000))
sequence.append(KeyComboAction("Return"))
########################################################################
-# [[[BUG 483213: Braille does not output unrelated text when a dialog pops up]]]
-# Expected output when "Message" dialog gets activated.
-#
-# BRAILLE LINE: 'SwingSet2 Application Message Dialog'
-# VISIBLE: 'Message Dialog', cursor=1
-#
-# SPEECH OUTPUT: 'Message RoboCop: That was a pretty good movie!'
-# sequence.append(WaitForWindowActivate("Message",None))
-
-########################################################################
# Expected output when "OK" button gets focus.
#
-# BRAILLE LINE: 'SwingSet2 Application Message Dialog RootPane LayeredPane Alert OK Button'
-# VISIBLE: 'OK Button', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'OK button'
+sequence.append(utils.StartRecordingAction())
sequence.append(WaitForFocus("OK", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+ "2. OK button gains focus",
+ ["BUG? - We don't always present anything here. Need to investigate.",
+ "BRAILLE LINE: 'SwingSet2 Application Message Dialog RootPane LayeredPane Alert OK Button'",
+ " VISIBLE: 'OK Button', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 frame 1 unfocused dialog'",
+ "SPEECH OUTPUT: 'Option Pane Demo tab list Option Pane Demo page Show Input Dialog button'",
+ "SPEECH OUTPUT: 'Message RoboCop: That was a pretty good movie!'",
+ "SPEECH OUTPUT: 'OK button'"]))
########################################################################
-# TODO: Is where am i giving enough?
-# 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: 'OK'
-# SPEECH OUTPUT: 'button'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "3. Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application Message Dialog RootPane LayeredPane Alert OK Button'",
+ " VISIBLE: 'OK Button', cursor=1",
+ "SPEECH OUTPUT: 'OK button'"]))
########################################################################
# Press return to close dialog.
@@ -140,8 +132,12 @@ sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
-sequence.append(TypeAction (" "))
+sequence.append(TypeAction(" "))
+# Just a little extra wait to let some events get through.
+#
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
diff --git a/test/keystrokes/java/role_menu.py b/test/keystrokes/java/role_menu.py
index 58fcc0a..0b9e35d 100644
--- a/test/keystrokes/java/role_menu.py
+++ b/test/keystrokes/java/role_menu.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of menus in Java's SwingSet2.
-"""
+"""Test of menus in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -16,95 +16,135 @@ sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
# Wait for entire window to get populated.
sequence.append(PauseAction(5000))
-sequence.append(KeyComboAction("<Alt>f"))
+# Hack to deal with a timing issue which seems to interfere with our
+# setting the locusOfFocus reliably.
+sequence.append(KeyComboAction("Tab"))
+sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
##########################################################################
-# Expected output when File menu is invoked.
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane File Menu'
-# VISIBLE: 'File Menu', cursor=1
+# Open File menu
#
-# SPEECH OUTPUT: 'Swing demo menu bar menu bar'
-# SPEECH OUTPUT: 'File menu'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt>f"))
sequence.append(WaitForFocus("File", acc_role=pyatspi.ROLE_MENU))
+sequence.append(utils.AssertPresentationAction(
+ "1. Open File menu",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane File Menu'",
+ " VISIBLE: 'File Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane File Menu'",
+ " VISIBLE: 'File Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu About'",
+ " VISIBLE: 'About', cursor=1",
+ "SPEECH OUTPUT: 'Swing demo menu bar menu bar File menu'",
+ "SPEECH OUTPUT: 'About'"]))
########################################################################
-# [[[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:
+# Basic Where Am I
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+ "2. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu About'",
+ " VISIBLE: 'About', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame About 1 of 5.'",
+ "SPEECH OUTPUT: 'B'",
+ "SPEECH OUTPUT: 'Find out about the SwingSet2 application'"]))
##########################################################################
-# Expected output when Look & Feel menu is in focus.
+# Move to Look & Feel menu
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Look & Feel Menu'
-# VISIBLE: 'Look & Feel Menu', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Look & Feel menu'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("Look & Feel", acc_role=pyatspi.ROLE_MENU))
+sequence.append(utils.AssertPresentationAction(
+ "3. Move to Look & Feel menu",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Look & Feel Menu'",
+ " VISIBLE: 'Look & Feel Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Look & Feel Menu'",
+ " VISIBLE: 'Look & Feel Menu', cursor=1",
+ "SPEECH OUTPUT: 'Swing demo menu bar menu bar Look & Feel menu'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
+# Basic Where Am I
#
-# SPEECH OUTPUT: 'Swing demo menu bar menu bar'
-# SPEECH OUTPUT: 'Look & Feel'
-# SPEECH OUTPUT: 'menu'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+ "4. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Look & Feel Menu'",
+ " VISIBLE: 'Look & Feel Menu', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Swing demo menu bar menu bar Look & Feel menu 2 of 5.'",
+ "SPEECH OUTPUT: 'L'",
+ "SPEECH OUTPUT: 'Menu that allows Look & Feel switching'"]))
##########################################################################
-# Expected output when Themes menu is in focus.
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Themes Menu'
-# VISIBLE: 'Themes Menu', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Themes menu'
+# Move to Themes menu
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("Themes", acc_role=pyatspi.ROLE_MENU))
+sequence.append(utils.AssertPresentationAction(
+ "5. Move to Themes menu",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Look & Feel Menu'",
+ " VISIBLE: 'Look & Feel Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Themes Menu'",
+ " VISIBLE: 'Themes Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Themes Menu'",
+ " VISIBLE: 'Themes Menu', cursor=1",
+ "SPEECH OUTPUT: 'Themes menu'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
+# Basic Where Am I
#
-# SPEECH OUTPUT: 'Swing demo menu bar menu bar'
-# SPEECH OUTPUT: 'Themes'
-# SPEECH OUTPUT: 'menu'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+ "6. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Themes Menu'",
+ " VISIBLE: 'Themes Menu', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Swing demo menu bar menu bar Themes menu 3 of 5.'",
+ "SPEECH OUTPUT: 'T'",
+ "SPEECH OUTPUT: 'Menu to switch Metal color themes'"]))
##########################################################################
-# Expected output when Themes menu is in focus.
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Audio Menu'
-# VISIBLE: 'Audio Menu', cursor=1
+# Move to Audio menu
#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Audio menu'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Audio", acc_role=pyatspi.ROLE_MENU))
+sequence.append(utils.AssertPresentationAction(
+ "7. Move to Audio menu",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Audio Menu'",
+ " VISIBLE: 'Audio Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Audio Menu'",
+ " VISIBLE: 'Audio Menu', cursor=1",
+ "SPEECH OUTPUT: 'Audio menu'"]))
########################################################################
-# [[[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:
+# Basic Where Am I
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "8. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Audio Menu'",
+ " VISIBLE: 'Audio Menu', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Swing demo menu bar menu bar Themes menu Audio menu 1 of 9.'",
+ "SPEECH OUTPUT: 'A'",
+ "SPEECH OUTPUT: 'Menu to switch the amount of auditory feedback available within the Java look and feel'"]))
# Leave menus.
sequence.append(KeyComboAction("Escape"))
-sequence.append(PauseAction(5000))
+# Just a little extra wait to let some events get through.
+#
+sequence.append(PauseAction(3000))
+
+sequence.append(utils.AssertionSummaryAction())
sequence.start()
diff --git a/test/keystrokes/java/role_page_tab.py b/test/keystrokes/java/role_page_tab.py
index fde882d..11fca85 100644
--- a/test/keystrokes/java/role_page_tab.py
+++ b/test/keystrokes/java/role_page_tab.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of page tabs in Java's SwingSet2.
-"""
+"""Test of page tabs in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -64,103 +64,133 @@ sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Bottom", acc_role=pyatspi.ROLE_RADIO_BUTTON))
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Right", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-sequence.append(KeyComboAction("Tab"))
########################################################################
# Expected output when "Laine" tab gets focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Laine'
-# VISIBLE: 'Laine', cursor=1
-#
-# SPEECH OUTPUT: 'Laine tab list'
-# SPEECH OUTPUT: 'Laine page'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Laine", acc_role=pyatspi.ROLE_PAGE_TAB))
-sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+ "1. Move to Laine tab",
+ ["BUG? - Seems extra chatty",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Laine Page'",
+ " VISIBLE: 'Laine Page', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Laine TabList'",
+ " VISIBLE: 'Laine TabList', cursor=1",
+ "SPEECH OUTPUT: 'Laine tab list Laine page'",
+ "SPEECH OUTPUT: 'Laine tab list'"]))
########################################################################
# Expected output when "Ewan" tab gets focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Ewan'
-# VISIBLE: 'Ewan', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Ewan page'
-sequence.append(WaitForFocus("Ewan", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Right"))
+sequence.append(WaitForFocus("Ewan", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+ "2. Move to Ewan tab",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Ewan Page'",
+ " VISIBLE: 'Ewan Page', cursor=1",
+ "SPEECH OUTPUT: 'Ewan page'"]))
########################################################################
# Expected output when "Hania" tab gets focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Hania'
-# VISIBLE: 'Hania', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Hania page'
-sequence.append(WaitForFocus("Hania", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Right"))
+sequence.append(WaitForFocus("Hania", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+ "3. Move to Hania tab",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Hania Page'",
+ " VISIBLE: 'Hania Page', cursor=1",
+ "SPEECH OUTPUT: 'Hania page'"]))
########################################################################
# Expected output when "Bouncing Babies!" tab gets focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo <html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html>'
-# VISIBLE: '<html><font color=blue><bold><ce', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: '<html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html> page'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("<html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html>", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+ "4. Move to Bouncing Babies! tab",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page <html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html> Page'",
+ " VISIBLE: '<html><font color=blue><bold><ce', cursor=1",
+ "SPEECH OUTPUT: '<html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html> page'"]))
########################################################################
-# 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: 'tab list'
-# SPEECH OUTPUT: '<html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html> page'
-# SPEECH OUTPUT: '4 of 4'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "5. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page <html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html> Page'",
+ " VISIBLE: '<html><font color=blue><bold><ce', cursor=1",
+ "SPEECH OUTPUT: 'tab list <html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html> page 4 of 4'"]))
+
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitForFocus("Hania", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+ "6. Back to Hania tab",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Hania Page'",
+ " VISIBLE: 'Hania Page', cursor=1",
+ "SPEECH OUTPUT: 'Hania page'"]))
########################################################################
-# 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: 'tab list'
-# SPEECH OUTPUT: 'Hania page'
-# SPEECH OUTPUT: '3 of 4'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "7. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Hania Page'",
+ " VISIBLE: 'Hania Page', cursor=1",
+ "SPEECH OUTPUT: 'tab list Hania page 3 of 4'"]))
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitForFocus("Ewan", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+ "8. Back to Ewan tab",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Ewan Page'",
+ " VISIBLE: 'Ewan Page', cursor=1",
+ "SPEECH OUTPUT: 'Ewan page'"]))
########################################################################
-# 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: 'tab list'
-# SPEECH OUTPUT: 'Ewan page'
-# SPEECH OUTPUT: '2 of 4'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "9. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Ewan Page'",
+ " VISIBLE: 'Ewan Page', cursor=1",
+ "SPEECH OUTPUT: 'tab list Ewan page 2 of 4'"]))
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitForFocus("Laine", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+ "10. Back to Laine tab",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Laine Page'",
+ " VISIBLE: 'Laine Page', cursor=1",
+ "SPEECH OUTPUT: 'Laine page'"]))
########################################################################
-# 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: 'tab list'
-# SPEECH OUTPUT: 'Laine page'
-# SPEECH OUTPUT: '1 of 4'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "11. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane TabbedPane Demo TabList TabbedPane Demo Page Laine Page'",
+ " VISIBLE: 'Laine Page', cursor=1",
+ "SPEECH OUTPUT: 'tab list Laine page 1 of 4'"]))
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TEXT))
@@ -169,6 +199,10 @@ sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
sequence.append(TypeAction (" "))
+# Just a little extra wait to let some events get through.
+#
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
diff --git a/test/keystrokes/java/role_push_button.py b/test/keystrokes/java/role_push_button.py
index df8e1c0..396a176 100644
--- a/test/keystrokes/java/role_push_button.py
+++ b/test/keystrokes/java/role_push_button.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of push buttons in Java's SwingSet2.
-"""
+"""Test of push buttons in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -58,93 +58,95 @@ sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Button Demo", acc_role=pyatspi.ROLE_PAGE_TAB))
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Buttons", acc_role=pyatspi.ROLE_PAGE_TAB))
-
-##########################################################################
-# Tab through the buttons.
-#
-
-##########################################################################
-# Text buttons
+sequence.append(PauseAction(5000))
##########################################################################
# Expected output when focusing over first button.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Buttons TabList Buttons Text Buttons Panel One Button'
-# VISIBLE: 'One Button', cursor=1
-#
-# SPEECH OUTPUT: 'Text Buttons panel'
-# SPEECH OUTPUT: 'One button'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("One ", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+ "1. Move to One button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Buttons TabList Buttons Page Text Buttons Panel One Button'",
+ " VISIBLE: 'One Button', cursor=1",
+ "SPEECH OUTPUT: 'Buttons page Text Buttons panel One button'"]))
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'One'
-# SPEECH OUTPUT: 'button'
-# SPEECH OUTPUT: ''
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+ "2. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Buttons TabList Buttons Page Text Buttons Panel One Button'",
+ " VISIBLE: 'One Button', cursor=1",
+ "SPEECH OUTPUT: 'One button'"]))
##########################################################################
# Expected output when focusing over second button.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Buttons TabList Buttons Text Buttons Panel Two Button'
-# VISIBLE: 'Two Button', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Two button'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Two", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+ "3. Move to Two button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Buttons TabList Buttons Page Text Buttons Panel Two Button'",
+ " VISIBLE: 'Two Button', cursor=1",
+ "SPEECH OUTPUT: 'Two button'"]))
##########################################################################
# Expected output when focusing over third button.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Buttons TabList Buttons Text Buttons Panel
-# Three! Button'
-# VISIBLE: '
-# Three! Button', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: '
-# Three! button'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("<html><font size=2 color=red><bold>Three!</font></html>", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+ "4. Move to Three button",
+ ["BUG? - What's up with the extra whitespace in the speech?",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Buttons TabList Buttons Page Text Buttons Panel Three! Button'",
+ " VISIBLE: 'Three! Button', cursor=1",
+ "SPEECH OUTPUT: '",
+"Three! button'"]))
##########################################################################
# Image buttons
##########################################################################
# Expected output when focusing over first image button.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Buttons TabList Buttons Image Buttons Panel Button'
-# VISIBLE: 'Button', cursor=1
-#
-# SPEECH OUTPUT: 'Image Buttons panel'
-# SPEECH OUTPUT: 'button'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+ "5. Move to first image button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Buttons TabList Buttons Page Image Buttons Panel Button'",
+ " VISIBLE: 'Button', cursor=1",
+ "SPEECH OUTPUT: 'Image Buttons panel button'"]))
##########################################################################
# Expected output when focusing over second image button.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Buttons TabList Buttons Image Buttons Panel Button'
-# VISIBLE: 'Button', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'button'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+ "6. Move to second image button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Buttons TabList Buttons Page Image Buttons Panel Button'",
+ " VISIBLE: 'Button', cursor=1",
+ "SPEECH OUTPUT: 'button'"]))
##########################################################################
# Expected output when focusing over third image button.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Buttons TabList Buttons Image Buttons Panel Button'
-# VISIBLE: 'Button', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'button'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+ "7. Move to third image button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Buttons TabList Buttons Page Image Buttons Panel Button'",
+ " VISIBLE: 'Button', cursor=1",
+ "SPEECH OUTPUT: 'button'"]))
##########################################################################
# Wrap around tabbing to top left toggle button.
@@ -169,6 +171,10 @@ sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
sequence.append(TypeAction (" "))
+# Just a little extra wait to let some events get through.
+#
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
diff --git a/test/keystrokes/java/role_radio_button.py b/test/keystrokes/java/role_radio_button.py
index 8ff6a9c..beee4ea 100644
--- a/test/keystrokes/java/role_radio_button.py
+++ b/test/keystrokes/java/role_radio_button.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of radio buttons in Java's SwingSet2.
-"""
+"""Test of radio buttons in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -64,22 +64,19 @@ sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Buttons", acc_role=pyatspi.ROLE_PAGE_TAB))
sequence.append(KeyComboAction("Right"))
sequence.append(WaitForFocus("Radio Buttons", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(PauseAction(5000))
##########################################################################
# Tab into check boxes container
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
-
-########################################################################
-# Expected output when radio button comes into focus.
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Text Radio Buttons Panel & y Radio One RadioButton'
-# VISIBLE: '& y Radio One RadioButton', cursor=1
-#
-# SPEECH OUTPUT: 'Text Radio Buttons panel'
-# SPEECH OUTPUT: 'Radio One selected radio button'
sequence.append(WaitForFocus("Radio One ", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+ "1. Move to Radio One radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons & y Radio One RadioButton'",
+ " VISIBLE: '& y Radio One RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Text Radio Buttons panel Radio One not selected radio button'"]))
########################################################################
# Expected output when radio button is selected.
@@ -88,173 +85,212 @@ sequence.append(TypeAction(" "))
# VISIBLE: '&=y Radio One RadioButton', cursor=1
#
# SPEECH OUTPUT: 'selected'
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
-sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+ "2. Select the focused radio button",
+ ["BUG? - Why are we presenting the state twice?",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio One RadioButton'",
+ " VISIBLE: '&=y Radio One RadioButton', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio One RadioButton'",
+ " VISIBLE: '&=y Radio One RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'selected'",
+ "SPEECH OUTPUT: 'selected'"]))
########################################################################
-# TODO: "selected"?"
# Expected output when radio button comes into focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Text Radio Buttons Panel &=y Radio Two RadioButton'
-# VISIBLE: '&=y Radio Two RadioButton', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Radio Two selected radio button'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Radio Two", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+ "3. Move to Radio Two radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons & y Radio Two RadioButton'",
+ " VISIBLE: '& y Radio Two RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Radio Two not selected radio button'"]))
########################################################################
# Expected output when radio button is selected.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Text Radio Buttons Panel &=y Radio Two RadioButton'
-# VISIBLE: '&=y Radio Two RadioButton', cursor=1
-#
-# SPEECH OUTPUT: 'selected'
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
-sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+ "4. Select the focused radio button",
+ ["BUG? - Why are we presenting the state twice?",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Two RadioButton'",
+ " VISIBLE: '&=y Radio Two RadioButton', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Two RadioButton'",
+ " VISIBLE: '&=y Radio Two RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'selected'",
+ "SPEECH OUTPUT: 'selected'"]))
########################################################################
# Expected output when radio button comes into focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Text Radio Buttons Panel & y Radio Three RadioButton'
-# VISIBLE: '& y Radio Three RadioButton', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Radio Three selected radio button'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Radio Three", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-sequence.append(TypeAction(" "))
-
+sequence.append(utils.AssertPresentationAction(
+ "5. Move to Radio Three radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons & y Radio Three RadioButton'",
+ " VISIBLE: '& y Radio Three RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Radio Three not selected radio button'"]))
+
########################################################################
# Expected output when radio button is selected.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Text Radio Buttons Panel &=y Radio Three RadioButton'
-# VISIBLE: '&=y Radio Three RadioButton', cursor=1
-#
-# SPEECH OUTPUT: 'selected'
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
-sequence.append(KeyComboAction("Tab"))
-
+sequence.append(utils.AssertPresentationAction(
+ "6. Select the focused radio button",
+ ["BUG? - Why are we presenting the state twice?",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Three RadioButton'",
+ " VISIBLE: '&=y Radio Three RadioButton', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Three RadioButton'",
+ " VISIBLE: '&=y Radio Three RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'selected'",
+ "SPEECH OUTPUT: 'selected'"]))
+
########################################################################
# Expected output when radio button comes into focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Image Radio Buttons Panel & y Radio One RadioButton'
-# VISIBLE: '& y Radio One RadioButton', cursor=1
-#
-# SPEECH OUTPUT: 'Image Radio Buttons panel'
-# SPEECH OUTPUT: 'Radio One not selected radio button'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Radio One ", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-
+sequence.append(utils.AssertPresentationAction(
+ "7. Move to Radio One radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons & y Radio One RadioButton'",
+ " VISIBLE: '& y Radio One RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Image Radio Buttons panel Radio One not selected radio button'"]))
+
########################################################################
-# TODO: "3 of 3"?
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
-# SPEECH OUTPUT: 'Image Radio Buttons'
-# SPEECH OUTPUT: 'Radio One radio button'
-# SPEECH OUTPUT: 'not selected'
-# SPEECH OUTPUT: '3 of 3'
-# SPEECH OUTPUT: ''
+# Basic Where Am I
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(TypeAction(" "))
-
+sequence.append(utils.AssertPresentationAction(
+ "8. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons & y Radio One RadioButton'",
+ " VISIBLE: '& y Radio One RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Image Radio Buttons Radio One radio button not selected 3 of 3'"]))
+
########################################################################
# Expected output when radio button is selected.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Image Radio Buttons Panel &=y Radio One RadioButton'
-# VISIBLE: '&=y Radio One RadioButton', cursor=1
-#
-# SPEECH OUTPUT: 'selected'
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "9. Select the focused radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio One RadioButton'",
+ " VISIBLE: '&=y Radio One RadioButton', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio One RadioButton'",
+ " VISIBLE: '&=y Radio One RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'selected'",
+ "SPEECH OUTPUT: 'selected'"]))
+
########################################################################
-# TODO: "3 of 3"?
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
-# SPEECH OUTPUT: 'Image Radio Buttons'
-# SPEECH OUTPUT: 'Radio One radio button'
-# SPEECH OUTPUT: 'selected'
-# SPEECH OUTPUT: '3 of 3'
+# Basic Where Am I
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(KeyComboAction("Tab"))
-
+sequence.append(utils.AssertPresentationAction(
+ "10. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio One RadioButton'",
+ " VISIBLE: '&=y Radio One RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Image Radio Buttons Radio One radio button selected 3 of 3'"]))
+
########################################################################
# Expected output when radio button comes into focus.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Image Radio Buttons Panel &=y Radio Two RadioButton'
-# VISIBLE: '&=y Radio Two RadioButton', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Radio Two selected radio button'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Radio Two", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-
+sequence.append(utils.AssertPresentationAction(
+ "11. Move to Radio Two radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons & y Radio Two RadioButton'",
+ " VISIBLE: '& y Radio Two RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Radio Two not selected radio button'"]))
+
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
-#
-# SPEECH OUTPUT: 'Image Radio Buttons'
-# SPEECH OUTPUT: 'Radio Two radio button'
-# SPEECH OUTPUT: 'not selected'
-# SPEECH OUTPUT: '2 of 3'
-# SPEECH OUTPUT: ''
+# Basic Where Am I
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(TypeAction(" "))
-
+sequence.append(utils.AssertPresentationAction(
+ "12. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons & y Radio Two RadioButton'",
+ " VISIBLE: '& y Radio Two RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Image Radio Buttons Radio Two radio button not selected 2 of 3'"]))
+
########################################################################
# Expected output when radio button is selected.
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Image Radio Buttons Panel &=y Radio Two RadioButton'
-# VISIBLE: '&=y Radio Two RadioButton', cursor=1
-#
-# SPEECH OUTPUT: 'selected'
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "13. Select the focused radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Two RadioButton'",
+ " VISIBLE: '&=y Radio Two RadioButton', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Two RadioButton'",
+ " VISIBLE: '&=y Radio Two RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'selected'",
+ "SPEECH OUTPUT: 'selected'"]))
+
########################################################################
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented in speech:
-# SPEECH OUTPUT: 'Image Radio Buttons'
-# SPEECH OUTPUT: 'Radio Two radio button'
-# SPEECH OUTPUT: 'selected'
-# SPEECH OUTPUT: '2 of 3'
-# 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(KeyComboAction("Tab"))
-
+sequence.append(utils.AssertPresentationAction(
+ "14. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Two RadioButton'",
+ " VISIBLE: '&=y Radio Two RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Image Radio Buttons Radio Two radio button selected 2 of 3'"]))
+
########################################################################
# Expected output when radio button comes into focus.
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Image Radio Buttons Panel & y Radio Three RadioButton'
-# VISIBLE: '& y Radio Three RadioButton', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Radio Three not selected radio button'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Radio Three", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-sequence.append(TypeAction(" "))
-
+sequence.append(utils.AssertPresentationAction(
+ "15. Move to Radio Three radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons & y Radio Three RadioButton'",
+ " VISIBLE: '& y Radio Three RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'Radio Three not selected radio button'"]))
+
########################################################################
# Expected output when radio button is selected.
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Radio Buttons TabList Radio Buttons Image Radio Buttons Panel &=y Radio Three RadioButton'
-# VISIBLE: '&=y Radio Three RadioButton', cursor=1
-#
-# SPEECH OUTPUT: 'selected'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "16. Select the focused radio button",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Three RadioButton'",
+ " VISIBLE: '&=y Radio Three RadioButton', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Three RadioButton'",
+ " VISIBLE: '&=y Radio Three RadioButton', cursor=1",
+ "SPEECH OUTPUT: 'selected'",
+ "SPEECH OUTPUT: 'selected'"]))
+
# Tab back up to begining
sequence.append(KeyComboAction("Tab"))
-
sequence.append(WaitForFocus("Paint Border", acc_role=pyatspi.ROLE_CHECK_BOX))
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Paint Focus", acc_role=pyatspi.ROLE_CHECK_BOX))
@@ -273,8 +309,10 @@ sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TEXT))
sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
-sequence.append(TypeAction (" "))
-
+# Just a little extra wait to let some events get through.
+#
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
diff --git a/test/keystrokes/java/role_radio_menu_item.py b/test/keystrokes/java/role_radio_menu_item.py
index 82c10de..5126856 100644
--- a/test/keystrokes/java/role_radio_menu_item.py
+++ b/test/keystrokes/java/role_radio_menu_item.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of radio menu items in Java's SwingSet2.
-"""
+"""Test of radio menu items in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -21,209 +21,274 @@ sequence.append(KeyComboAction("<Alt>t"))
sequence.append(WaitForFocus("Audio", acc_role=pyatspi.ROLE_MENU))
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Fonts", acc_role=pyatspi.ROLE_MENU))
-sequence.append(KeyComboAction("Down"))
+sequence.append(PauseAction(5000))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu &=y Ocean RadioItem'
-# VISIBLE: '&=y Ocean RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Ocean selected radio menu item'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Ocean", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "1. Down Arrow to Ocean",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Fonts Menu'",
+ " VISIBLE: 'Fonts Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar &=y Ocean RadioItem'",
+ " VISIBLE: '&=y Ocean RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Ocean selected radio menu item'"]))
########################################################################
# Do a basic "Where Am I" via KP_Enter.
-#
-# SPEECH OUTPUT: ' popup menu'
-# SPEECH OUTPUT: 'Ocean'
-# SPEECH OUTPUT: 'radio menu item'
-# SPEECH OUTPUT: 'selected'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: '3 of 9'
-# SPEECH OUTPUT: ''
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+ "2. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar &=y Ocean RadioItem'",
+ " VISIBLE: '&=y Ocean RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Swing demo menu bar menu bar Themes menu Ocean radio menu item selected 3 of 9.'",
+ "SPEECH OUTPUT: 'O'",
+ "SPEECH OUTPUT: 'The Ocean Metal Theme'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Steel RadioItem'
-# VISIBLE: '& y Steel RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Steel not selected radio menu item'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Steel", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "3. Down Arrow to Steel",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Steel RadioItem'",
+ " VISIBLE: '& y Steel RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Steel not selected radio menu item'"]))
########################################################################
# Do a basic "Where Am I" via KP_Enter.
-#
-# SPEECH OUTPUT: ' popup menu'
-# SPEECH OUTPUT: 'Steel'
-# SPEECH OUTPUT: 'radio menu item'
-# SPEECH OUTPUT: 'not selected'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: '4 of 9'
-# SPEECH OUTPUT: ''
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
-sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+ "4. Basic Where Am I",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Steel RadioItem'",
+ " VISIBLE: '& y Steel RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Swing demo menu bar menu bar Themes menu Steel radio menu item not selected 4 of 9.'",
+ "SPEECH OUTPUT: 'S'",
+ "SPEECH OUTPUT: 'The blue/purple Metal Theme'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Aqua RadioItem'
-# VISIBLE: '& y Aqua RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Aqua not selected radio menu item'
-sequence.append(WaitForFocus("Aqua", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
+sequence.append(WaitForFocus("Aqua", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "5. Down Arrow to Aqua",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Aqua RadioItem'",
+ " VISIBLE: '& y Aqua RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Aqua not selected radio menu item'"]))
-##########################################################################
+#########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Charcoal RadioItem'
-# VISIBLE: '& y Charcoal RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Charcoal not selected radio menu item'
-sequence.append(WaitForFocus("Charcoal", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
+sequence.append(WaitForFocus("Charcoal", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "6. Down Arrow to Charcoal",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Charcoal RadioItem'",
+ " VISIBLE: '& y Charcoal RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Charcoal not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y High Contrast RadioItem'
-# VISIBLE: '& y High Contrast RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'High Contrast not selected radio menu item'
-sequence.append(WaitForFocus("High Contrast", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
+sequence.append(WaitForFocus("High Contrast", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "7. Down Arrow to High Contrast",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y High Contrast RadioItem'",
+ " VISIBLE: '& y High Contrast RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'High Contrast not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Emerald RadioItem'
-# VISIBLE: '& y Emerald RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Emerald not selected radio menu item'
-sequence.append(WaitForFocus("Emerald", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
+sequence.append(WaitForFocus("Emerald", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "8. Down Arrow to Emerald",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Emerald RadioItem'",
+ " VISIBLE: '& y Emerald RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Emerald not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Ruby RadioItem'
-# VISIBLE: '& y Ruby RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Ruby not selected radio menu item'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Ruby", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
-sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+ "9. Down Arrow to Ruby",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Ruby RadioItem'",
+ " VISIBLE: '& y Ruby RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Ruby not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Emerald RadioItem'
-# VISIBLE: '& y Emerald RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Emerald not selected radio menu item'
-sequence.append(WaitForFocus("Emerald", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
+sequence.append(WaitForFocus("Emerald", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "10. Up Arrow to Emerald",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Emerald RadioItem'",
+ " VISIBLE: '& y Emerald RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Emerald not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y High Contrast RadioItem'
-# VISIBLE: '& y High Contrast RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'High Contrast not selected radio menu item'
-sequence.append(WaitForFocus("High Contrast", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
+sequence.append(WaitForFocus("High Contrast", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "11. Up Arrow to High Contrast",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y High Contrast RadioItem'",
+ " VISIBLE: '& y High Contrast RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'High Contrast not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Charcoal RadioItem'
-# VISIBLE: '& y Charcoal RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Charcoal not selected radio menu item'
-sequence.append(WaitForFocus("Charcoal", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
+sequence.append(WaitForFocus("Charcoal", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "12. Up Arrow to Charcoal",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Charcoal RadioItem'",
+ " VISIBLE: '& y Charcoal RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Charcoal not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Aqua RadioItem'
-# VISIBLE: '& y Aqua RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Aqua not selected radio menu item'
-sequence.append(WaitForFocus("Aqua", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
+sequence.append(WaitForFocus("Aqua", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "13. Up Arrow to Aqua",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Aqua RadioItem'",
+ " VISIBLE: '& y Aqua RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Aqua not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Steel RadioItem'
-# VISIBLE: '& y Steel RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Steel not selected radio menu item'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
sequence.append(WaitForFocus("Steel", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
-sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+ "14. Up Arrow to Steel",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Steel RadioItem'",
+ " VISIBLE: '& y Steel RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Steel not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item is selected.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu &=y Steel RadioItem'
-# VISIBLE: '&=y Steel RadioItem', cursor=1
-#
-# SPEECH OUTPUT: 'Steel selected radio menu item'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_MENU_ITEM, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "15. Select the radio menu item",
+ ["BUG? - Why are we speaking JInternalFrame demo? Also, some times the state of the toggle button is wrong. Need to investigate.",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar &=y Steel RadioItem'",
+ " VISIBLE: '&=y Steel RadioItem', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane ToolBar &=y ToggleButton'",
+ " VISIBLE: '&=y ToggleButton', cursor=1",
+ "SPEECH OUTPUT: 'Steel selected radio menu item'",
+ "SPEECH OUTPUT: 'JInternalFrame demo toggle button pressed'"]))
sequence.append(KeyComboAction("<Alt>t"))
-
sequence.append(WaitForFocus("Audio", acc_role=pyatspi.ROLE_MENU))
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Fonts", acc_role=pyatspi.ROLE_MENU))
-sequence.append(KeyComboAction("Down"))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Ocean RadioItem'
-# VISIBLE: '& y Ocean RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Ocean not selected radio menu item'
-sequence.append(WaitForFocus("Ocean", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
+sequence.append(WaitForFocus("Ocean", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "16. Down Arrow to Ocean",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Fonts Menu'",
+ " VISIBLE: 'Fonts Menu', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Ocean RadioItem'",
+ " VISIBLE: '& y Ocean RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Ocean not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu &=y Steel RadioItem'
-# VISIBLE: '&=y Steel RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Steel selected radio menu item'
-sequence.append(WaitForFocus("Steel", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
+sequence.append(WaitForFocus("Steel", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "17. Down Arrow to Steel",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar &=y Steel RadioItem'",
+ " VISIBLE: '&=y Steel RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Steel selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Aqua RadioItem'
-# VISIBLE: '& y Aqua RadioItem', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Aqua not selected radio menu item'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Aqua", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
-sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+ "18. Down Arrow to Aqua",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Aqua RadioItem'",
+ " VISIBLE: '& y Aqua RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Aqua not selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu &=y Steel RadioItem'
-# VISIBLE: '&=y Steel RadioItem', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Steel selected radio menu item'
-sequence.append(WaitForFocus("Steel", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
+sequence.append(WaitForFocus("Steel", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+ "19. Up Arrow to Steel",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar &=y Steel RadioItem'",
+ " VISIBLE: '&=y Steel RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Steel selected radio menu item'"]))
##########################################################################
# Expected output when radio menu item gets focused.
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane PopupMenu & y Ocean RadioItem'
-# VISIBLE: '& y Ocean RadioItem', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Ocean not selected radio menu item'
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
sequence.append(WaitForFocus("Ocean", acc_role=pyatspi.ROLE_RADIO_MENU_ITEM))
-sequence.append(TypeAction (" "))
+sequence.append(utils.AssertPresentationAction(
+ "20. Up Arrow to Ocean",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar & y Ocean RadioItem'",
+ " VISIBLE: '& y Ocean RadioItem', cursor=1",
+ "SPEECH OUTPUT: 'Ocean not selected radio menu item'"]))
+
+sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_MENU_ITEM, 5000))
-sequence.append(PauseAction(5000))
+# Just a little extra wait to let some events get through.
+#
+sequence.append(PauseAction(3000))
+
+sequence.append(utils.AssertionSummaryAction())
sequence.start()
diff --git a/test/keystrokes/java/role_table.py b/test/keystrokes/java/role_table.py
index 1c1b7b7..ffbbc87 100644
--- a/test/keystrokes/java/role_table.py
+++ b/test/keystrokes/java/role_table.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of push buttons in Java's SwingSet2.
-"""
+"""Test of push buttons in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -86,25 +86,27 @@ sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TABLE))
##########################################################################
-# Tab through the cells.
-#
-
-##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "Mike" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Right"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "1. Control Right Arrow into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "Albers" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Right"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "2. Control Right Arrow into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
########################################################################
# [[[BUG 483217: Where am i in JTable cells gives no info]]]
# Do a basic "Where Am I" via KP_Enter. The following should be
@@ -112,89 +114,134 @@ sequence.append(WaitAction("object:selection-changed", None, None,
#
# SPEECH OUTPUT: ''
# SPEECH OUTPUT: 'table'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "3. Basic Where Am I",
+ ["KNOWN ISSUE - Because of the cell problem, we think the locusOfFocus is the Table",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table'",
+ " VISIBLE: 'Table', cursor=1",
+ "SPEECH OUTPUT: 'table'"]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# TODO: Is there a keboard way to edit a combo box in a cell?
# Expected output when focus is on "Green" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Right"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "4 Control Right Arrow into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "Bazil" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Right"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "5. Control Right Arrow into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "44" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Right"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "6. Control Right Arrow into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on picture cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Right"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "7. Control Right Arrow into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on picture cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Down"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "8. Control Down Arrow into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "3" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Left"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "9. Control Left into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "Curse of the Demon" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Left"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "10. Control Left into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "Blue" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Left"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "11. Control Left into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
-# [[[BUG 483214: No output when navigating JTable with cursor]]]
# Expected output when focus is on "Andrews" cell:
#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Left"))
sequence.append(WaitAction("object:selection-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "12. Control Left into the cell",
+ ["BUG? - No output when navigating JTable with cursor. See bug 483214."]))
+
##########################################################################
# TODO: Also, we get different behavior from Swing when we edit the cell by pressing space as opposed to double clicking with the pointer, in the former the caret is not shown, and pressing return puts us in the cell below it. In the latter the caret is visible, and after pressing return focus stays on the edited cell.
# Edit a cell.
#
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(" "))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "13. Space Bar on the cell",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table Last Name ColumnHeader Andrews'",
+ " VISIBLE: 'Andrews', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Mark'",
+ " VISIBLE: 'Mark', cursor=1",
+ "SPEECH OUTPUT: 'Last Name column header Andrews'",
+ "SPEECH OUTPUT: 'First Name column header Mark'"]))
+
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(" "))
sequence.append(KeyComboAction("BackSpace"))
sequence.append(KeyComboAction("BackSpace"))
@@ -204,130 +251,158 @@ sequence.append(KeyComboAction("BackSpace"))
sequence.append(KeyComboAction("BackSpace"))
sequence.append(KeyComboAction("BackSpace"))
sequence.append(KeyComboAction("BackSpace"))
+sequence.append(utils.AssertPresentationAction(
+ "14. Remove the text in the cell.",
+ ["BUG? - We aren't told what text is being removed. I believe this is due to the lack of any_data."]))
+
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction("Andy"))
+sequence.append(utils.AssertPresentationAction(
+ "15. Type 'Andy' into the cell",
+ ["BUG? - We're not presenting anything here."]))
##########################################################################
-# TODO: Pressing return should not put us in the cell below, see todo above.
# Expected output when focus is on cell:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Beck Label'
-# VISIBLE: 'Beck Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Beck label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Return"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "16. Press Return",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Brian'",
+ " VISIBLE: 'Brian', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table Last Name ColumnHeader Beck'",
+ " VISIBLE: 'Beck', cursor=1",
+ "SPEECH OUTPUT: 'First Name column header Brian'",
+ "SPEECH OUTPUT: 'Last Name column header Beck'"]))
##########################################################################
# Expected output when focus is on cell:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Brian Label'
-# VISIBLE: 'Brian Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Brian label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "17. Press Left Arrow",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Brian'",
+ " VISIBLE: 'Brian', cursor=1",
+ "SPEECH OUTPUT: 'First Name column header Brian'"]))
+
##########################################################################
# Expected output when focus is on cell:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Mark Label'
-# VISIBLE: 'Mark Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Mark label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "18. Press Up Arrow",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Mark'",
+ " VISIBLE: 'Mark', cursor=1",
+ "SPEECH OUTPUT: 'First Name column header Mark'"]))
+
##########################################################################
# Expected output when focus is on cell:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Andy Label'
-# VISIBLE: 'Andy Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Andy label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Right"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "19. Press Right Arrow",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table Last Name ColumnHeader Andy'",
+ " VISIBLE: 'Andy', cursor=1",
+ "SPEECH OUTPUT: 'Last Name column header Andy'"]))
+
##########################################################################
-# Return cell to previuos text.
+# Return cell to previous text.
#
+sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+ "20. Press Space Bar",
+ ["BUG? - We're not presenting anything here."]))
+
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("BackSpace"))
sequence.append(KeyComboAction("BackSpace"))
sequence.append(KeyComboAction("BackSpace"))
sequence.append(KeyComboAction("BackSpace"))
sequence.append(TypeAction("ndrews "))
-
+sequence.append(utils.AssertPresentationAction(
+ "21. BackSpace over the newly-added text and type 'ndrews'",
+ ["BUG? - We're not presenting anything here."]))
+
##########################################################################
-# TODO: Pressing return should not put us in the cell below, see todo above.
# Expected output when focus is on cell:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Beck Label'
-# VISIBLE: 'Beck Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Beck label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Return"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "22. Press Return",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Brian'",
+ " VISIBLE: 'Brian', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table Last Name ColumnHeader Beck'",
+ " VISIBLE: 'Beck', cursor=1",
+ "SPEECH OUTPUT: 'First Name column header Brian'",
+ "SPEECH OUTPUT: 'Last Name column header Beck'"]))
+
##########################################################################
# Expected output when focus is on cell:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Brian Label'
-# VISIBLE: 'Brian Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Brian label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
-##########################################################################
-# Select multiple rows.
-#
-
+sequence.append(utils.AssertPresentationAction(
+ "23. Press Left Arrow",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Brian'",
+ " VISIBLE: 'Brian', cursor=1",
+ "SPEECH OUTPUT: 'First Name column header Brian'"]))
+
##########################################################################
# Expected output when row is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Mark Label'
-# VISIBLE: 'Mark Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Mark label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Shift>Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "24. Shift Up Arrow to select the row",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Mark'",
+ " VISIBLE: 'Mark', cursor=1",
+ "SPEECH OUTPUT: 'First Name column header Mark'"]))
+
##########################################################################
# Expected output when row is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo ScrollPane Viewport Table Mike Label'
-# VISIBLE: 'Mike Label', cursor=1
-#
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Mike label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Shift>Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "25. Shift Up Arrow to select the row",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Mike'",
+ " VISIBLE: 'Mike', cursor=1",
+ "SPEECH OUTPUT: 'Mike'"]))
+
########################################################################
-# [[[BUG 483217: Where am i in JTable cells gives no info]]]
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'Mike'
-# SPEECH OUTPUT: 'label'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "26. Basic Where Am I",
+ ["BUG? - Not much detail. See bug 483217.",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Table Demo TabList Table Demo Page ScrollPane Viewport Table First Name ColumnHeader Mike'",
+ " VISIBLE: 'Mike', cursor=1",
+ "SPEECH OUTPUT: 'Mike'"]))
+
##########################################################################
# Unselect rows. First select only current row, then unselect it.
@@ -338,9 +413,6 @@ sequence.append(KeyComboAction("Left"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TABLE, 5000))
-sequence.append(KeyComboAction("<Control>Space"))
-
-
##########################################################################
# Leave table.
@@ -349,8 +421,12 @@ sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TEXT))
sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
-sequence.append(TypeAction (" "))
+sequence.append(TypeAction(" "))
+# Just a little extra wait to let some events get through.
+#
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
diff --git a/test/keystrokes/java/role_tree.py b/test/keystrokes/java/role_tree.py
index c1e345f..7a1a6fa 100644
--- a/test/keystrokes/java/role_tree.py
+++ b/test/keystrokes/java/role_tree.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
-"""Test of push buttons in Java's SwingSet2.
-"""
+"""Test of push buttons in Java's SwingSet2."""
-from macaroon.playback.keypress_mimic import *
+from macaroon.playback import *
+import utils
sequence = MacroSequence()
@@ -59,97 +59,104 @@ sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TREE))
##########################################################################
-# Navigate tree.
-#
-
-##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
# Expected output when node is selected:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label'
-# VISIBLE: 'Music Label', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Music label expanded'
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "1. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree Music expanded TREE LEVEL 1'",
+ " VISIBLE: 'Music expanded TREE LEVEL 1', cursor=1",
+ "SPEECH OUTPUT: 'Music expanded tree level 1'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Classical Label'
-# VISIBLE: 'Classical Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label'
-# SPEECH OUTPUT: 'Classical label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "2. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Classical collapsed'",
+ " VISIBLE: 'Classical collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Classical collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label'
-# VISIBLE: 'Jazz Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label'
-# SPEECH OUTPUT: 'Jazz label expanded'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "3. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Jazz collapsed'",
+ " VISIBLE: 'Jazz collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Jazz collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is expanded:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label'
-# VISIBLE: 'Jazz Label', cursor=1
-# SPEECH OUTPUT: 'expanded'
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Right"))
sequence.append(WaitAction("object:state-changed:expanded", None, None,
pyatspi.ROLE_LABEL, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "4. Right Arrow in the tree",
+ ["BUG? - We're not presenting anything here. Should be told Jazz is expanded."]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Albert Ayler Label'
-# VISIBLE: 'Albert Ayler Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label'
-# SPEECH OUTPUT: 'Albert Ayler label collapsed'
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "5. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Albert Ayler collapsed'",
+ " VISIBLE: 'Albert Ayler collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Albert Ayler collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label'
-# VISIBLE: 'Chet Baker Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label'
-# SPEECH OUTPUT: 'Chet Baker label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "6. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Chet Baker collapsed'",
+ " VISIBLE: 'Chet Baker collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Chet Baker collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is expanded:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label'
-# VISIBLE: 'Chet Baker Label', cursor=1
-# SPEECH OUTPUT: 'expanded'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Right"))
sequence.append(WaitAction("object:state-changed:expanded", None, None,
pyatspi.ROLE_LABEL, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "7. Right Arrow in the tree",
+ ["BUG? - We're not presenting anything here. Should be told Chet Baker is expanded."]))
+
##########################################################################
# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
@@ -159,104 +166,139 @@ sequence.append(WaitAction("object:state-changed:expanded", None, None,
# VISIBLE: 'Sings and Plays Label', cursor=1
# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label'
# SPEECH OUTPUT: 'Sings and Plays label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "8. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Sings and Plays collapsed'",
+ " VISIBLE: 'Sings and Plays collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Sings and Plays collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label My Funny Valentine Label'
-# VISIBLE: 'My Funny Valentine Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label'
-# SPEECH OUTPUT: 'My Funny Valentine label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "9. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application My Funny Valentine collapsed'",
+ " VISIBLE: 'My Funny Valentine collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'My Funny Valentine collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label'
-# VISIBLE: 'Grey December Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label'
-# SPEECH OUTPUT: 'Grey December label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "10. Down Arrow in the tree",
+ ["BUG? - Looks like the tree is becoming the locusOfFocus. It shouldn't be.",
+ "BRAILLE LINE: 'SwingSet2 Application Grey December collapsed'",
+ " VISIBLE: 'Grey December collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Grey December collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
########################################################################
# [[[BUG 483222: Where am i in JTree nodes gives little info]]]
# Do a basic "Where Am I" via KP_Enter. The following should be
# presented:
#
-# SPEECH OUTPUT: 'Grey December'
-# SPEECH OUTPUT: 'label'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "11. Basic Where Am I",
+ ["BUG? - Little detail - see bug 483222. Also, why is the tree the locusOfFocus?",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is expanded:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label'
-# VISIBLE: 'Grey December Label', cursor=1
-# SPEECH OUTPUT: 'expanded'
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Right"))
sequence.append(WaitAction("object:state-changed:expanded", None, None,
pyatspi.ROLE_LABEL, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "12. Right Arrow in the tree",
+ ["BUG? - We're not presenting anything here. Should be told Grey December is expanded."]))
+
########################################################################
-# [[[BUG 483222: Where am i in JTree nodes gives little info]]]
-# Do a basic "Where Am I" via KP_Enter. The following should be
-# presented:
+# Do a basic "Where Am I" via KP_Enter.
#
-# SPEECH OUTPUT: 'Grey December'
-# SPEECH OUTPUT: 'label'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "13. Basic Where Am I",
+ ["BUG? - Little detail - see bug 483222. Also, why is the tree the locusOfFocus?",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'tree'"]))
+
##########################################################################
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label Grey December Label'
-# VISIBLE: 'Grey December Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label Grey December label'
-# SPEECH OUTPUT: 'Grey December label'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "14. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Grey December'",
+ " VISIBLE: 'Grey December', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Grey December'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label I Wish I Knew Label'
-# VISIBLE: 'I Wish I Knew Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label Grey December label'
-# SPEECH OUTPUT: 'I Wish I Knew label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "15. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application I Wish I Knew'",
+ " VISIBLE: 'I Wish I Knew', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'I Wish I Knew'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
-#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label Someone To Watch Over Me Label'
-# VISIBLE: 'Someone To Watch Over Me Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label Grey December label'
-# SPEECH OUTPUT: 'Someone To Watch Over Me label selected'
+#
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "16. Down Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Someone To Watch Over Me'",
+ " VISIBLE: 'Someone To Watch Over Me', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Someone To Watch Over Me'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
########################################################################
# [[[BUG 483222: Where am i in JTree nodes gives little info]]]
# Do a basic "Where Am I" via KP_Enter. The following should be
@@ -264,183 +306,221 @@ sequence.append(WaitAction("object:active-descendant-changed", None, None,
#
# SPEECH OUTPUT: 'Someone To Watch Over Me'
# SPEECH OUTPUT: 'label'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
-
+sequence.append(utils.AssertPresentationAction(
+ "17. Basic Where Am I",
+ ["BUG? - Little detail - see bug 483222. Also, why is the tree the locusOfFocus?",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'tree'"]))
+
##########################################################################
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label I Wish I Knew Label'
-# VISIBLE: 'I Wish I Knew Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label Grey December label'
-# SPEECH OUTPUT: 'I Wish I Knew label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "18. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application I Wish I Knew'",
+ " VISIBLE: 'I Wish I Knew', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'I Wish I Knew'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label Grey December Label'
-# VISIBLE: 'Grey December Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label Grey December label'
-# SPEECH OUTPUT: 'Grey December label selected'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "19. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Grey December'",
+ " VISIBLE: 'Grey December', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Grey December'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label'
-# VISIBLE: 'Grey December Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label'
-# SPEECH OUTPUT: 'Grey December label expanded'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "20. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Grey December expanded'",
+ " VISIBLE: 'Grey December expanded', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Grey December expanded'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is collaped:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Grey December Label'
-# VISIBLE: 'Grey December Label', cursor=1
-# SPEECH OUTPUT: 'collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitAction("object:state-changed:expanded", None, None,
pyatspi.ROLE_LABEL, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "21. Left Arrow in the tree",
+ ["BUG? - We're not presenting anything here. Should be told Grey December is collapsed."]))
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label My Funny Valentine Label'
-# VISIBLE: 'My Funny Valentine Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label'
-# SPEECH OUTPUT: 'My Funny Valentine label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "22. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application My Funny Valentine collapsed'",
+ " VISIBLE: 'My Funny Valentine collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'My Funny Valentine collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label Sings and Plays Label'
-# VISIBLE: 'Sings and Plays Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label Chet Baker label'
-# SPEECH OUTPUT: 'Sings and Plays label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "23. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Sings and Plays collapsed'",
+ " VISIBLE: 'Sings and Plays collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Sings and Plays collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label'
-# VISIBLE: 'Chet Baker Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label'
-# SPEECH OUTPUT: 'Chet Baker label expanded'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "24. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Chet Baker expanded'",
+ " VISIBLE: 'Chet Baker expanded', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Chet Baker expanded'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is collaped:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Chet Baker Label'
-# VISIBLE: 'Chet Baker Label', cursor=1
-# SPEECH OUTPUT: 'collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitAction("object:state-changed:expanded", None, None,
pyatspi.ROLE_LABEL, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "25. Left Arrow in the tree",
+ ["BUG? - We're not presenting anything here. Should be told Chet Baker is collapsed."]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label Albert Ayler Label'
-# VISIBLE: 'Albert Ayler Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label Jazz label'
-# SPEECH OUTPUT: 'Albert Ayler label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "26. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Albert Ayler collapsed'",
+ " VISIBLE: 'Albert Ayler collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Albert Ayler collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label'
-# VISIBLE: 'Jazz Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label'
-# SPEECH OUTPUT: 'Jazz label expanded'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "27. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Jazz expanded'",
+ " VISIBLE: 'Jazz expanded', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Jazz expanded'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is collaped:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Jazz Label'
-# VISIBLE: 'Jazz Label', cursor=1
-# SPEECH OUTPUT: 'collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(WaitAction("object:state-changed:expanded", None, None,
pyatspi.ROLE_LABEL, 5000))
+sequence.append(utils.AssertPresentationAction(
+ "28. Left Arrow in the tree",
+ ["BUG? - We're not presenting anything here. Should be told Jazz is collapsed."]))
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label Classical Label'
-# VISIBLE: 'Classical Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page Music label'
-# SPEECH OUTPUT: 'Classical label collapsed'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-
+sequence.append(utils.AssertPresentationAction(
+ "29. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application Classical collapsed'",
+ " VISIBLE: 'Classical collapsed', cursor=1",
+ "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree'",
+ " VISIBLE: 'Tree', cursor=1",
+ "SPEECH OUTPUT: 'Classical collapsed'",
+ "SPEECH OUTPUT: 'SwingSet2 frame Tree Demo tab list Tree Demo page tree'"]))
+
##########################################################################
-# [[[BUG 483219: JTree nodes don't show expanded or collapsed in braille]]]
-# [[[BUG 483221: When traversing jtree nodes the entire context is announced again and again]]]
# Expected output when node is selected:
#
-# BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo ScrollPane Viewport Tree Music Label'
-# VISIBLE: 'Music Label', cursor=1
-# SPEECH OUTPUT: 'SwingSet2 application SwingSet2 frame Tree Demo tab list Tree Demo page'
-# SPEECH OUTPUT: 'Music label expanded'
+sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitAction("object:active-descendant-changed", None, None,
pyatspi.ROLE_TREE, 5000))
-sequence.append(KeyComboAction("Tab"))
-
+sequence.append(utils.AssertPresentationAction(
+ "30. Up Arrow in the tree",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Tree Demo TabList Tree Demo Page ScrollPane Viewport Tree Music expanded TREE LEVEL 1'",
+ " VISIBLE: 'Music expanded TREE LEVEL 1', cursor=1",
+ "SPEECH OUTPUT: 'Music expanded tree level 1'"]))
+
##########################################################################
# Leave tree
#
+sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TEXT))
+
sequence.append(KeyComboAction("Tab"))
# Toggle the top left button, to return to normal state.
-sequence.append(TypeAction (" "))
+sequence.append(TypeAction(" "))
+# Just a little extra wait to let some events get through.
+#
sequence.append(PauseAction(3000))
+sequence.append(utils.AssertionSummaryAction())
+
sequence.start()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]