示例#1
0
    def test_that_checks_the_vote_of_an_article(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        article_page = home.search_for('firefox').results[0].click()
        assert '| Mozilla Support' in article_page.page_title
        assert 'Was this article helpful?' == article_page.helpful_header_text

        article_page.click_helpful_button()
        article_page.wait_for_vote_message_text(u'Glad to hear it \u2014 thanks for the feedback!')
示例#2
0
    def test_that_checks_the_vote_of_an_article(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        article_page = home.click_to_see_first_article()
        Assert.contains("How to | Firefox Help", article_page.page_title)
        Assert.equal("Was this article helpful?", article_page.helpul_form_text)

        article_page.click_helpful_button()
        Assert.true(article_page.is_vote_box_visible)
        Assert.equal(u"Glad to hear it \u2014 thanks for the feedback!", article_page.vote_box_text)
示例#3
0
    def test_that_checks_the_vote_of_an_article(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        article_page = home.search_for('firefox').results[0].click()
        assert '| Mozilla Support' in article_page.page_title
        assert 'Was this article helpful?' == article_page.helpful_header_text

        article_page.click_helpful_button()
        article_page.wait_for_vote_message_text(
            u'Glad to hear it \u2014 thanks for the feedback!')
示例#4
0
    def test_that_checks_the_vote_of_an_article(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        article_page = home.click_to_see_first_article()
        Assert.contains("How to | Firefox Help", article_page.page_title)
        Assert.equal("Was this article helpful?",
                     article_page.helpul_form_text)

        article_page.click_helpful_button()
        Assert.true(article_page.is_vote_box_visible)
        Assert.equal(u"Glad to hear it \u2014 thanks for the feedback!",
                     article_page.vote_box_text)
示例#5
0
    def test_the_expandable_header_menu(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()
        home.header.click_header_menu()
        Assert.true(home.header.is_dropdown_menu_expanded)

        menu_names = [menu.name for menu in home.header.dropdown_menu_items]
        Assert.equal(menu_names, self.expected_menu_items)

        home.header.click_header_menu()
        Assert.false(home.header.is_dropdown_menu_expanded)
示例#6
0
    def test_the_expandable_header_menu(self, mozwebqa):
        expected_menu_items = [u'Home',
                               u'Ask a question',
                               u'Support Forum',
                               u'Help other users',
                               u'Switch to desktop site',
                               u'Sign in',
                               u'Switch language']
        home = PageProvider(mozwebqa).home_page()
        home.open_menu()
        assert home.is_menu_exposed, 'Menu is not open'

        menu_names = [menu.name for menu in home.menu_items]
        assert expected_menu_items == menu_names

        home.close_menu()
        assert not home.is_menu_exposed, 'Menu is not closed'
示例#7
0
    def test_that_negative_search_does_not_return_results(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        search_page = home.search_for("frfx")
        Assert.equal(len(search_page.results), 0)
示例#8
0
    def test_that_positive_search_returns_results(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        search_page = home.search_for("firefox")
        Assert.greater(len(search_page.results), 0)
示例#9
0
    def test_that_negative_search_does_not_return_results(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        search_page = home.search_for("frfx")
        Assert.equal(len(search_page.results), 0)
示例#10
0
    def test_that_positive_search_returns_results(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        search_page = home.search_for("firefox")
        Assert.greater(len(search_page.results), 0)
示例#11
0
    def test_the_header_text_and_page_title(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()
        home.is_the_current_page

        Assert.equal('Firefox Help\nfor Mobile', home.header_text)
        Assert.equal('Return to Firefox Support homepage', home.header_title)
示例#12
0
    def test_that_negative_search_does_not_return_results(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        search_page = home.search_for('frfx')
        assert 0 == len(search_page.results), 'Search results found but none expected'
示例#13
0
    def test_that_positive_search_returns_results(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()

        search_page = home.search_for('firefox')
        assert len(search_page.results) > 0, 'No search results found'
示例#14
0
    def test_the_header_text(self, mozwebqa):
        home = PageProvider(mozwebqa).home_page()
        home.is_the_current_page

        assert 'Products' == home.header_text