本文整理汇总了Python中common.test.acceptance.pages.lms.dashboard.DashboardPage.click_username_dropdown方法的典型用法代码示例。如果您正苦于以下问题:Python DashboardPage.click_username_dropdown方法的具体用法?Python DashboardPage.click_username_dropdown怎么用?Python DashboardPage.click_username_dropdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.test.acceptance.pages.lms.dashboard.DashboardPage
的用法示例。
在下文中一共展示了DashboardPage.click_username_dropdown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_link_on_dashboard_works
# 需要导入模块: from common.test.acceptance.pages.lms.dashboard import DashboardPage [as 别名]
# 或者: from common.test.acceptance.pages.lms.dashboard.DashboardPage import click_username_dropdown [as 别名]
def test_link_on_dashboard_works(self):
"""
Scenario: Verify that the "Account" link works from the dashboard.
Given that I am a registered user
And I visit my dashboard
And I click on "Account" in the top drop down
Then I should see my account settings page
"""
self.log_in_as_unique_user()
dashboard_page = DashboardPage(self.browser)
dashboard_page.visit()
dashboard_page.click_username_dropdown()
self.assertIn('Account', dashboard_page.username_dropdown_link_text)
dashboard_page.click_account_settings_link()
示例2: test_dashboard_learner_profile_link
# 需要导入模块: from common.test.acceptance.pages.lms.dashboard import DashboardPage [as 别名]
# 或者: from common.test.acceptance.pages.lms.dashboard.DashboardPage import click_username_dropdown [as 别名]
def test_dashboard_learner_profile_link(self):
"""
Scenario: Verify that my profile link is present on dashboard page and we can navigate to correct page.
Given that I am a registered user.
When I go to Dashboard page.
And I click on username dropdown.
Then I see Profile link in the dropdown menu.
When I click on Profile link.
Then I will be navigated to Profile page.
"""
username, __ = self.log_in_as_unique_user()
dashboard_page = DashboardPage(self.browser)
dashboard_page.visit()
dashboard_page.click_username_dropdown()
self.assertIn('Profile', dashboard_page.username_dropdown_link_text)
dashboard_page.click_my_profile_link()
my_profile_page = LearnerProfilePage(self.browser, username)
my_profile_page.wait_for_page()