Esempio n. 1
0
 def checkForOpenDialogs(self):
     User.idle()
     topwins = wx.GetTopLevelWindows()
     if len(topwins) > 1:
         for win in topwins:
             title = win.GetTitle()
             if title != u'Chandler':
                 self.report(False, '%s window is still open at end of test' % title)
             if title == 'Recurring event change':
                 proxy = getattr(win, 'proxy', None)
                 if proxy is not None:
                     self.report(False, 'Proxy contents: item title=%s, buffer=%s' %
                                (proxy.proxiedItem.displayName, proxy.changeBuffer[0]['args']))
Esempio n. 2
0
 def checkForOpenDialogs(self):
     User.idle()
     topwins = wx.GetTopLevelWindows()
     if len(topwins) > 1:
         for win in topwins:
             title = win.GetTitle()
             if title != u'Chandler':
                 self.report(
                     False,
                     '%s window is still open at end of test' % title)
             if title == 'Recurring event change':
                 proxy = getattr(win, 'proxy', None)
                 if proxy is not None:
                     self.report(
                         False, 'Proxy contents: item title=%s, buffer=%s' %
                         (proxy.proxiedItem.displayName,
                          proxy.changeBuffer[0]['args']))
Esempio n. 3
0
    def startTest(self):

        # creation
        testView = QAUITestAppLib.UITestView(self.logger)
        # make user collection, since only user
        # collections can be displayed as a calendar
        col = QAUITestAppLib.UITestItem("Collection", self.logger)
        # name and then select collection
        col.SetDisplayName(uw("testCalView"))
        sb = QAUITestAppLib.App_ns.sidebar
        User.emulate_sidebarClick(sb, uw("testCalView"))

        # action
        # switch to calendar view
        testView.SwitchToCalView()
        # double click in the calendar view => event creation or selection
        ev = testView.DoubleClickInCalView()
        QAUITestAppLib.scripting.User.emulate_typing(uw("Writing tests"))
        QAUITestAppLib.scripting.User.emulate_return()

        # verification
        # check the detail view of the created event
        ev.Check_DetailView({"displayName": uw("Writing tests")})
 def startTest(self):
 
     # creation
     testView = QAUITestAppLib.UITestView(self.logger)
     # make user collection, since only user
     # collections can be displayed as a calendar
     col = QAUITestAppLib.UITestItem("Collection", self.logger)
     #name and then select collection
     col.SetDisplayName(uw("testCalView"))
     sb = QAUITestAppLib.App_ns.sidebar
     User.emulate_sidebarClick(sb, uw('testCalView'))
     
     # action
     # switch to calendar view
     testView.SwitchToCalView()       
     # double click in the calendar view => event creation or selection
     ev = testView.DoubleClickInCalView()         
     QAUITestAppLib.scripting.User.emulate_typing(uw("Writing tests"))
     QAUITestAppLib.scripting.User.emulate_return()
     
     # verification
     # check the detail view of the created event
     ev.Check_DetailView({"displayName":uw("Writing tests")})
Esempio n. 5
0
import tools.QAUITestAppLib as QAUITestAppLib
from osaf.framework.blocks.Block import Block
from osaf.framework.scripting import User
from application import schema

# Test Phase: Initialization
logger = QAUITestAppLib.QALogger("PerfLargeDataQuickEntry.log", "QuickEntry")

try:
    testView = QAUITestAppLib.UITestView(logger)

    block = Block.findBlockByName("ApplicationBarQuickEntry")
    quickEntryWidget = block.widget
    quickEntryWidget.SetFocus()

    User.emulate_typing("Dinner at 7 pm tomorrow night")

    # XXX I'd really just like to be able to call User.emulate_return() in the
    # XXX timed part below, but for some reason it does not work.
    keyEvent = wx.KeyEvent()
    keyEvent.m_keyCode = wx.WXK_RETURN
    keyEvent.arguments = {'sender': block}
    mainView = schema.ns("osaf.views.main",
                         wx.GetApp().UIRepositoryView).MainView

    # Time how long it takes to create the event starting from pressing ENTER
    logger.Start("Quick entry")
    mainView.onQuickEntryEvent(keyEvent)  # XXX See above
    User.idle()
    logger.Stop()
from osaf.framework.blocks.Block import Block
from osaf.framework.scripting import User
from application import schema

# Test Phase: Initialization
logger = QAUITestAppLib.QALogger("PerfLargeDataQuickEntry.log",
                                 "QuickEntry")

try:
    testView = QAUITestAppLib.UITestView(logger)

    block = Block.findBlockByName("ApplicationBarQuickEntry")
    quickEntryWidget = block.widget
    quickEntryWidget.SetFocus()

    User.emulate_typing("Dinner at 7 pm tomorrow night")

    # XXX I'd really just like to be able to call User.emulate_return() in the
    # XXX timed part below, but for some reason it does not work.
    keyEvent = wx.KeyEvent()
    keyEvent.m_keyCode = wx.WXK_RETURN
    keyEvent.arguments = {'sender': block}
    mainView = schema.ns("osaf.views.main",
                         wx.GetApp().UIRepositoryView).MainView

    # Time how long it takes to create the event starting from pressing ENTER
    logger.Start("Quick entry")
    mainView.onQuickEntryEvent(keyEvent) # XXX See above
    User.idle()
    logger.Stop()