예제 #1
0
    def test_can_create_new_user_account(self, mozwebqa):
        user = MockUser()
        home_pg = HomePage(mozwebqa)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in()
        bid_login.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_sender('*****@*****.**')

        # Load the BrowserID link from the email in the browser
        mozwebqa.selenium.get(email.verify_user_link)
        from browserid.pages.webdriver.complete_registration import CompleteRegistration
        CompleteRegistration(mozwebqa.selenium, mozwebqa.timeout)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in(expect='returning')
        Assert.equal(user['email'], bid_login.signed_in_email)

        bid_login.sign_in_returning_user()
        home_pg.wait_for_user_login()

        Assert.equal(home_pg.logged_in_user_email, user['email'])
예제 #2
0
    def test_can_create_new_user_account(self, mozwebqa):
        user = MockUser()
        home_pg = HomePage(mozwebqa)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in()
        bid_login.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_sender('*****@*****.**')

        # Load the BrowserID link from the email in the browser
        mozwebqa.selenium.get(email.verify_user_link)
        from browserid.pages.webdriver.complete_registration import CompleteRegistration
        CompleteRegistration(mozwebqa.selenium, mozwebqa.timeout)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in(expect='returning')
        Assert.equal(user['email'], bid_login.signed_in_email)

        bid_login.sign_in_returning_user()
        home_pg.wait_for_user_login()

        Assert.equal(home_pg.logged_in_user_email, user['email'])
예제 #3
0
    def test_can_create_new_user_account(self, mozwebqa):
        user = MockUser()
        home_pg = HomePage(mozwebqa)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in()
        bid_login.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_index(0)

        # Load the BrowserID link from the email in the browser
        from browserid.pages.complete_registration import CompleteRegistration
        complete_registration = CompleteRegistration(mozwebqa.selenium,
                                                     mozwebqa.timeout,
                                                     email.verify_user_link)

        Assert.equal(home_pg.logged_in_user_email, user['email'])
예제 #4
0
    def create_new_user(self, user):
        #saves the current url
        current_url = self.selenium.current_url

        bid_login = self.click_login_register(expect="new")

        # creates the new user in the browserID pop up
        bid_login.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_index(0)

        # Load the BrowserID link from the email in the browser
        self.selenium.get(email.verify_user_link)
        from browserid.pages.webdriver.complete_registration import CompleteRegistration
        CompleteRegistration(self.selenium, self.timeout)

        # restores the current url
        self.selenium.get(current_url)
예제 #5
0
    def test_can_change_user_password(self, mozwebqa):
        user = MockUser()
        home_pg = HomePage(mozwebqa)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in()
        bid_login.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_index(0)

        # Load the BrowserID link from the email in the browser
        from browserid.pages.complete_registration import CompleteRegistration
        CompleteRegistration(mozwebqa.selenium, mozwebqa.timeout,
                             email.verify_user_link)

        mozwebqa.selenium.get(self._persona_server_url(mozwebqa))
        from browserid.pages.account_manager import AccountManager
        account_manager = AccountManager(mozwebqa.selenium, mozwebqa.timeout)

        Assert.contains(user['email'], account_manager.emails)

        account_manager.click_edit_password()
        account_manager.old_password = user['password']
        new_password = "******"
        account_manager.new_password = new_password
        account_manager.click_password_done()

        account_manager.click_sign_out()
        mozwebqa.selenium.execute_script('localStorage.clear()')

        home_pg.go_to_home_page()

        bid_login = home_pg.click_sign_in()
        bid_login.sign_in(user['email'], new_password)

        home_pg.wait_for_user_login()
        Assert.true(home_pg.is_logged_in)
    def test_can_change_user_password(self, mozwebqa):
        user = MockUser()
        home_pg = HomePage(mozwebqa)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in()
        bid_login.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_index(0)

        # Load the BrowserID link from the email in the browser
        mozwebqa.selenium.get(email.verify_user_link)
        from browserid.pages.webdriver.complete_registration import CompleteRegistration
        CompleteRegistration(mozwebqa.selenium, mozwebqa.timeout)

        mozwebqa.selenium.get(mozwebqa.server_base_url)
        from browserid.pages.webdriver.account_manager import AccountManager
        account_manager = AccountManager(mozwebqa.selenium, mozwebqa.timeout)

        Assert.contains(user['email'], account_manager.emails)

        account_manager.click_edit_password()
        account_manager.old_password = user['password']
        new_password = "******"
        account_manager.new_password = new_password
        account_manager.click_password_done()

        account_manager.click_sign_out()

        home_pg.go_to_home_page()

        bid_login = home_pg.click_sign_in()
        bid_login.sign_in(user['email'], new_password)

        home_pg.wait_for_user_login()
        Assert.true(home_pg.is_logged_in)
예제 #7
0
    def test_can_create_new_user_account(self, mozwebqa):
        user = MockUser()
        home_pg = HomePage(mozwebqa)

        home_pg.go_to_home_page()
        bid_login = home_pg.click_sign_in()
        bid_login.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_index(0)

        # Load the BrowserID link from the email in the browser
        mozwebqa.selenium.get(email.verify_user_link)
        from browserid.pages.webdriver.complete_registration import CompleteRegistration
        complete_registration = CompleteRegistration(mozwebqa.selenium, mozwebqa.timeout)

        # Check the message on the registration page reflects a successful registration!
        Assert.contains("Thank you for signing up with Persona.", complete_registration.thank_you)

        home_pg.go_to_home_page()

        Assert.equal(home_pg.logged_in_user_email, user['email'])
    def test_that_user_can_create_team_pad(self, mozwebqa):
        user = MockUser()
        signup_pg = SignupPage(mozwebqa)

        teampad = 'webqatest_%s' % repr(time.time()).replace('.','')
        fullname = 'Testy Testington'

        signup_pg.go_to_signup_page()
        browserid = signup_pg.create_team_pad(teampad, fullname)
        browserid.sign_in_new_user(user['email'], user['password'])

        # Open restmail inbox, find the email
        inbox = RestmailInbox(user['email'])
        email = inbox.find_by_sender('*****@*****.**')

        # Load the BrowserID link from the email in the browser
        mozwebqa.selenium.get(email.verify_user_link)
        from browserid.pages.webdriver.complete_registration import CompleteRegistration
        CompleteRegistration(mozwebqa.selenium, mozwebqa.timeout)

        signup_pg.go_to_signup_page()
        browserid = signup_pg.create_team_pad(teampad, fullname, expect='returning')
        browserid.click_sign_in_returning_user()

        Assert.true(signup_pg.is_created)

        teampad_pg = TeamPad(mozwebqa)
        teampad_pg.go_to_teampad_page(teampad)
        browserid = teampad_pg.sign_in(expect='returning')
        browserid.click_sign_in_returning_user()

        Assert.true(teampad_pg.is_logged_in)

        mozwebqa.selenium.get(teampad_pg.logout_link)
        teampad_pg.go_to_teampad_page(teampad)

        Assert.true(teampad_pg.is_logged_out)