<commit_before>import re

import pytest

from pages.article import ArticlePage
from utils.urls import assert_valid_url

ARTICLE_NAME = 'Send feedback (about|on) MDN'


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_location(base_url, selenium):
    article_page = ArticlePage(selenium, base_url).open()
    page = article_page.header.open_feedback()
    assert re.match(ARTICLE_NAME + r' - The MDN project \| MDN',
                    selenium.title)
    assert re.match(ARTICLE_NAME, page.article_title_text)
    assert page.article_title_text in selenium.title


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_feedback_layout(base_url, selenium):
    page = ArticlePage(selenium, base_url).open()
    assert page.is_article_displayed
    assert page.is_article_column_left_present
    assert page.is_article_column_content_present
    column_container = page.article_column_container_region
    assert column_container.is_expected_stacking


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_page_links(base_url, selenium):
    page = ArticlePage(selenium, base_url).open()
    # get all page links
    article_links = page.article_link_list<commit_msg>bug 1525719: fix functional tests for prod (#5427)<commit_after>import re

import pytest

from pages.article import ArticlePage
from utils.urls import assert_valid_url

ARTICLE_NAME = 'Send feedback about MDN Web Docs'


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_location(base_url, selenium):
    article_page = ArticlePage(selenium, base_url).open()
    page = article_page.header.open_feedback()
    assert re.match(ARTICLE_NAME + r' - The MDN project \| MDN',
                    selenium.title)
    assert re.match(ARTICLE_NAME, page.article_title_text)
    assert page.article_title_text in selenium.title


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_feedback_layout(base_url, selenium):
    page = ArticlePage(selenium, base_url).open()
    assert page.is_article_displayed
    assert page.is_article_column_left_present
    assert page.is_article_column_content_present
    column_container = page.article_column_container_region
    assert column_container.is_expected_stacking


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_page_links(base_url, selenium):
    page = ArticlePage(selenium, base_url).open()
    # get all page links
    article_links = page.article_link_list
{'fraction_non_alphanumeric': 0.07878282617757398, 'fraction_numerical': 0.004585243851604835, 'mean_word_length': 4.797101449275362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6418431', 'n_tokens_mistral': 811, 'n_tokens_neox': 783, 'n_words': 156}