예제 #1
0
파일: test_search.py 프로젝트: zu83/kitsune
    def test_user_flow_to_forum_post(self, base_url, selenium):

        if base_url == 'https://support-dev.allizom.org':
            pytest.skip(
                'Search results are not guaranteed to exist on support-dev.allizom.org'
            )

        # 1. start on the home page
        SupportHomePage(base_url, selenium).open()

        # 2. type "Firefox crashed"
        # 3. hit Enter
        search_pg = SearchPage(base_url, selenium).open()
        # FIXME: This is searching from the search page instead of the home page.
        search_pg.do_search_on_search_query(self.forum_search_term + "ed")

        # 4. In the results list there are two types of results:
        #    Forum and KB. Click on a forum result.
        #    (Url is in the forum of /questions/[some number])
        # 5. A complete forum thread should be displayed.
        assert search_pg.is_result_present, "result page is not present."
        result_thread_title = search_pg.result_question_text()
        assert self.forum_search_term in result_thread_title
        is_reached_right_page = search_pg.click_question_link(
            self.forum_search_term)
        assert is_reached_right_page, "a form thread page is not displayed."
예제 #2
0
 def test_login(self, base_url, selenium, variables):
     user = variables['users']['default']
     page = SupportHomePage(base_url, selenium).open()
     page.sign_in(user['username'], user['password'])
     assert page.header.is_user_logged_in, 'User not shown to be logged in'
예제 #3
0
 def home_page(self, do_login=False, user='******'):
     from pages.desktop.support_home_page import SupportHomePage
     return self._go_to_page(SupportHomePage(self.testsetup), do_login,
                             user)
예제 #4
0
 def home_page(self, username=None, password=None):
     from pages.desktop.support_home_page import SupportHomePage
     return self._go_to_page(SupportHomePage(self.testsetup), username,
                             password)