~pkunal-parmar/ubuntu-calendar-app/Minor-Performance

« back to all changes in this revision

Viewing changes to tests/autopilot/calendar_app/emulators.py

  • Committer: Nicholas Skaggs
  • Date: 2014-07-01 16:54:23 UTC
  • mto: This revision was merged to the branch mainline in revision 339.
  • Revision ID: nicholas.skaggs@canonical.com-20140701165423-34egfe9aht4yeezn
restructure yearview, add test

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    """An emulator that makes it easy to interact with the calendar-app."""
52
52
 
53
53
    @autopilot.logging.log_action(logger.info)
 
54
    def go_to_year_view(self):
 
55
        """Open the year view.
 
56
 
 
57
        :return: The Year View page.
 
58
 
 
59
        """
 
60
        year_tab = self.select_single('Tab', objectName='yearTab')
 
61
        if not year_tab.visible:
 
62
            self.switch_to_tab('yearTab')
 
63
        else:
 
64
            logger.debug('The Year View page is already opened.')
 
65
        return year_tab.select_single("YearView", objectName='yearViewPage')
 
66
 
 
67
    @autopilot.logging.log_action(logger.info)
54
68
    def go_to_day_view(self):
55
69
        """Open the day view.
56
70
 
62
76
            self.switch_to_tab('dayTab')
63
77
        else:
64
78
            logger.debug('The Day View page is already opened.')
65
 
        return day_tab.select_single(DayView, objectName='DayView')
 
79
        return day_tab.select_single(DayView, objectName='dayViewPage')
66
80
 
67
81
    @autopilot.logging.log_action(logger.info)
68
82
    def go_to_new_event(self):