Title: [commits] (grant) [11114] Use scripting's emulate_menu_accelerator() in TestNewItem.py
Revision
11114
Author
grant
Date
2006-07-10 18:28:37 -0700 (Mon, 10 Jul 2006)

Log Message

Use scripting's emulate_menu_accelerator() in TestNewItem.py

... instead of hard-coding the CPIA event cmd-n is bound to.

Modified Paths

Diff

Modified: trunk/chandler/tools/QATestScripts/Functional/TestNewItem.py (11113 => 11114)

--- trunk/chandler/tools/QATestScripts/Functional/TestNewItem.py	2006-07-10 23:15:11 UTC (rev 11113)
+++ trunk/chandler/tools/QATestScripts/Functional/TestNewItem.py	2006-07-11 01:28:37 UTC (rev 11114)
@@ -31,11 +31,8 @@
     # ... idle() so the app can handle changes
     QAUITestAppLib.scripting.User.idle()
 
-    # ... Create a new item (For some reason, calling
-    # scripting.User.emulate_typing() didn't correctly
-    # simulate a control/cmd-n here)
-    QAUITestAppLib.App_ns.MainView.onNewItemEvent(
-       QAUITestAppLib.App_ns.NewItemItem.event)
+    # ... Create a new item, by simulating cmd-n
+    QAUITestAppLib.scripting.User.emulate_menu_accelerator("n")
     
     # ... wait again so the app can refresh
     QAUITestAppLib.scripting.User.idle()

Modified: trunk/chandler/tools/cats/Functional/TestNewItem.py (11113 => 11114)

--- trunk/chandler/tools/cats/Functional/TestNewItem.py	2006-07-10 23:15:11 UTC (rev 11113)
+++ trunk/chandler/tools/cats/Functional/TestNewItem.py	2006-07-11 01:28:37 UTC (rev 11114)
@@ -30,11 +30,8 @@
             # ... idle() so the app can handle changes
             QAUITestAppLib.scripting.User.idle()
         
-            # ... Create a new item (For some reason, calling
-            # scripting.User.emulate_typing() didn't correctly
-            # simulate a control/cmd-n here)
-            QAUITestAppLib.App_ns.MainView.onNewItemEvent(
-               QAUITestAppLib.App_ns.NewItemItem.event)
+            # ... Create a new item, by simulating cmd-n
+            QAUITestAppLib.scripting.User.emulate_menu_accelerator("n")
             
             # ... wait again so the app can refresh
             QAUITestAppLib.scripting.User.idle()




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to