Exemple #1
0
 def test_region_dropdown_link(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     click_regions = [
         communities_page.click_north_america,
         communities_page.click_latin_america,
         communities_page.click_europe,
         communities_page.click_asia_south_pacific,
         communities_page.click_africa_middle_east
     ]
     region_communities = [
         communities_page.north_america_communities,
         communities_page.latin_america_communities,
         communities_page.europe_communities,
         communities_page.asia_south_pacific_communities,
         communities_page.africa_middle_east_communities,
         communities_page.balkans_communities
     ]
     bad_communities = []
     for index, action in enumerate(click_regions):
         action()
         for community in region_communities[index]:
             communities_page.wait_until_element_visible(community)
             if not community.is_displayed():
                 bad_communities.append('%s is not displayed.' %
                                        community.text)
     assert [] == bad_communities
Exemple #2
0
 def test_region_dropdown_link(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     click_regions = [
         communities_page.click_north_america,
         communities_page.click_latin_america,
         communities_page.click_europe,
         communities_page.click_asia_south_pacific,
         communities_page.click_africa_middle_east
     ]
     region_communities = [
         communities_page.north_america_communities,
         communities_page.latin_america_communities,
         communities_page.europe_communities,
         communities_page.asia_south_pacific_communities,
         communities_page.africa_middle_east_communities,
         communities_page.balkans_communities
     ]
     bad_communities = []
     for index, action in enumerate(click_regions):
         action()
         for community in region_communities[index]:
             communities_page.wait_until_element_visible(community)
             if not community.is_displayed():
                 bad_communities.append('%s is not displayed.' % community.text)
     Assert.equal(0, len(bad_communities), '%s communities not displayed: '
                  % len(bad_communities) + ', '.join(bad_communities))
Exemple #3
0
 def test_region_legend_links_are_correct(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     assert communities_page.region_legend.is_displayed(
     ), 'Legend not displayed'
     self.check_bad_links(communities_page,
                          communities_page.region_legend_links_list)
Exemple #4
0
 def test_community_links_are_correct(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     bad_links = []
     communities_links = communities_page.communities_links
     for index, url_suffix in enumerate(communities_page.communities_links_suffix_list):
         url = communities_links[index].get_attribute('href')
         if not url.endswith(url_suffix):
             bad_links.append('%s does not end with %s' % (url, url_suffix))
     Assert.equal(0, len(bad_links), '%s bad links found: '
                  % len(bad_links) + ', '.join(bad_links))
Exemple #5
0
 def test_community_links_are_correct(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     bad_links = []
     communities_links = communities_page.communities_links
     for index, url_suffix in enumerate(communities_page.communities_links_suffix_list):
         url = communities_links[index].get_attribute('href')
         if not url.endswith(url_suffix):
             bad_links.append('%s does not end with %s' % (url, url_suffix))
     Assert.equal(0, len(bad_links), '%s bad links found: '
                  % len(bad_links) + ', '.join(bad_links))
Exemple #6
0
 def test_region_links_are_correct(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     self.check_bad_links(communities_page,
                          communities_page.region_nav_links_list)
Exemple #7
0
 def test_region_legend_links_are_correct(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     Assert.true(communities_page.region_legend.is_displayed(), 'Legend not displayed')
     self.check_bad_links(communities_page, communities_page.region_legend_links_list)
Exemple #8
0
 def test_region_links_are_correct(self, mozwebqa):
     communities_page = Communities(mozwebqa)
     communities_page.go_to_page()
     self.check_bad_links(communities_page, communities_page.region_nav_links_list)