def test_similar_messages(self, mozwebqa):
        """This testcase covers # 13807 in Litmus."""
        sites_pg = SitesPage(mozwebqa)

        sites_pg.go_to_sites_page()
        sites_pg.product_filter.select_product('firefox')
        sites_pg.product_filter.select_version(2)

        #store the first site's name and click it
        site = sites_pg.sites[0]
        site_name = site.name
        themes_pg = site.click_name()

        #click similar messages and navigate to the second page
        theme_pg = themes_pg.themes[0].click_similar_messages()
        theme_pg.click_next_page()

        Assert.equal(theme_pg.messages_heading, 'THEME')
        Assert.equal(theme_pg.page_from_url, '2')
        Assert.equal(theme_pg.theme_callout, 'Theme for %s' % site_name.lower())
        Assert.greater(len(theme_pg.messages), 0)
        Assert.equal(theme_pg.back_link, u'Back to %s \xbb' % site_name.lower())
        [Assert.contains(site_name.lower(), message.site) for message in theme_pg.messages]
    def test_similar_messages(self, mozwebqa):
        """This testcase covers # 13807 in Litmus."""
        sites_pg = SitesPage(mozwebqa)

        sites_pg.go_to_sites_page()
        sites_pg.product_filter.select_product('firefox')
        sites_pg.product_filter.select_version(2)

        #store the first site's name and click it
        site = sites_pg.sites[0]
        site_name = site.name
        themes_pg = site.click_name()

        #click similar messages and navigate to the second page
        theme_pg = themes_pg.themes[0].click_similar_messages()
        theme_pg.click_next_page()

        Assert.equal(theme_pg.messages_heading, 'THEME')
        Assert.equal(theme_pg.page_from_url, 2)
        Assert.equal(theme_pg.theme_callout, 'Theme for %s' % site_name.lower())
        Assert.greater(len(theme_pg.messages), 0)
        Assert.equal(theme_pg.back_link, u'Back to %s \xbb' % site_name.lower())
        [Assert.contains(site_name.lower(), message.site) for message in theme_pg.messages]
    def test_sites_can_be_filtered_by_mobile_versions(self, mozwebqa):
        """This testcase covers # 15043 & 15044 in Litmus.

        1. Verify that at least three mobile versions exist
        2. Verify that filtering by version returns results
        3. Verify that the state of the filters are correct after being applied
        4. Verify product and version values in the URL

        """
        sites_pg = SitesPage(mozwebqa)

        product = "mobile"
        sites_pg.go_to_sites_page()
        sites_pg.product_filter.select_product(product)
        versions = sites_pg.product_filter.versions
        [Assert.not_equal(version, "") for version in versions]
        Assert.greater(len(versions), 2)
        for version in [versions[1], versions[-1]]:
            print "Checking %s version '%s'." % (product, version)
            sites_pg.product_filter.select_version(version)
            Assert.equal(sites_pg.product_filter.selected_product, product)
            Assert.equal(sites_pg.product_filter.selected_version, version)
            Assert.equal(sites_pg.product_from_url, product)
            Assert.equal(sites_pg.version_from_url, version)
示例#4
0
    def test_sites_can_be_filtered_by_mobile_versions(self, mozwebqa):
        """This testcase covers # 15043 & 15044 in Litmus.

        1. Verify that at least three mobile versions exist
        2. Verify that filtering by version returns results
        3. Verify that the state of the filters are correct after being applied
        4. Verify product and version values in the URL

        """
        sites_pg = SitesPage(mozwebqa)

        product = "mobile"
        sites_pg.go_to_sites_page()
        sites_pg.product_filter.select_product(product)
        versions = sites_pg.product_filter.versions
        [Assert.not_equal(version, "") for version in versions]
        Assert.greater(len(versions), 2)
        for version in [versions[1], versions[-1]]:
            print "Checking %s version '%s'." % (product, version)
            sites_pg.product_filter.select_version(version)
            Assert.equal(sites_pg.product_filter.selected_product, product)
            Assert.equal(sites_pg.product_filter.selected_version, version)
            Assert.equal(sites_pg.product_from_url, product)
            Assert.equal(sites_pg.version_from_url, version)
示例#5
0
 def click_sites_link(self):
     self.selenium.find_element(*self._sites_link_locator).click()
     from pages.desktop.sites import SitesPage
     return SitesPage(self.testsetup)