def test_create_post(self): username = '******' password = '******' login_page = LoginPage(self.dr) dashboard_page = login_page.login_success(username, password) post_detail_page = dashboard_page.click_create_new_post() title = content = time.strftime("%Y%m%d%H%M%S") post_detail_page.update_post_title(title) post_detail_page.update_post_content(content) post_detail_page.publish_post() post_page = PostPage(self.dr) post_page.click_all_post() self.assertTrue(title, post_page.first_post().text)
def test_login_success(self): username = '******' password = '******' login_page = LoginPage(self.dr) dashboard_page = login_page.login_success(username, password) self.assertTrue("mini2019" in dashboard_page.greeting_link().text)