当前位置: 首页>>代码示例>>Python>>正文


Python Email.basic_setup_email方法代码示例

本文整理汇总了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)
开发者ID:adrm,项目名称:gaia,代码行数:34,代码来源:test_setup_basic_gmail.py

示例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)
开发者ID:malini,项目名称:gaia-ui-tests-1,代码行数:37,代码来源:test_setup_basic_gmail.py

示例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)))
开发者ID:AaskaShah,项目名称:gaia,代码行数:70,代码来源:test_a11y_email_settings_view.py


注:本文中的gaiatest.apps.email.app.Email.basic_setup_email方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。