orca r3600 - in trunk: . src/orca src/orca/scripts test/keystrokes/gtk-demo test/keystrokes/oocalc



Author: joanied
Date: Tue Feb 19 02:05:06 2008
New Revision: 3600
URL: http://svn.gnome.org/viewvc/orca?rev=3600&view=rev

Log:
* test/keystrokes/oocalc/bug_361167.py:
  test/keystrokes/gtk-demo/role_table.py:
  test/keystrokes/gtk-demo/role_column_header.py:
  test/keystrokes/gtk-demo/role_tree_table.py:
  src/orca/scripts/StarOffice.py:
  src/orca/where_am_I.py:
  Fix for bug #486897 - Where Am I doesn't present row/column
  headers.


Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/StarOffice.py
   trunk/src/orca/where_am_I.py
   trunk/test/keystrokes/gtk-demo/role_column_header.py
   trunk/test/keystrokes/gtk-demo/role_table.py
   trunk/test/keystrokes/gtk-demo/role_tree_table.py
   trunk/test/keystrokes/oocalc/bug_361167.py

Modified: trunk/src/orca/scripts/StarOffice.py
==============================================================================
--- trunk/src/orca/scripts/StarOffice.py	(original)
+++ trunk/src/orca/scripts/StarOffice.py	Tue Feb 19 02:05:06 2008
@@ -85,11 +85,51 @@
                (table.getColumnAtIndex(obj.getIndexInParent()) + 1)
         utterances.append(text)
 
+        # Speak the dynamic column header (if any).
+        #
+        if self._script.dynamicColumnHeaders.has_key(table):
+            row = self._script.dynamicColumnHeaders[table]
+            header = self._script.getDynamicRowHeaderCell(obj, row)
+            try:
+                headerText = header.queryText()
+            except:
+                headerText = None
+
+            if header.childCount > 0:
+                for child in header:
+                    text = self._script.getText(child, 0, -1)
+                    if text:
+                        utterances.append(text)
+            elif headerText:
+                text = self._script.getText(header, 0, -1)
+                if text:
+                    utterances.append(text)
+
         # Translators: this represents the row number of a table.
         #
         text = _("row %d") % (table.getRowAtIndex(obj.getIndexInParent()) + 1)
         utterances.append(text)
 
+        # Speak the dynamic row header (if any).
+        #
+        if self._script.dynamicRowHeaders.has_key(table):
+            column = self._script.dynamicRowHeaders[table]
+            header = self._script.getDynamicColumnHeaderCell(obj, column)
+            try:
+                headerText = header.queryText()
+            except:
+                headerText = None
+
+            if header.childCount > 0:
+                for child in header:
+                    text = self._script.getText(child, 0, -1)
+                    if text:
+                        utterances.append(text)
+            elif headerText:
+                text = self._script.getText(header, 0, -1)
+                if text:
+                    utterances.append(text)
+
         text = obj.queryText().getText(0, -1)
         utterances.append(text)
 

Modified: trunk/src/orca/where_am_I.py
==============================================================================
--- trunk/src/orca/where_am_I.py	(original)
+++ trunk/src/orca/where_am_I.py	Tue Feb 19 02:05:06 2008
@@ -495,34 +495,61 @@
         """Tree Tables present the following information (an example is
         'Tree table, Mike Pedersen, item 8 of 10, tree level 2'):
 
-        1. label, if any
-        2. role
-        3. current row (regardless of speak cell/row setting)
-        4. relative position
-        5. if expandable/collapsible: expanded/collapsed
-        6. if applicable, the level
+        1. parent's role
+        2. column header of object
+        3. row header of object
+        4. object's role
+        5. object's contents, if there are multiple columns
+        6. current row (regardless of speak cell/row setting), if
+           performing a detailed whereAmI.
+        7. relative position
+        8. if expandable/collapsible: expanded/collapsed
+        9. if applicable, the level
 
         Nautilus and Gaim
         """
 
-        # Speak the first two items (and possibly the position)
         utterances = []
         if obj.parent.getRole() == pyatspi.ROLE_TABLE_CELL:
             obj = obj.parent
         parent = obj.parent
 
-        text = self._getObjLabel(obj)
+        text = rolenames.getSpeechForRoleName(parent)
         utterances.append(text)
 
+        try:
+            table = parent.queryTable()
+        except:
+            table = None
+            nColumns = 0
+        else:
+            nColumns = table.nColumns
+
+            column = table.getColumnAtIndex(obj.getIndexInParent())
+            header = table.getColumnHeader(column)
+            if header:
+                text = self._getObjName(header)
+                utterances.append(text)
+
+            row = table.getRowAtIndex(obj.getIndexInParent())
+            header = table.getRowHeader(row)
+            if header:
+                text = self._getObjName(header)
+                utterances.append(text)
+
         text = rolenames.getSpeechForRoleName(obj)
         utterances.append(text)
+
+        if nColumns > 1:
+            text = self._getTableCell(obj)
+            utterances.append(text)
+
         debug.println(self._debugLevel, "first table cell utterances=%s" % \
                       utterances)
         speech.speakUtterances(utterances)
 
         utterances = []
-        if not basicOnly:
-            table = parent.queryTable()
+        if not basicOnly and table:
             row = table.getRowAtIndex(
               orca_state.locusOfFocus.getIndexInParent())
             # Translators: this in reference to a row in a table.
@@ -531,11 +558,14 @@
             utterances.append(text)
             speech.speakUtterances(utterances)
 
-        # Speak the current row
-        utterances = self._getTableRow(obj)
-        debug.println(self._debugLevel, "second table cell utterances=%s" % \
-                      utterances)
-        speech.speakUtterances(utterances)
+        # Speak the current row if performing a "detailed" whereAmI.
+        #
+        if not basicOnly:
+            utterances = self._getTableRow(obj)
+            debug.println(self._debugLevel, \
+                          "second table cell utterances=%s" % \
+                          utterances)
+            speech.speakUtterances(utterances)
 
         # Speak the remaining items.
         utterances = []

Modified: trunk/test/keystrokes/gtk-demo/role_column_header.py
==============================================================================
--- trunk/test/keystrokes/gtk-demo/role_column_header.py	(original)
+++ trunk/test/keystrokes/gtk-demo/role_column_header.py	Tue Feb 19 02:05:06 2008
@@ -109,16 +109,42 @@
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
-    "Normal cell Where Am I",
+    "Normal cell basic Where Am I",
     ["BRAILLE LINE:  'gtk-demo Application GtkListStore demo Frame ScrollPane Table Severity ColumnHeader < > Fixed? 60482 Normal scrollable notebooks and hidden tabs'",
      "     VISIBLE:  'Normal scrollable notebooks and ', cursor=1",
-     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Severity'",
      "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'Normal'",
+     "SPEECH OUTPUT: 'row 1 of 14'"]))
+
+########################################################################
+# Do a detailed "Where Am I" via KP_Enter.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Normal cell detailed Where Am I",
+    ["BRAILLE LINE:  'gtk-demo Application GtkListStore demo Frame ScrollPane Table Severity ColumnHeader < > Fixed? 60482 Normal scrollable notebooks and hidden tabs'",
+     "     VISIBLE:  'Normal scrollable notebooks and ', cursor=1",
+     "BRAILLE LINE:  'gtk-demo Application GtkListStore demo Frame ScrollPane Table Severity ColumnHeader < > Fixed? 60482 Normal scrollable notebooks and hidden tabs'",
+     "     VISIBLE:  'Normal scrollable notebooks and ', cursor=1",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Severity'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'Normal'",
+     "SPEECH OUTPUT: 'row 1 of 14'",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Severity'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'Normal'",
+     "SPEECH OUTPUT: 'row 1 of 14'",
      "SPEECH OUTPUT: 'check box not checked'",
      "SPEECH OUTPUT: '60482'",
      "SPEECH OUTPUT: 'Normal'",
-     "SPEECH OUTPUT: 'scrollable notebooks and hidden tabs'",
-     "SPEECH OUTPUT: 'row 1 of 14'"]))
+     "SPEECH OUTPUT: 'scrollable notebooks and hidden tabs'"]))
 
 ########################################################################
 # Now move to the cell to the left containing the number "60482".
@@ -163,16 +189,42 @@
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
-    "Checkbox cell Where Am I",
+    "Checkbox cell basic Where Am I",
     ["BRAILLE LINE:  'gtk-demo Application GtkListStore demo Frame ScrollPane Table Fixed? ColumnHeader < > Fixed? 60482 Normal scrollable notebooks and hidden tabs'",
      "     VISIBLE:  '< > Fixed? 60482 Normal scrollab', cursor=1",
-     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Fixed?'",
      "SPEECH OUTPUT: 'cell'",
      "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'row 1 of 14'"]))
+
+########################################################################
+# Do a detailed "Where Am I" via KP_Enter.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Checkbox cell detailed Where Am I",
+    ["BRAILLE LINE:  'gtk-demo Application GtkListStore demo Frame ScrollPane Table Fixed? ColumnHeader < > Fixed? 60482 Normal scrollable notebooks and hidden tabs'",
+     "     VISIBLE:  '< > Fixed? 60482 Normal scrollab', cursor=1",
+     "BRAILLE LINE:  'gtk-demo Application GtkListStore demo Frame ScrollPane Table Fixed? ColumnHeader < > Fixed? 60482 Normal scrollable notebooks and hidden tabs'",
+     "     VISIBLE:  '< > Fixed? 60482 Normal scrollab', cursor=1",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Fixed?'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'row 1 of 14'",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Fixed?'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'row 1 of 14'",
+     "SPEECH OUTPUT: 'check box not checked'",
      "SPEECH OUTPUT: '60482'",
      "SPEECH OUTPUT: 'Normal'",
-     "SPEECH OUTPUT: 'scrollable notebooks and hidden tabs'",
-     "SPEECH OUTPUT: 'row 1 of 14'"]))
+     "SPEECH OUTPUT: 'scrollable notebooks and hidden tabs'"]))
  
 ########################################################################
 # Close the GtkListStore demo

Modified: trunk/test/keystrokes/gtk-demo/role_table.py
==============================================================================
--- trunk/test/keystrokes/gtk-demo/role_table.py	(original)
+++ trunk/test/keystrokes/gtk-demo/role_table.py	Tue Feb 19 02:05:06 2008
@@ -71,11 +71,10 @@
     "Table Where Am I",
     ["BRAILLE LINE:  'gtk-demo Application Shopping list Frame ScrollPane Table Number ColumnHeader 3 bottles of coke'",
      "     VISIBLE:  '3 bottles of coke', cursor=1",
-     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Number'",
      "SPEECH OUTPUT: 'cell'",
      "SPEECH OUTPUT: '3'",
-     "SPEECH OUTPUT: 'bottles of coke'",
-     "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'row 1 of 5'"]))
 
 ########################################################################
@@ -104,11 +103,10 @@
     "Table Where Am I (again)",
     ["BRAILLE LINE:  'gtk-demo Application Shopping list Frame ScrollPane Table Number ColumnHeader 5'",
      "     VISIBLE:  '5', cursor=1",
-     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'table'",
+     "SPEECH OUTPUT: 'Number'",
      "SPEECH OUTPUT: 'cell'",
      "SPEECH OUTPUT: '5'",
-     "SPEECH OUTPUT: 'packages of noodles'",
-     "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'row 2 of 5'"]))
 
 ########################################################################

Modified: trunk/test/keystrokes/gtk-demo/role_tree_table.py
==============================================================================
--- trunk/test/keystrokes/gtk-demo/role_tree_table.py	(original)
+++ trunk/test/keystrokes/gtk-demo/role_tree_table.py	Tue Feb 19 02:05:06 2008
@@ -84,12 +84,50 @@
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
-    "January cell Where Am I",
-    ["BUG? - we're on the January cell",
-     "BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable'",
-     "     VISIBLE:  'TreeTable', cursor=1",
-     "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'tree table'"]))
+    "January cell basic Where Am I",
+    ["BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Holiday ColumnHeader January expanded < > Alex < > Havoc < > Tim < > Owen < > Dave TREE LEVEL 1'",
+     "     VISIBLE:  'January expanded < > Alex < > Ha', cursor=1",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Holiday'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'row 1 of 53'",
+     "SPEECH OUTPUT: 'expanded'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
+
+########################################################################
+# Do a detailed "Where Am I" via KP_Enter.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "January cell detailed Where Am I",
+    ["BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Holiday ColumnHeader January expanded < > Alex < > Havoc < > Tim < > Owen < > Dave TREE LEVEL 1'",
+     "     VISIBLE:  'January expanded < > Alex < > Ha', cursor=1",
+     "BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Holiday ColumnHeader January expanded < > Alex < > Havoc < > Tim < > Owen < > Dave TREE LEVEL 1'",
+     "     VISIBLE:  'January expanded < > Alex < > Ha', cursor=1",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Holiday'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'row 1 of 53'",
+     "SPEECH OUTPUT: 'expanded'",
+     "SPEECH OUTPUT: 'tree level 1'",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Holiday'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'row 1 of 53'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'expanded'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
 
 ########################################################################
 # Collapse the cell.
@@ -114,12 +152,50 @@
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
-    "January cell collapsed Where Am I",
-    ["BUG? - we're on the January cell",
-     "BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable'",
-     "     VISIBLE:  'TreeTable', cursor=1",
-     "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'tree table'"]))
+    "January cell collapsed basic Where Am I",
+    ["BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Holiday ColumnHeader January collapsed < > Alex < > Havoc < > Tim < > Owen < > Dave TREE LEVEL 1'",
+     "     VISIBLE:  'January collapsed < > Alex < > H', cursor=1",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Holiday'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'row 1 of 50'",
+     "SPEECH OUTPUT: 'collapsed'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
+
+########################################################################
+# Do a detailed "Where Am I" via KP_Enter.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "January cell collapsed detailed Where Am I",
+    ["BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Holiday ColumnHeader January collapsed < > Alex < > Havoc < > Tim < > Owen < > Dave TREE LEVEL 1'",
+     "     VISIBLE:  'January collapsed < > Alex < > H', cursor=1",
+     "BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Holiday ColumnHeader January collapsed < > Alex < > Havoc < > Tim < > Owen < > Dave TREE LEVEL 1'",
+     "     VISIBLE:  'January collapsed < > Alex < > H', cursor=1",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Holiday'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'row 1 of 50'",
+     "SPEECH OUTPUT: 'collapsed'",
+     "SPEECH OUTPUT: 'tree level 1'",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Holiday'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'row 1 of 50'",
+     "SPEECH OUTPUT: 'January'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'check box not checked'",
+     "SPEECH OUTPUT: 'collapsed'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
 
 ########################################################################
 # Expand the cell again.
@@ -184,18 +260,44 @@
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
-    "Alex checkbox cell Where Am I",
+    "Alex checkbox cell basic Where Am I",
     ["BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Alex ColumnHeader <x> Alex'",
      "     VISIBLE:  '<x> Alex', cursor=1",
-     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Alex'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'check box checked'",
+     "SPEECH OUTPUT: 'row 2 of 53'"]))
+
+########################################################################
+# Do a detailed "Where Am I" via KP_Enter.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Alex checkbox cell detailed Where Am I",
+    ["BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Alex ColumnHeader <x> Alex'",
+     "     VISIBLE:  '<x> Alex', cursor=1",
+     "BRAILLE LINE:  'gtk-demo Application Card planning sheet Frame ScrollPane TreeTable Alex ColumnHeader <x> Alex'",
+     "     VISIBLE:  '<x> Alex', cursor=1",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Alex'",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'check box checked'",
+     "SPEECH OUTPUT: 'row 2 of 53'",
+     "SPEECH OUTPUT: 'tree table'",
+     "SPEECH OUTPUT: 'Alex'",
      "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'check box checked'",
+     "SPEECH OUTPUT: 'row 2 of 53'",
      "SPEECH OUTPUT: 'New Years Day'",
      "SPEECH OUTPUT: 'check box checked'",
      "SPEECH OUTPUT: 'check box checked'",
      "SPEECH OUTPUT: 'check box checked'",
      "SPEECH OUTPUT: 'check box checked'",
-     "SPEECH OUTPUT: 'check box not checked'",
-     "SPEECH OUTPUT: 'row 2 of 53'"]))
+     "SPEECH OUTPUT: 'check box not checked'"]))
 
 ########################################################################
 # Change the state of the checkbox.

Modified: trunk/test/keystrokes/oocalc/bug_361167.py
==============================================================================
--- trunk/test/keystrokes/oocalc/bug_361167.py	(original)
+++ trunk/test/keystrokes/oocalc/bug_361167.py	Tue Feb 19 02:05:06 2008
@@ -6,6 +6,7 @@
 """
 
 from macaroon.playback import *
+import utils
 
 sequence = MacroSequence()
 
@@ -21,74 +22,141 @@
 sequence.append(KeyComboAction("<Control>Home"))
 
 ######################################################################
-# 3. Type Insert-r to set the dynamical column headers to the first column.
+# 3. Perform a where am I with no dynamic headers set.
 #
-# BRAILLE LINE:  'Dynamic column header set for row 1'
-# VISIBLE:  'Dynamic column header set for ro', cursor=0
-# SPEECH OUTPUT: 'Dynamic column header set for row 1'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Basic where am I with no dynamic headers set", 
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table Cell A1 '",
+     "     VISIBLE:  'Cell A1 ', cursor=1",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'column 1'",
+     "SPEECH OUTPUT: 'row 1'",
+     "SPEECH OUTPUT: ''"]))
+
+######################################################################
+# 4. Type Insert-r to set the dynamic column headers to the first column.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyPressAction (0, 106,"Insert"))      # Press Insert
 sequence.append(KeyComboAction("r"))
 sequence.append(KeyReleaseAction(150, 106,"Insert"))   # Release Insert
+sequence.append(utils.AssertPresentationAction(
+    "Set dynamic column headers",
+    ["BRAILLE LINE:  'Dynamic column header set for row 1'",
+     "     VISIBLE:  'Dynamic column header set for ro', cursor=0",
+     "SPEECH OUTPUT: 'Dynamic column header set for row 1'"]))
 
 ######################################################################
-# 4. Type Insert-c to set the dynamical row headers to the first row.
-#
-# BRAILLE LINE:  'Dynamic row header set for column A'
-# VISIBLE:  'Dynamic row header set for colum', cursor=0
-# SPEECH OUTPUT: 'Dynamic row header set for column A'
+# 5. Type Insert-c to set the dynamic row headers to the first row.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyPressAction (0, 106,"Insert"))      # Press Insert
 sequence.append(KeyComboAction("c"))
 sequence.append(KeyReleaseAction(150, 106,"Insert"))   # Release Insert
+sequence.append(utils.AssertPresentationAction(
+    "Set dynamic row headers",
+    ["BRAILLE LINE:  'Dynamic row header set for column A'",
+     "     VISIBLE:  'Dynamic row header set for colum', cursor=0",
+     "SPEECH OUTPUT: 'Dynamic row header set for column A'"]))
 
 ######################################################################
-# 5. Press the down arrow to move to cell A2.
-#
-# BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Good in Pies Good in Pies Cell A2 '
-# VISIBLE:  'Good in Pies Cell A2 ', cursor=1
-# SPEECH OUTPUT: 'Good in Pies Good in Pies A2'
+# 6. Press the down arrow to move to cell A2.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Down Arrow to cell A2",
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Good in Pies Good in Pies Cell A2 '",
+     "     VISIBLE:  'Good in Pies Cell A2 ', cursor=1",
+     "SPEECH OUTPUT: 'Good in Pies Good in Pies A2'"]))
 
 ######################################################################
-# 6. Press the right arrow to move to cell B2.
-#
-# BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Apples Yes Cell B2 '
-# VISIBLE:  'Yes Cell B2 ', cursor=1
-# SPEECH OUTPUT: 'Apples Yes B2'
+# 7. Press the right arrow to move to cell B2.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "Right Arrow to cell B2",
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Apples Yes Cell B2 '",
+     "     VISIBLE:  'Yes Cell B2 ', cursor=1",
+     "SPEECH OUTPUT: 'Apples Yes B2'"]))
 
-######################################################################
-# 7. Press the down arrow to move to cell B3.
+########################################################################
+# 8. Perform a basic where am I
 #
-# BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Juiceable Yes Cell B3 '
-# VISIBLE:  'Yes Cell B3 ', cursor=1
-# SPEECH OUTPUT: 'Juiceable Yes B3'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Basic where am I with dynamic headers set B2", 
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table Yes Cell B2 '",
+     "     VISIBLE:  'Yes Cell B2 ', cursor=1",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'column 2'",
+     "SPEECH OUTPUT: 'Apples'",
+     "SPEECH OUTPUT: 'row 2'",
+     "SPEECH OUTPUT: 'Good in Pies'",
+     "SPEECH OUTPUT: 'Yes'"]))
+
+######################################################################
+# 9. Press the down arrow to move to cell B3.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Down Arrow to cell B3",
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Juiceable Yes Cell B3 '",
+     "     VISIBLE:  'Yes Cell B3 ', cursor=1",
+     "SPEECH OUTPUT: 'Juiceable Yes B3'"]))
 
 ######################################################################
-# 8. Press the right arrow to move to cell C3.
-#
-# BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Pears Yes Cell C3 '
-# VISIBLE:  'Yes Cell C3 ', cursor=1
-# SPEECH OUTPUT: 'Pears Yes C3'
+# 11. Press the right arrow to move to cell C3.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "Right Arrow to cell C3",
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Pears Yes Cell C3 '",
+     "     VISIBLE:  'Yes Cell C3 ', cursor=1",
+     "SPEECH OUTPUT: 'Pears Yes C3'"]))
+
+########################################################################
+# 12. Perform a basic where am I
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_Enter"))
+sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Basic where am I with dynamic headers set C3", 
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table Yes Cell C3 '",
+     "     VISIBLE:  'Yes Cell C3 ', cursor=1",
+     "SPEECH OUTPUT: 'cell'",
+     "SPEECH OUTPUT: 'column 3'",
+     "SPEECH OUTPUT: 'Pears'",
+     "SPEECH OUTPUT: 'row 3'",
+     "SPEECH OUTPUT: 'Juiceable'",
+     "SPEECH OUTPUT: 'Yes'"]))
 
 ######################################################################
-# 9. Press the up arrow to move to cell C2.
+# 13. Press the up arrow to move to cell C2.
 #
 # BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Good in Pies No Cell C2 '
 # VISIBLE:  'No Cell C2 ', cursor=1
 # SPEECH OUTPUT: 'Good in Pies No C2'
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "Up Arrow to cell C2",
+    ["BRAILLE LINE:  'soffice Application fruit - OpenOffice.org Calc Frame fruit - OpenOffice.org Calc RootPane ScrollPane Document view3 Sheet Sheet1 Table  Good in Pies No Cell C2 '",
+     "     VISIBLE:  'No Cell C2 ', cursor=1",
+     "SPEECH OUTPUT: 'Good in Pies No C2'"]))
 
 ######################################################################
-# 10. Enter Alt-f, Alt-c to close the Calc spreadsheet window.
+# 14. Enter Alt-f, Alt-c to close the Calc spreadsheet window.
 #
 sequence.append(KeyComboAction("<Alt>f"))
 sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU))
@@ -100,7 +168,7 @@
                            30000))
 
 ######################################################################
-# 11. Enter Alt-f, right arrow, down arrow and Return,
+# 15. Enter Alt-f, right arrow, down arrow and Return,
 #     (File->New->Spreadsheet), to get the application back 
 #     to the state it was in when the test started.
 #
@@ -121,8 +189,10 @@
                            30000))
 
 ######################################################################
-# 12. Wait for things to get back to normal.
+# 16. Wait for things to get back to normal.
 #
 sequence.append(PauseAction(3000))
 
+sequence.append(utils.AssertionSummaryAction())
+
 sequence.start()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]