本文整理汇总了Python中gaiatest.apps.calendar.app.Calendar.a11y_wheel_to_next_month方法的典型用法代码示例。如果您正苦于以下问题:Python Calendar.a11y_wheel_to_next_month方法的具体用法?Python Calendar.a11y_wheel_to_next_month怎么用?Python Calendar.a11y_wheel_to_next_month使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.calendar.app.Calendar
的用法示例。
在下文中一共展示了Calendar.a11y_wheel_to_next_month方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestCalendarMonthViewWheelAccessibility
# 需要导入模块: from gaiatest.apps.calendar.app import Calendar [as 别名]
# 或者: from gaiatest.apps.calendar.app.Calendar import a11y_wheel_to_next_month [as 别名]
class TestCalendarMonthViewWheelAccessibility(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.today = datetime.date.today()
# Determine the name and the year of the next month
self.next_month_year = self.today.replace(day=1) + datetime.timedelta(days=32)
self.calendar = Calendar(self.marionette)
self.calendar.launch()
def test_a11y_calendar_month_view_wheel(self):
MONTH_YEAR_PATTERN = '%b %Y'
# Swipe left with 2 fingers.
self.calendar.a11y_wheel_to_next_month()
# Check that the grid updated to the next month.
self.assertEquals(self.next_month_year.strftime(MONTH_YEAR_PATTERN),
self.calendar.current_month_year)
# Swipe right with 2 fingers.
self.calendar.a11y_wheel_to_previous_month()
# Check that we moved back to the current month.
self.assertEquals(self.today.strftime(MONTH_YEAR_PATTERN), self.calendar.current_month_year)