本文整理汇总了Python中pages.mobile.home.Home.create_new_user方法的典型用法代码示例。如果您正苦于以下问题:Python Home.create_new_user方法的具体用法?Python Home.create_new_user怎么用?Python Home.create_new_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.mobile.home.Home
的用法示例。
在下文中一共展示了Home.create_new_user方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_that_checks_the_addition_of_a_review
# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import create_new_user [as 别名]
def test_that_checks_the_addition_of_a_review(self, mozwebqa):
mock_review = MockReview()
home_page = Home(mozwebqa)
home_page.go_to_homepage()
# Create new user and login.
new_user = home_page.create_new_user()
home_page.login(user=new_user)
# Search for an app and go to it's details page.
search_page = home_page.search_for(self.app_name)
details_page = search_page.results[0].click_app()
Assert.true(details_page.is_product_details_visible)
# Write a review.
details_page.click_write_review()
add_review_page = AddReview(mozwebqa)
review_page = add_review_page.write_a_review(mock_review['rating'], mock_review['body'])
review_page.wait_for_ajax_on_page_finish()
review_page.wait_for_reviews_visible()
# Check review
Assert.true(review_page.is_successful_message, "Review not added: %s" % review_page.notification_message)
Assert.equal(review_page.notification_message, "Your review was successfully added!")
review = review_page.reviews[0]
Assert.equal(review.rating, mock_review['rating'])
Assert.contains(review.author, new_user['email'])
Assert.equal(review.text, mock_review['body'])