本文整理汇总了Python中gaiatest.apps.email.app.Email.basic_setup_email方法的典型用法代码示例。如果您正苦于以下问题:Python Email.basic_setup_email方法的具体用法?Python Email.basic_setup_email怎么用?Python Email.basic_setup_email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.email.app.Email
的用法示例。
在下文中一共展示了Email.basic_setup_email方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestSetupGmail
# 需要导入模块: from gaiatest.apps.email.app import Email [as 别名]
# 或者: from gaiatest.apps.email.app.Email import basic_setup_email [as 别名]
class TestSetupGmail(GaiaTestCase):
def setUp(self):
try:
self.testvars['email']['gmail']
except KeyError:
raise SkipTest('account details not present in test variables')
GaiaTestCase.setUp(self)
self.connect_to_local_area_network()
self.email = Email(self.marionette)
self.email.launch()
def test_setup_basic_gmail(self):
# setup basic gmail account
self.email.basic_setup_email('Gmail account',
self.testvars['email']['gmail']['email'],
self.testvars['email']['gmail']['password'])
# check header area
self.assertTrue(self.email.header.is_compose_visible)
self.assertTrue(self.email.header.is_menu_visible)
self.assertEqual(self.email.header.label, 'Inbox')
# check toolbar area
self.assertTrue(self.email.toolbar.is_edit_visible)
self.assertTrue(self.email.toolbar.is_refresh_visible)
# check account has emails
self.email.wait_for_emails_to_sync()
self.assertGreater(len(self.email.mails), 0)
示例2: TestSetupGmail
# 需要导入模块: from gaiatest.apps.email.app import Email [as 别名]
# 或者: from gaiatest.apps.email.app.Email import basic_setup_email [as 别名]
class TestSetupGmail(GaiaTestCase):
email_configured = False
def setUp(self):
GaiaTestCase.setUp(self)
self.connect_to_network()
self.email = Email(self.marionette)
self.email.launch()
def test_setup_basic_gmail(self):
# setup basic gmail account
self.email.basic_setup_email(self.testvars['email']['gmail']['name'],
self.testvars['email']['gmail']['email'],
self.testvars['email']['gmail']['password'])
self.email_configured = True
# check header area
self.assertTrue(self.email.header.is_compose_visible)
self.assertTrue(self.email.header.is_menu_visible)
self.assertEqual(self.email.header.label, 'Inbox')
# check toolbar area
self.assertTrue(self.email.toolbar.is_edit_visible)
self.assertTrue(self.email.toolbar.is_refresh_visible)
# check account has emails
self.email.wait_for_emails_to_sync()
self.assertGreater(len(self.email.mails), 0)
def tearDown(self):
if self.email_configured:
self.email.delete_email_account(0)
GaiaTestCase.tearDown(self)
示例3: TestEmailSettingsViewAccessibility
# 需要导入模块: from gaiatest.apps.email.app import Email [as 别名]
# 或者: from gaiatest.apps.email.app.Email import basic_setup_email [as 别名]
class TestEmailSettingsViewAccessibility(GaiaTestCase):
def setUp(self):
if not GaiaTestEnvironment(self.testvars).email.get('gmail'):
raise SkipTest('Gmail account details not present in test variables.')
GaiaTestCase.setUp(self)
self.connect_to_local_area_network()
self.email = Email(self.marionette)
self.email.launch()
# setup basic gmail account
self.email.basic_setup_email('Gmail account',
self.environment.email['gmail']['email'],
self.environment.email['gmail']['password'])
def test_a11y_email_settings_view(self):
# Make sure message list screen is accessible.
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._message_list_locator)))
# Open folders menu.
toolbar = self.email.header.a11y_click_menu()
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element(
*self.email._message_list_locator)))
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._folder_picker_locator)))
# Open settings
settings = toolbar.a11y_click_settings()
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element(
*self.email._folder_picker_locator)))
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._settings_main_locator)))
# Click add account
self.accessibility.click(self.marionette.find_element(*settings._account_add_locator))
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element(
*self.email._settings_main_locator)))
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._setup_account_info)))
# Back to settings
self.accessibility.click(self.marionette.find_element(*self.email._back_button_locator))
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._settings_main_locator)))
# Open account settings
account_settings = settings.email_accounts[0].a11y_click()
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element(
*self.email._settings_main_locator)))
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._settings_account_locator)))
# Delete account
delete_confirmation = account_settings.a11y_click_delete()
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element(
*self.email._settings_account_locator)))
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._confirm_dialog_locator)))
delete_confirmation.a11y_click_delete()
# Back to setup account
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element(
*self.email._confirm_dialog_locator)))
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element(
*self.email._setup_account_info)))