Beispiel #1
0
    def test_value_of_timestamp_link(self, mozwebqa):
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        for message in theme_pg.messages:
            Assert.not_none(re.match('(\d+ \w+ ago)|(\w{3} \d{1,2}, \d{4})', message.time))
Beispiel #2
0
    def test_value_of_timestamp_link(self, mozwebqa):
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        for message in theme_pg.messages:
            Assert.not_none(
                re.match('(\d+ \w+ ago)|(\w{3} \d{1,2}, \d{4})', message.time))
Beispiel #3
0
    def test_locale_link_applies_locale_filter(self, mozwebqa):
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        [Assert.true(message.is_locale_visible) for message in theme_pg.messages]

        locale = theme_pg.messages[0].locale
        theme_pg.messages[0].click_locale()

        Assert.true(theme_pg.locale_filter.locale(locale).is_selected)
        for message in theme_pg.messages:
            Assert.equal(message.locale, locale)
Beispiel #4
0
    def test_platform_link_applies_platform_filter(self, mozwebqa):
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        [Assert.true(message.is_platform_visible) for message in theme_pg.messages]

        platform = theme_pg.messages[0].platform
        theme_pg.messages[0].click_platform()

        Assert.true(theme_pg.platform_filter.platform(platform).is_selected)
        for message in theme_pg.messages:
            Assert.equal(message.platform, platform)
Beispiel #5
0
    def test_navigate_to_theme_page(self, mozwebqa):
        """This testcase covers #15170 in Litmus.

        Verify you are able to navigate to individual theme page, includes # of messages,
        page title = THEME, includes link 'Back to all themes', a relative date '1 day ago',
        the user platform, language 3. Verify timestamp link goes to the suggestion, the
        Platform link goes to that product filter, verify language goes to locale filter.

        """
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        Assert.equal(theme_pg.messages_heading, "THEME")
        Assert.true(theme_pg.is_back_link_visible)
        Assert.true(theme_pg.is_message_count_visible)
    def test_themes_filters_persist_when_paging_through_results(self, mozwebqa):
        """This testcase covers # 15018 in Litmus.

        1. Verifies the filter is in the URL
        2. Verifies the currently applied filter is styled appropriately
        3. Verifies the results of the filter

        """
        themes_pg = ThemesPage(mozwebqa)

        themes_pg.go_to_themes_page()
        themes_pg.type_filter.click_issues()
        themes_pg.click_older_messages()
        Assert.equal(themes_pg.feedback_type_from_url, "issue")
        Assert.equal(themes_pg.type_filter.selected_type, "Issues")
        [Assert.equal(theme.type, "Issue") for theme in themes_pg.themes]
Beispiel #7
0
    def test_locale_link_applies_locale_filter(self, mozwebqa):
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        [
            Assert.true(message.is_locale_visible)
            for message in theme_pg.messages
        ]

        locale = theme_pg.messages[0].locale
        theme_pg.messages[0].click_locale()

        Assert.true(theme_pg.locale_filter.locale(locale).is_selected)
        for message in theme_pg.messages:
            Assert.equal(message.locale, locale)
Beispiel #8
0
    def test_platform_link_applies_platform_filter(self, mozwebqa):
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        [
            Assert.true(message.is_platform_visible)
            for message in theme_pg.messages
        ]

        platform = theme_pg.messages[0].platform
        theme_pg.messages[0].click_platform()

        Assert.true(theme_pg.platform_filter.platform(platform).is_selected)
        for message in theme_pg.messages:
            Assert.equal(message.platform, platform)
Beispiel #9
0
    def test_navigate_to_theme_page(self, mozwebqa):
        """This testcase covers #15170 in Litmus.

        Verify you are able to navigate to individual theme page, includes # of messages,
        page title = THEME, includes link 'Back to all themes', a relative date '1 day ago',
        the user platform, language 3. Verify timestamp link goes to the suggestion, the
        Platform link goes to that product filter, verify language goes to locale filter.

        """
        themes_pg = ThemesPage(mozwebqa)
        themes_pg.go_to_themes_page()
        theme_pg = themes_pg.themes[0].click_similar_messages()

        Assert.equal(theme_pg.messages_heading, "THEME")
        Assert.true(theme_pg.is_back_link_visible)
        Assert.true(theme_pg.is_message_count_visible)
Beispiel #10
0
    def test_themes_filters_persist_when_paging_through_results(
            self, mozwebqa):
        """This testcase covers # 15018 in Litmus.

        1. Verifies the filter is in the URL
        2. Verifies the currently applied filter is styled appropriately
        3. Verifies the results of the filter

        """
        themes_pg = ThemesPage(mozwebqa)

        themes_pg.go_to_themes_page()
        themes_pg.type_filter.click_issues()
        themes_pg.click_older_messages()
        Assert.equal(themes_pg.feedback_type_from_url, "issue")
        Assert.equal(themes_pg.type_filter.selected_type, "Issues")
        [Assert.equal(theme.type, "Issue") for theme in themes_pg.themes]
Beispiel #11
0
 def click_themes_link(self):
     self.selenium.find_element(*self._themes_link_locator).click()
     from pages.desktop.themes import ThemesPage
     return ThemesPage(self.testsetup)
Beispiel #12
0
 def click_name(self):
     self._root_element.find_element(*self._name_locator).click()
     from pages.desktop.themes import ThemesPage
     return ThemesPage(self.testsetup)