本文整理汇总了Python中gaiatest.apps.calendar.app.Calendar.account方法的典型用法代码示例。如果您正苦于以下问题:Python Calendar.account方法的具体用法?Python Calendar.account怎么用?Python Calendar.account使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.calendar.app.Calendar
的用法示例。
在下文中一共展示了Calendar.account方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestCalendarViewsVisibilityAccessibility
# 需要导入模块: from gaiatest.apps.calendar.app import Calendar [as 别名]
# 或者: from gaiatest.apps.calendar.app.Calendar import account [as 别名]
class TestCalendarViewsVisibilityAccessibility(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.calendar = Calendar(self.marionette)
self.calendar.launch()
self.views = {
'time_views': self.marionette.find_element(*self.calendar._time_views_locator),
'current_day': self.marionette.find_element(
*self.calendar._current_months_day_locator),
'month': self.marionette.find_element(
*self.calendar._current_monthly_calendar_locator),
'day': self.marionette.find_element(*self.calendar._day_view_locator),
'week': self.marionette.find_element(*self.calendar._week_view_locator),
'settings': self.marionette.find_element(*self.calendar._settings_locator),
'advanced_settings': self.marionette.find_element(
*self.calendar._advanced_settings_view_locator),
'modify_event': self.marionette.find_element(*self.calendar._modify_event_view_locator),
'event': self.marionette.find_element(*self.calendar._event_view_locator),
'create_account': self.marionette.find_element(
*self.calendar._create_account_view_locator),
'modify_account': self.marionette.find_element(
*self.calendar._modify_account_view_locator)
}
self.event_title = 'title'
new_event = self.calendar.a11y_click_add_event_button()
# create a new event
new_event.a11y_fill_event_title(self.event_title)
new_event.a11y_click_save_event()
self.calendar.wait_for_events(1)
def test_a11y_calendar_views_visibility(self):
def test_a11y_visible(*visible):
for key, view in self.views.iteritems():
if key in visible:
self.assertTrue(self.accessibility.is_visible(view))
else:
self.assertTrue(self.accessibility.is_hidden(view))
# Default
test_a11y_visible('time_views', 'current_day', 'month')
# Settings
self.calendar.a11y_click_settings()
test_a11y_visible('settings')
# Advanced settings
self.accessibility.click(self.marionette.find_element(
*self.calendar.settings._advanced_settings_button_locator))
test_a11y_visible('advanced_settings')
# Create account
self.accessibility.click(self.marionette.find_element(
*self.calendar._create_account_button_locator))
test_a11y_visible('create_account')
# Modify account
self.accessibility.click(self.calendar.account('caldav'))
test_a11y_visible('modify_account')
# Create account
self.calendar.a11y_click_modify_account_back()
test_a11y_visible('create_account')
# Advanced settings
self.calendar.a11y_click_create_account_back()
test_a11y_visible('advanced_settings')
# Settings
self.accessibility.click(self.marionette.find_element(
*self.calendar._advanced_settings_done_button_locator))
test_a11y_visible('settings')
# Default
self.calendar.a11y_click_close_settings()
test_a11y_visible('time_views', 'current_day', 'month')
# Week
self.calendar.a11y_click_week_display_button()
test_a11y_visible('time_views', 'week')
# Day
self.calendar.a11y_click_day_display_button()
test_a11y_visible('time_views', 'day')
# Month
self.calendar.a11y_click_month_display_button()
test_a11y_visible('time_views', 'current_day', 'month')
# New event
new_event = self.calendar.a11y_click_add_event_button()
test_a11y_visible('modify_event')
# Month
new_event.a11y_click_close_button()
test_a11y_visible('time_views', 'current_day', 'month')
#.........这里部分代码省略.........