コード例 #1
0
 def test_inviting_an_invalid_email_address(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     invite_page = home_page.click_invite_link()
     invite_page.invite("invalidmail")
     Assert.true(invite_page.is_invalid_mail_address_message_present)
コード例 #2
0
 def test_login_logout(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     Assert.true(login_page.is_csrf_token_present)
     login_page.log_in()
     Assert.true(home_page.is_logout_link_present)
     login_page.click_logout_link()
     Assert.true(home_page.is_login_link_present)
コード例 #3
0
 def test_creating_profile_without_checking_privacy_policy_checkbox(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     register_page = home_page.click_join_us_link()
     register_page.set_email("*****@*****.**")
     register_page.set_password("newpassword")
     register_page.set_first_name("NewUser")
     register_page.set_last_name("DoesNotCheckBox")
     register_page.click_create_account_button()
     Assert.true(register_page.is_optin_required)
コード例 #4
0
 def test_creating_profile_with_invalid_email_address(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     register_page = home_page.click_join_us_link()
     register_page.set_email("invalidmail")
     register_page.set_password("validpassword")
     register_page.set_first_name("userwith")
     register_page.set_last_name("invalidmail")
     register_page.check_privacy_policy_checkbox()
     register_page.click_create_account_button()
     Assert.true(register_page.is_invalid_email_message_present)
コード例 #5
0
 def test_profile_creation(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     register_page = home_page.click_join_us_link()
     register_page.set_email("*****@*****.**")
     register_page.set_password("newpassword")
     register_page.set_first_name("New")
     register_page.set_last_name("MozilliansUser")
     register_page.check_privacy_policy_checkbox()
     login_page = register_page.click_create_account_button()
     Assert.true(login_page.is_account_needs_verification_message_present)
コード例 #6
0
 def test_creating_profile_with_non_matching_passwords(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     register_page = home_page.click_join_us_link()
     register_page.set_email("*****@*****.**")
     register_page.set_password("passwords", "dontmatch")
     register_page.set_first_name("userwith")
     register_page.set_last_name("invalidpassword")
     register_page.check_privacy_policy_checkbox()
     register_page.click_create_account_button()
     Assert.true(register_page.is_non_matching_passwords_message_present)
コード例 #7
0
 def test_profile_deletion_confirmation(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     profile_page = home_page.click_profile_link()
     edit_profile_page = profile_page.click_edit_my_profile_button()
     confirm_profile_delete_page = edit_profile_page.click_delete_profile_button()
     Assert.true(confirm_profile_delete_page.is_csrf_token_present)
     Assert.true(confirm_profile_delete_page.is_confirm_text_present)
     Assert.true(confirm_profile_delete_page.is_cancel_button_present)
     Assert.true(confirm_profile_delete_page.is_delete_button_present)
コード例 #8
0
 def test_invite(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     invite_page = home_page.click_invite_link()
     Assert.true(invite_page.is_csrf_token_present)
     mail_address = "*****@*****.**"
     invite_success_page = invite_page.invite(mail_address)
     Assert.true(invite_success_page.is_mail_address_present(mail_address))
     Assert.true(invite_success_page.is_success_message_present)
     Assert.true(invite_success_page.is_invite_another_mozillian_link_present)
コード例 #9
0
 def test_change_password(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     profile_page = home_page.click_profile_link()
     edit_profile_page = profile_page.click_edit_my_profile_button()
     change_password_page = edit_profile_page.click_change_password_link()
     Assert.true(change_password_page.is_old_password_field_present)
     Assert.true(change_password_page.is_new_password_field_present)
     Assert.true(change_password_page.is_confirm_password_field_present)
     Assert.true(change_password_page.is_change_password_button_present)
     Assert.true(change_password_page.is_forgot_password_link_present)
コード例 #10
0
 def test_edit_profile_information(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     profile_page = home_page.click_profile_link()
     edit_profile_page = profile_page.click_edit_my_profile_button()
     Assert.true(edit_profile_page.is_csrf_token_present)
     current_time = str(time.time()).split('.')[0]
     new_first_name = "Updated %s" % current_time
     new_last_name = "Mozillians User %s" % current_time
     new_biography = "Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely, run at %s" % current_time
     new_email = edit_profile_page.email
     edit_profile_page.set_first_name(new_first_name)
     edit_profile_page.set_last_name(new_last_name)
     edit_profile_page.set_biography(new_biography)
     edit_profile_page.click_update_button()
     name = profile_page.name
     biography = profile_page.biography
     email = profile_page.email
     Assert.equal(name, new_first_name + " " + new_last_name)
     Assert.equal(biography, new_biography)
     Assert.equal(new_email, email)
コード例 #11
0
 def test_search_for_too_many_results(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     search_page = home_page.search_for(".")
     Assert.true(search_page.too_many_results_message_shown)
コード例 #12
0
 def test_that_search_returns_results_for_irc_nickname(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     search_page = home_page.search_for("stephend")
     Assert.true(search_page.results_count > 0)
コード例 #13
0
 def test_that_search_returns_results_for_email_substring(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     login_page = home_page.click_login_link()
     login_page.log_in()
     search_page = home_page.search_for("@mozilla.com")
     Assert.true(search_page.results_count > 0)
コード例 #14
0
 def test_search_function_only_present_for_vouched_users(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     Assert.false(home_page.is_search_box_present)
     login_page = home_page.click_login_link()
     login_page.log_in()
     Assert.true(home_page.is_search_box_present)
コード例 #15
0
 def test_about_page(self, mozwebqa):
     home_page = MozilliansStartPage(mozwebqa)
     about_mozillians_page = home_page.click_about_link()
     Assert.true(about_mozillians_page.is_privacy_section_present)
     Assert.true(about_mozillians_page.is_get_involved_section_present)