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())
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())
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))
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) )
def test_that_filter_by_country_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') country = profile_page.country search_results_page = profile_page.click_profile_country_filter() expected_results_title = u'Mozillians in %s' % country actual_results_title = search_results_page.title assert expected_results_title == actual_results_title random_profile = search_results_page.get_random_profile() assert country == random_profile.country
def test_that_filter_by_country_works(self, base_url, selenium, vouched_user): home_page = Home(base_url, selenium) home_page.login(vouched_user['email']) profile_page = home_page.open_user_profile(u'Mozillians.User') country = profile_page.country search_results_page = profile_page.click_profile_country_filter() expected_results_title = u'Mozillians in %s' % country actual_results_title = search_results_page.title assert expected_results_title == actual_results_title random_profile = search_results_page.get_random_profile() assert country == random_profile.country
def test_that_filter_by_country_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_profile_country_filter() expected_results_title = u'Mozillians in %s' % 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_country = random_profile.country Assert.equal( country, random_profile_country, u'Expected country: %s, but got: %s' % (country, random_profile_country))
def test_that_filter_by_country_works(self, mozwebqa, vouched_user): home_page = Home(mozwebqa) home_page.login(vouched_user['email'], vouched_user['password']) profile_page = home_page.open_user_profile(u'Mozillians.User') country = profile_page.country search_results_page = profile_page.click_profile_country_filter() expected_results_title = u'Mozillians in %s' % 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_country = random_profile.country Assert.equal( country, random_profile_country, u'Expected country: %s, but got: %s' % (country, random_profile_country))
def test_that_filter_by_country_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') country = profile_page.country search_results_page = profile_page.click_profile_country_filter() expected_results_title = u'Mozillians in %s' % 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_country = random_profile.country Assert.equal( country, random_profile_country, u'Expected country: %s, but got: %s' % (country, random_profile_country))
def test_that_filter_by_region_works(self, mozwebqa, vouched_user): home_page = Home(mozwebqa) 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))
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))
def test_that_filter_by_region_works(self, mozwebqa): home_page = Home(mozwebqa) home_page.login() profile_page = home_page.open_user_profile(u'MozilliansUser') region = profile_page.region country = profile_page.country search_results_page = profile_page.click_region_name(region=region, country=country) expected_results_title = u'Mozillians in %s, %s' % (region, 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_region = random_profile.region Assert.equal( region, random_profile_region, u'Expected region: %s, but got: %s' % (region, random_profile_region))
def test_that_filter_by_city_works(self, mozwebqa): home_page = Home(mozwebqa) home_page.login() profile_page = home_page.open_user_profile(u'mbrandt') city = profile_page.city country = profile_page.country search_results_page = profile_page.click_city_name(city=city, country=country) expected_results_title = u'Mozillians in %s, %s' % (city, 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_city = random_profile.city Assert.equal( city, random_profile_city, u'Expected city: %s, but got: %s' % (city, random_profile_city))
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 not profile_page.is_groups_present
def test_private_groups_field_when_not_logged_in(self, mozwebqa, private_user): home_page = Home(mozwebqa) 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())