Пример #1
0
    def test_non_ascii_characters_are_allowed_in_profile_information(self, mozwebqa, new_user):
        home_page = Home(mozwebqa)
        profile = home_page.create_new_user(new_user['email'], new_user['password'])

        profile.set_full_name("New MozilliansUser")
        profile.set_bio("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely")

        # Skills
        profile.add_skill(u'\u0394\u03D4\u03D5\u03D7\u03C7\u03C9\u03CA\u03E2')

        # Location
        profile.set_location('Athens, Greece')

        # agreed to privacy policy
        profile.check_privacy()

        profile_page = profile.click_create_profile_button()

        Assert.true(profile_page.was_account_created_successfully)
        Assert.true(profile_page.is_pending_approval_visible)

        Assert.equal('New MozilliansUser', profile_page.name)
        Assert.equal(new_user['email'], profile_page.email)
        Assert.equal("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely", profile_page.biography)
        Assert.equal(u'\u0394\u03D4\u03D5\u03D7\u03C7\u03C9\u03CA\u03E2', profile_page.skills)
        Assert.equal(u'\u0394\u03D4\u03D5\u03D7\u03C7\u03C9\u03CA\u03E2', profile_page.languages)
        Assert.equal('Athenes, Greece, Greece', profile_page.location)
Пример #2
0
    def test_profile_creation(self, base_url, selenium, new_user):
        home_page = Home(base_url, selenium)
        profile = home_page.create_new_user(new_user['email'],
                                            new_user['password'])

        # Click recaptcha box
        profile.check_recaptcha()

        # Full name
        profile.set_full_name("New MozilliansUser")

        # Location
        profile.set_location('Mountain View, 94041, California')

        # Agree to privacy policy
        profile.check_privacy()

        profile_page = profile.click_create_profile_button()

        assert profile_page.was_account_created_successfully
        assert profile_page.is_pending_approval_visible

        assert 'New MozilliansUser' == profile_page.name
        assert new_user['email'] == profile_page.email
        assert 'Mountain View, California, United States' == profile_page.location
Пример #3
0
    def test_profile_creation(self, base_url, selenium, new_user):
        home_page = Home(selenium, base_url).open()
        profile = home_page.create_new_user(new_user['email'])

        # Click recaptcha box
        profile.check_recaptcha()

        # Full name
        profile.set_full_name("New MozilliansUser")

        # Location
        profile.select_country("United States")
        profile.select_region("California")
        profile.select_city("Mountain View")

        # Agree to privacy policy
        profile.check_privacy()

        profile_page = profile.click_create_profile_button()

        assert profile_page.was_account_created_successfully
        assert profile_page.is_pending_approval_visible

        assert 'New MozilliansUser' == profile_page.name
        assert new_user['email'] == profile_page.email
        assert 'Mountain View, California, United States' == profile_page.location
Пример #4
0
    def test_edit_profile_information(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'], vouched_user['password'])
        settings = home_page.header.click_settings_menu_item()
        current_time = str(time.time()).split('.')[0]

        # New profile data
        new_full_name = "Updated 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

        profile_basic_info = settings.profile.basic_information

        # Update the profile fields
        profile_basic_info.set_full_name(new_full_name)
        profile_basic_info.set_bio(new_biography)
        profile_basic_info.click_update()

        profile_page = home_page.header.click_view_profile_menu_item()
        # Get the current data of profile fields
        name = profile_page.name
        biography = profile_page.biography

        # Check that everything was updated
        Assert.equal(name, new_full_name)
        Assert.equal(biography, new_biography)
Пример #5
0
 def test_that_search_returns_results_for_irc_nickname(self, base_url, selenium, vouched_user):
     home_page = Home(selenium, base_url).open()
     home_page.login(vouched_user['email'])
     search_page = home_page.header.search_for(u'mbrandt', loggedin=True)
     assert search_page.results_count > 0
     profile = search_page.search_results[0].open_profile_page()
     assert u'Matt Brandt' == profile.name
 def test_browserid_link_present(self, mozwebqa):
     home_page = Home(mozwebqa)
     home_page.login()
     profile_page = home_page.header.click_view_profile_menu_item()
     edit_profile_page = profile_page.click_edit_my_profile_button()
     account_tab = edit_profile_page.go_to_tab("account")
     Assert.true(account_tab.is_browserid_link_present)
Пример #7
0
    def test_that_filter_by_county_works(self, mozwebqa):
        home_page = Home(mozwebqa)
        home_page.login()

        profile_page = home_page.open_user_profile(u"Mozillians.User")
        country = profile_page.country
        search_results_page = profile_page.click_country_name(country=country)
        expected_results_title = u"Mozillians in %s" % country
        actual_results_title = search_results_page.title

        Assert.true(search_results_page.is_the_current_page)
        Assert.equal(
            expected_results_title,
            actual_results_title,
            u"""Search results title is incorrect.
                Expected: %s, but got: %s"""
            % (expected_results_title, actual_results_title),
        )

        random_profile = search_results_page.get_random_profile()
        random_profile_country = random_profile.country

        Assert.equal(
            country, random_profile_country, u"Expected country: %s, but got: %s" % (country, random_profile_country)
        )
Пример #8
0
 def test_github_non_nda_user_cannot_create_access_group(self, base_url, selenium, github_non_nda_user):
     home_page = Home(selenium, base_url).open()
     home_page.login_with_github(github_non_nda_user['username'], github_non_nda_user['password'],
                                 github_non_nda_user['secret'])
     groups_page = home_page.header.click_groups_menu_item()
     create_group_page = groups_page.click_create_group_main_button()
     assert not create_group_page.is_access_group_present
    def test_creating_profile_without_checking_privacy_policy_checkbox(self, mozwebqa):
        user = self.get_new_user()

        home_page = Home(mozwebqa)

        profile = home_page.create_new_user(user)

        profile.set_full_name("User that doesn't like policy")
        profile.set_bio("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, and will not check accept the privacy policy")

        skills = profile.click_next_button()
        skills.add_skill('test')
        skills.add_language('english')

        location = skills.click_next_button()
        location.select_country('us')
        location.set_state('California')
        location.set_city('Mountain View')

        location.click_create_profile_button()

        profile = ProfileTab(mozwebqa)

        Assert.equal('new error message', profile.error_message)
        location = profile.go_to_tab('location')
        Assert.equal('This field is required.', location.privacy_error_message)
Пример #10
0
 def test_login_logout(self, mozwebqa):
     home_page = Home(mozwebqa)
     Assert.true(home_page.is_csrf_token_present)
     home_page.login()
     Assert.true(home_page.header.is_logout_menu_item_present)
     home_page.header.click_logout_menu_item()
     Assert.true(home_page.is_browserid_link_present)
Пример #11
0
    def test_non_ascii_characters_are_allowed_in_profile_information(self, mozwebqa):
        user = self.get_new_user()

        home_page = Home(mozwebqa)
        profile = home_page.create_new_user(user)

        profile.set_full_name("New MozilliansUser")
        profile.set_bio("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely")

        skills = profile.click_next_button()
        skills.add_skill(u'\u0394\u03D4\u03D5\u03D7\u03C7\u03C9\u03CA\u03E2')
        skills.add_language(u'\u0394\u03D4\u03D5\u03D7\u03C7\u03C9\u03CA\u03E2')

        location = skills.click_next_button()
        location.select_country('gr')
        location.set_state('Greece')
        location.set_city('Athens')
        location.check_privacy()

        profile_page = location.click_create_profile_button()

        Assert.true(profile_page.was_account_created_successfully)
        Assert.true(profile_page.is_pending_approval_visible)

        Assert.equal('New MozilliansUser', profile_page.name)
        Assert.equal(user['email'], profile_page.email)
        Assert.equal("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely", profile_page.biography)
        Assert.equal(u'\u0394\u03D4\u03D5\u03D7\u03C7\u03C9\u03CA\u03E2', profile_page.skills)
        Assert.equal(u'\u0394\u03D4\u03D5\u03D7\u03C7\u03C9\u03CA\u03E2', profile_page.languages)
        Assert.equal('Athenes, Greece\nGreece', profile_page.location)
Пример #12
0
    def test_edit_profile_information(self, mozwebqa):
        home_page = Home(mozwebqa)

        home_page.login()

        profile_page = home_page.header.click_view_profile_menu_item()
        edit_profile_page = profile_page.click_edit_my_profile_button()
        profile_tab = edit_profile_page.go_to_tab("profile")
        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_website = "http://%s.com/" % current_time
        profile_tab.set_first_name(new_first_name)
        profile_tab.set_last_name(new_last_name)
        profile_tab.set_website(new_website)
        profile_tab.set_bio(new_biography)
        profile_tab.click_update_button()
        name = profile_page.name
        biography = profile_page.biography
        website = profile_page.website
        Assert.equal(name, new_first_name + " " + new_last_name)
        Assert.equal(biography, new_biography)
        Assert.equal(website, new_website)
Пример #13
0
    def test_profile_creation(self, mozwebqa):
        user = self.get_new_user()

        home_page = Home(mozwebqa)

        profile = home_page.create_new_user(user)

        profile.set_full_name("New MozilliansUser")
        profile.set_bio("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely")

        skills = profile.click_next_button()
        skills.add_skill('test')
        skills.add_language('english')

        location = skills.click_next_button()
        location.select_country('us')
        location.set_state('California')
        location.set_city('Mountain View')
        location.check_privacy()

        profile_page = location.click_create_profile_button()

        Assert.true(profile_page.was_account_created_successfully)
        Assert.true(profile_page.is_pending_approval_visible)

        Assert.equal('New MozilliansUser', profile_page.name)
        Assert.equal(user['email'], profile_page.email)
        Assert.equal("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely", profile_page.biography)
        Assert.equal('test', profile_page.skills)
        Assert.equal('english', profile_page.languages)
        Assert.equal('Mountain View, California\nUnited States', profile_page.location)
Пример #14
0
    def test_group_description_edit(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'])

        # Create a new group
        group_name = (time.strftime('%x-%X'))
        settings = home_page.header.click_settings_menu_item()
        group = settings.create_group(group_name)

        # New group data
        new_group_description = 'This is an automated group.'
        new_group_irc_channel = '#testgroup'

        # Update the group description fields
        group_description = group.description.description_info
        group_description.set_description(new_group_description)
        group_description.set_irc_channel(new_group_irc_channel)
        group_description.click_update()

        search_listings = home_page.header.search_for(group_name)
        group_info = search_listings.open_group(group_name)

        # Check that everything was updated
        assert new_group_description == group_info.description
        assert new_group_irc_channel == group_info.irc_channel
Пример #15
0
    def test_group_description_edit(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'], vouched_user['password'])

        # Create a new group
        group_name = (time.strftime('%x-%X'))
        settings = home_page.header.click_settings_menu_item()
        group = settings.create_group(group_name)

        # New group data
        new_group_description = 'This is an automated group.'
        new_group_irc_channel = '#testgroup'

        # Update the group description fields
        group_description = group.description.description_info
        group_description.set_description(new_group_description)
        group_description.set_irc_channel(new_group_irc_channel)
        group_description.click_update()

        search_listings = home_page.header.search_for(group_name)
        group_info = search_listings.open_group(group_name)

        # Check that everything was updated
        assert new_group_description == group_info.description
        assert new_group_irc_channel == group_info.irc_channel
Пример #16
0
    def test_edit_profile_information(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'], vouched_user['password'])
        settings = home_page.header.click_settings_menu_item()
        current_time = str(time.time()).split('.')[0]

        # New profile data
        new_full_name = "Updated 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

        profile_basic_info = settings.profile.basic_information

        # Update the profile fields
        profile_basic_info.set_full_name(new_full_name)
        profile_basic_info.set_bio(new_biography)
        profile_basic_info.click_update()

        profile_page = home_page.header.click_view_profile_menu_item()
        # Get the current data of profile fields
        name = profile_page.name
        biography = profile_page.biography

        # Check that everything was updated
        Assert.equal(name, new_full_name)
        Assert.equal(biography, new_biography)
Пример #17
0
    def test_that_user_can_view_external_accounts(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'])
        settings = home_page.header.click_settings_menu_item()

        assert settings.external_accounts.irc_form.is_displayed
        assert settings.external_accounts.external_accounts_form.is_displayed
Пример #18
0
 def test_that_search_returns_results_for_email_substring(
         self, base_url, selenium, vouched_user):
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'])
     search_page = home_page.header.search_for(u'@mozilla.com',
                                               loggedin=True)
     assert search_page.results_count > 0
Пример #19
0
 def test_inviting_an_invalid_email_address(self, base_url, selenium,
                                            vouched_user):
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'])
     invite_page = home_page.header.click_invite_menu_item()
     invite_page.invite("invalidmail")
     assert 'Enter a valid email address.' == invite_page.error_text_message
Пример #20
0
 def test_login_logout(self, mozwebqa):
     home_page = Home(mozwebqa)
     Assert.true(home_page.is_csrf_token_present)
     home_page.login()
     Assert.true(home_page.header.is_logout_menu_item_present)
     home_page.header.click_logout_menu_item()
     Assert.true(home_page.is_browserid_link_present)
Пример #21
0
    def test_that_filter_by_region_works(self, base_url, selenium,
                                         vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'], vouched_user['password'])

        profile_page = home_page.open_user_profile(u'Mozillians.User')
        region = profile_page.region
        country = profile_page.country
        search_results_page = profile_page.click_profile_region_filter()
        expected_results_title = u'Mozillians in %s, %s' % (region, country)
        actual_results_title = search_results_page.title

        Assert.equal(
            expected_results_title, actual_results_title,
            u'''Search results title is incorrect.
                Expected: %s, but got: %s''' %
            (expected_results_title, actual_results_title))

        random_profile = search_results_page.get_random_profile()
        random_profile_region = random_profile.region

        Assert.equal(
            region, random_profile_region,
            u'Expected region: %s, but got: %s' %
            (region, random_profile_region))
Пример #22
0
 def test_that_search_returns_results_for_irc_nickname(
         self, base_url, selenium, vouched_user):
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'], vouched_user['password'])
     home_page.header.search_for(u'mbrandt', loggedin=True)
     profile = Profile(base_url, selenium)
     assert u'Matt Brandt' == profile.name
Пример #23
0
    def test_profile_creation(self, mozwebqa, new_user):
        home_page = Home(mozwebqa)
        profile = home_page.create_new_user(new_user['email'], new_user['password'])

        profile.set_full_name("New MozilliansUser")
        profile.set_bio("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely")

        # Skills
        profile.add_skill('test')
        profile.select_language('en')

        # Location
        profile.set_location('Mountain View, 94041, California')

        # agreed to privacy policy
        profile.check_privacy()

        profile_page = profile.click_create_profile_button()

        Assert.true(profile_page.was_account_created_successfully)
        Assert.true(profile_page.is_pending_approval_visible)

        Assert.equal('New MozilliansUser', profile_page.name)
        Assert.equal(new_user['email'], profile_page.email)
        Assert.equal("Hello, I'm new here and trying stuff out. Oh, and by the way: I'm a robot, run in a cronjob, most likely", profile_page.biography)
        Assert.equal('test', profile_page.skills)
        Assert.equal('English', profile_page.languages)
        Assert.equal('Mountain View, California, United States', profile_page.location)
Пример #24
0
    def test_that_user_can_create_and_delete_group(self, base_url, selenium,
                                                   vouched_user):
        group_name = (time.strftime('%x-%X'))

        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'], vouched_user['password'])
        settings = home_page.header.click_settings_menu_item()
        groups = settings.groups.click_find_group_link()
        create_group = groups.click_create_group_main_button()
        create_group.create_group_name(group_name)
        create_group.click_create_group_submit()

        search_listings = create_group.header.search_for(group_name)

        Assert.true(
            search_listings.is_element_present(By.LINK_TEXT, group_name))

        group_info = search_listings.open_group(group_name)
        groups_page = group_info.delete_group()
        groups_page.wait_for_alert_message()

        home_page.header.click_settings_menu_item()

        Assert.false(
            search_listings.is_element_present(By.LINK_TEXT, group_name))
Пример #25
0
 def test_search_for_not_existing_mozillian_when_logged_in(
         self, base_url, selenium, vouched_user):
     query = u'Qwerty'
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'])
     search_page = home_page.header.search_for(query, loggedin=True)
     assert 0 == search_page.results_count
Пример #26
0
    def test_group_description_edit(self, base_url, selenium, vouched_user):
        home_page = Home(selenium, base_url).open()
        home_page.login(vouched_user['email'])

        # Create a new group
        group_name = 'moz-group-{0}'.format(uuid.uuid4())
        groups_page = home_page.header.click_groups_menu_item()
        group = groups_page.create_group(group_name)

        # New group data
        new_group_description = 'This is an automated group.'
        new_group_irc_channel = '#testgroup'

        # Update the group description fields
        group_description = group.description.description_info
        group_description.set_description(new_group_description)
        group_description.set_irc_channel(new_group_irc_channel)
        group_description.click_update()

        search_listings = home_page.header.search_for(group_name)
        group_info = search_listings.open_group(group_name)

        # Check that everything was updated
        assert new_group_description == group_info.description
        assert new_group_irc_channel == group_info.irc_channel
Пример #27
0
    def test_that_user_can_view_external_accounts(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'], vouched_user['password'])
        settings = home_page.header.click_settings_menu_item()

        assert settings.external_accounts.irc_form.is_displayed
        assert settings.external_accounts.external_accounts_form.is_displayed
Пример #28
0
    def test_edit_profile_information(self, mozwebqa, vouched_user):
        home_page = Home(mozwebqa)
        home_page.login(vouched_user['email'], vouched_user['password'])
        profile_page = home_page.header.click_view_profile_menu_item()
        edit_profile_page = home_page.header.click_edit_profile_menu_item()
        current_time = str(time.time()).split('.')[0]

        # New profile data
        new_full_name = "Updated 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_website = "http://%s.com/" % current_time

        # Update the profile fields
        edit_profile_page.set_full_name(new_full_name)
        edit_profile_page.set_website(new_website)
        edit_profile_page.set_bio(new_biography)
        edit_profile_page.click_update_button()

        # Get the current data of profile fields
        name = profile_page.name
        biography = profile_page.biography
        website = profile_page.website

        # Check that everything was updated
        Assert.equal(name, new_full_name)
        Assert.equal(biography, new_biography)
        Assert.equal(website, new_website)
Пример #29
0
    def test_edit_profile_information(self, mozwebqa):
        home_page = Home(mozwebqa)

        home_page.login()

        profile_page = home_page.header.click_view_profile_menu_item()
        edit_profile_page = home_page.header.click_edit_profile_menu_item()
        current_time = str(time.time()).split('.')[0]

        # New profile data
        new_full_name = "Updated 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_website = "http://%s.com/" % current_time

        # Update the profile fields
        edit_profile_page.set_full_name(new_full_name)
        edit_profile_page.set_website(new_website)
        edit_profile_page.set_bio(new_biography)
        edit_profile_page.click_update_button()

        # Get the current data of profile fields
        name = profile_page.name
        biography = profile_page.biography
        website = profile_page.website

        # Check that everything was updated
        Assert.equal(name, new_full_name)
        Assert.equal(biography, new_biography)
        Assert.equal(website, new_website)
Пример #30
0
    def test_private_groups_field_when_not_logged_in(self, mozwebqa):
        credentials = mozwebqa.credentials['vouched_with_private_fields']
        home_page = Home(mozwebqa)
        profile_page = home_page.open_user_profile(credentials['name'])

        Assert.false(profile_page.is_groups_present,
                     u'Profile: ' + profile_page.get_url_current_page())
Пример #31
0
    def test_private_groups_field_when_not_logged_in(self, base_url, selenium,
                                                     private_user):
        home_page = Home(base_url, selenium)
        profile_page = home_page.open_user_profile(private_user['name'])

        Assert.false(profile_page.is_groups_present,
                     u'Profile: ' + profile_page.get_url_current_page())
Пример #32
0
    def test_invite(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'])
        invite_page = home_page.header.click_invite_menu_item()
        email_address = "*****@*****.**"
        invite_success_page = invite_page.invite(email_address, 'Just a bot sending a test invite to a test account.')
        assert "%s has been invited to Mozillians. They'll receive an email with instructions on how to join.\
 You can invite another Mozillian if you like." % email_address == invite_success_page.success_message
Пример #33
0
    def test_invite(self, mozwebqa):
        home_page = Home(mozwebqa)
        home_page.login()
        invite_page = home_page.header.click_invite_menu_item()
        email_address = "*****@*****.**"
        invite_success_page = invite_page.invite(email_address, 'Just a bot sending a test invite to a test account.')
        Assert.equal("%s has been invited to Mozillians. They'll receive an email with instructions on how to join.\
 You can invite another Mozillian if you like." % email_address, invite_success_page.success_message)
Пример #34
0
 def test_that_search_returns_results_for_irc_nickname(
         self, base_url, selenium, vouched_user):
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'])
     search_page = home_page.header.search_for(u'mbrandt', loggedin=True)
     assert search_page.results_count > 0
     profile = search_page.search_results[0].open_profile_page()
     assert u'Matt Brandt' == profile.name
Пример #35
0
    def test_invite(self, base_url, selenium, vouched_user):
        home_page = Home(selenium, base_url).open()
        home_page.login(vouched_user['email'])
        invite_page = home_page.header.click_invite_menu_item()
        email_address = "*****@*****.**"
        invite_success_page = invite_page.invite(email_address, 'Just a bot sending a test invite to a test account.')
        assert "%s has been invited to Mozillians. They'll receive an email with instructions on how to join.\
 You can invite another Mozillian if you like." % email_address == invite_success_page.success_message
Пример #36
0
 def test_profile_deletion_confirmation(self, mozwebqa):
     home_page = Home(mozwebqa)
     home_page.login()
     edit_profile_page = home_page.header.click_edit_profile_menu_item()
     confirm_profile_delete_page = edit_profile_page.click_delete_profile_button()
     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)
Пример #37
0
 def test_invite(self, mozwebqa):
     home_page = Home(mozwebqa)
     home_page.login()
     invite_page = home_page.header.click_invite_menu_item()
     Assert.true(invite_page.is_csrf_token_present)
     mail_address = "*****@*****.**"
     invite_success_page = invite_page.invite(mail_address)
     Assert.equal("%s has been invited to Mozillians. They'll receive an email with instructions on how to join. You can invite another Mozillian if you like." % mail_address, invite_success_page.success_message)
Пример #38
0
 def test_profile_deletion_confirmation(self, mozwebqa, vouched_user):
     home_page = Home(mozwebqa)
     home_page.login(vouched_user['email'], vouched_user['password'])
     edit_profile_page = home_page.header.click_edit_profile_menu_item()
     confirm_profile_delete_page = edit_profile_page.click_delete_profile_button()
     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)
Пример #39
0
    def test_invite(self, mozwebqa, vouched_user):
        home_page = Home(mozwebqa)
        home_page.login(vouched_user['email'], vouched_user['password'])
        invite_page = home_page.header.click_invite_menu_item()
        email_address = "*****@*****.**"
        invite_success_page = invite_page.invite(email_address, 'Just a bot sending a test invite to a test account.')
        Assert.equal("%s has been invited to Mozillians. They'll receive an email with instructions on how to join.\
 You can invite another Mozillian if you like." % email_address, invite_success_page.success_message)
Пример #40
0
    def test_logout_verify_bid(self, base_url, selenium, vouched_user):
        home_page = Home(selenium, base_url).open()
        home_page.login(vouched_user['email'])
        assert home_page.header.is_logout_menu_item_present
        selenium.get(base_url + '/logout')

        home_page.wait_for_user_login()
        assert home_page.is_sign_in_button_present
Пример #41
0
 def test_profile_deletion_confirmation(self, mozwebqa):
     home_page = Home(mozwebqa)
     home_page.login()
     edit_profile_page = home_page.header.click_edit_profile_menu_item()
     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)
Пример #42
0
 def test_github_non_nda_user_cannot_create_access_group(
         self, base_url, selenium, github_non_nda_user):
     home_page = Home(selenium, base_url).open()
     home_page.login_with_github(github_non_nda_user['username'],
                                 github_non_nda_user['password'],
                                 github_non_nda_user['secret'])
     groups_page = home_page.header.click_groups_menu_item()
     create_group_page = groups_page.click_create_group_main_button()
     assert not create_group_page.is_access_group_present
Пример #43
0
    def test_invite(self, mozwebqa):
        home_page = Home(mozwebqa)
        home_page.login()
        invite_page = home_page.header.click_invite_menu_item()
        Assert.true(invite_page.is_csrf_token_present)
        mail_address = "*****@*****.**"
        invite_success_page = invite_page.invite(mail_address)
        Assert.equal("%s has been invited to Mozillians. They'll receive an email with instructions on how to join.\
 You can invite another Mozillian if you like." % mail_address, invite_success_page.success_message)
Пример #44
0
 def test_that_search_returns_results_for_first_name(self, mozwebqa, vouched_user):
     query = u'Matt'
     home_page = Home(mozwebqa)
     home_page.login(vouched_user['email'], vouched_user['password'])
     search_page = home_page.header.search_for(query)
     Assert.true(search_page.results_count > 0)
     # get random index
     random_profile = randrange(search_page.results_count)
     profile_name = search_page.search_results[random_profile].name
     Assert.contains(query, profile_name)
Пример #45
0
 def test_invite(self, mozwebqa):
     home_page = Home(mozwebqa)
     home_page.login()
     invite_page = home_page.header.click_invite_menu_item()
     Assert.true(invite_page.is_csrf_token_present)
     mail_address = "*****@*****.**"
     invite_success_page = invite_page.invite(mail_address)
     Assert.contains(mail_address, invite_success_page.success_message_body)
     Assert.equal('Invitation Sent!', invite_success_page.success_message_header)
     Assert.true(invite_success_page.is_invite_another_mozillian_link_present)
Пример #46
0
 def test_that_search_returns_results_for_first_name(self, base_url, selenium, vouched_user):
     query = u'Matt'
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'], vouched_user['password'])
     search_page = home_page.header.search_for(query, loggedin=True)
     assert search_page.results_count > 0
     # get random index
     random_profile = randrange(search_page.results_count)
     profile_name = search_page.search_results[random_profile].name
     assert query in profile_name
Пример #47
0
    def test_new_user_cannot_see_groups_or_functional_areas(self, base_url, selenium, unvouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(unvouched_user['email'], unvouched_user['password'])

        assert not home_page.header.is_groups_menu_item_present
        assert not home_page.is_groups_link_visible
        assert not home_page.is_functional_areas_link_visible

        settings = home_page.header.click_settings_menu_item()
        assert not settings.groups.is_find_group_link_visible
Пример #48
0
    def test_that_user_can_add_external_account(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'], vouched_user['password'])
        settings = home_page.header.click_settings_menu_item()

        external_accounts_form = settings.external_accounts.external_accounts_form
        cnt_external_accounts = external_accounts_form.count_external_accounts()
        external_accounts_form.click_add_account()
        new_cnt_external_accounts = external_accounts_form.count_external_accounts()
        assert (cnt_external_accounts + 1) == new_cnt_external_accounts
Пример #49
0
    def test_group_addition(self, mozwebqa, vouched_user):
        home_page = Home(mozwebqa)
        home_page.login(vouched_user['email'], vouched_user['password'])
        edit_profile_page = home_page.header.click_edit_profile_menu_item()
        edit_profile_page.add_group("Hello World")
        profile_page = edit_profile_page.click_update_button()

        Assert.true(profile_page.is_groups_present, "No groups added to profile.")
        groups = profile_page.groups
        Assert.greater(groups.find("hello world"), -1, "Group 'Hello World' not added to profile.")
Пример #50
0
    def test_private_groups_field_as_public_when_logged_in(self, base_url, selenium, private_user):
        # User has certain fields preset to values to run the test properly
        # groups - private
        # belongs to at least one group
        home_page = Home(base_url, selenium)
        home_page.login(private_user['email'], private_user['password'])

        profile_page = home_page.header.click_view_profile_menu_item()
        profile_page.view_profile_as('Public')
        assert not profile_page.is_groups_present
Пример #51
0
    def test_private_groups_field_as_public_when_logged_in(self, base_url, selenium, private_user):
        # User has certain fields preset to values to run the test properly
        # groups - private
        # belongs to at least one group
        home_page = Home(base_url, selenium)
        home_page.login(private_user['email'])

        profile_page = home_page.header.click_view_profile_menu_item()
        profile_page.view_profile_as('Public')
        assert not profile_page.is_groups_present
Пример #52
0
    def test_that_user_can_add_external_account(self, base_url, selenium, vouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(vouched_user['email'])
        settings = home_page.header.click_settings_menu_item()

        external_accounts_form = settings.external_accounts.external_accounts_form
        cnt_external_accounts = external_accounts_form.count_external_accounts()
        external_accounts_form.click_add_account()
        new_cnt_external_accounts = external_accounts_form.count_external_accounts()
        assert (cnt_external_accounts + 1) == new_cnt_external_accounts
Пример #53
0
    def test_new_user_cannot_see_groups_or_functional_areas(self, base_url, selenium, unvouched_user):
        home_page = Home(base_url, selenium)
        home_page.login(unvouched_user['email'])

        assert not home_page.header.is_groups_menu_item_present
        assert not home_page.is_groups_link_visible
        assert not home_page.is_functional_areas_link_visible

        settings = home_page.header.click_settings_menu_item()
        assert not settings.groups.is_find_group_link_visible
Пример #54
0
 def test_that_search_returns_results_for_first_name(self, mozwebqa):
     query = u'Paul'
     home_page = Home(mozwebqa)
     home_page.login()
     search_page = home_page.header.search_for(query)
     Assert.true(search_page.results_count > 0)
     #get random index
     random_profile = randrange(search_page.results_count)
     profile_name = search_page.search_results[random_profile].name
     Assert.contains(query, profile_name)
Пример #55
0
 def test_that_search_returns_results_for_first_name(self, mozwebqa):
     query = u'Matt'
     home_page = Home(mozwebqa)
     home_page.login()
     search_page = home_page.header.search_for(query)
     Assert.true(search_page.results_count > 0)
     #get random index
     random_profile = randrange(search_page.results_count)
     profile_name = search_page.search_results[random_profile].name
     Assert.contains(query, profile_name)
Пример #56
0
 def test_that_search_returns_results_for_first_name(
         self, base_url, selenium, vouched_user):
     query = u'Matt'
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'])
     search_page = home_page.header.search_for(query, loggedin=True)
     assert search_page.results_count > 0
     # get random index
     random_profile = randrange(search_page.results_count)
     profile_name = search_page.search_results[random_profile].name
     assert query in profile_name