def test_is_not_found_status_in_mm(base_url, selenium, is_debug): page = NotFoundPage(selenium, base_url).open() if is_debug: assert selenium.title == 'Page not found at /%s' % page.SLUG else: assert page.is_maintenance_mode_banner_displayed assert not page.header.is_signin_displayed
def test_is_expected_content(base_url, selenium): page = NotFoundPage(selenium, base_url).open() assert (ARTICLE_NAME + ARTICLE_TITLE_SUFIX ) == selenium.title, 'page title does not match expected' assert page.page_title_text == ARTICLE_NAME, 'article title is not expected' assert page.page_title_text in selenium.title, 'article title not in page title' assert page.is_report_link_displayed
def test_is_expected_content(base_url, selenium, is_debug): page = NotFoundPage(selenium, base_url).open() if is_debug: assert selenium.title == 'Page not found at /%s' % page.SLUG else: assert selenium.title == (ARTICLE_NAME + ARTICLE_TITLE_SUFIX) assert page.page_title_text == ARTICLE_NAME assert page.page_title_text in selenium.title assert page.is_report_link_displayed
def test_is_not_found_status(base_url, selenium): page = NotFoundPage(selenium, base_url).open() assert_valid_url(selenium.current_url, status_code=requests.codes.not_found)
def test_is_expected_content(base_url, selenium): page = NotFoundPage(selenium, base_url).open() assert (ARTICLE_NAME + ARTICLE_TITLE_SUFIX) == selenium.title assert page.page_title_text == ARTICLE_NAME assert page.page_title_text in selenium.title assert page.is_report_link_displayed
def test_is_not_found_status_in_mm(base_url, selenium): page = NotFoundPage(selenium, base_url).open() assert page.is_maintenance_mode_banner_displayed assert not page.header.is_signin_displayed