Revert "- Adding tests for: popular topics page, product solutions page, contact support page, submitted aaq questions for freemium products, freemium aaq form (#5812)" (#5817)

This reverts commit db58b90a72.
This commit is contained in:
Ryan Johnson 2023-12-14 10:15:14 -08:00 коммит произвёл GitHub
Родитель db58b90a72
Коммит fff9d339fb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
38 изменённых файлов: 159 добавлений и 1623 удалений

40
.github/workflows/playwright.yml поставляемый
Просмотреть файл

@ -141,46 +141,6 @@ jobs:
if: success() || failure() && steps.create-sessions.outcome == 'success' if: success() || failure() && steps.create-sessions.outcome == 'success'
run: | run: |
poetry run pytest -m userQuestions --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_user_questions_page_tests.html --capture=tee-sys poetry run pytest -m userQuestions --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_user_questions_page_tests.html --capture=tee-sys
- name: Run Contact Support Page Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m contactSupportPage --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_contact_support_page_tests.html --capture=tee-sys
- name: Run Contact Support Page Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m contactSupportPage --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_contact_support_page_tests.html --capture=tee-sys
- name: Run Product Solutions Page Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m productSolutionsPage --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_product_solutions_page_tests.html --capture=tee-sys
- name: Run Product Solutions Page Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m productSolutionsPage --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_product_solutions_page_tests.html --capture=tee-sys
- name: Run Product Topics Page Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m productTopicsPage --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_product_topics_page_tests.html --capture=tee-sys
- name: Run Product Topics Page Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m productTopicsPage --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_product_topics_page_tests.html --capture=tee-sys
- name: Run AAQ Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m aaqPage --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_aaq_tests.html --capture=tee-sys
- name: Run AAQ Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m aaqPage --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_aaq_tests.html --capture=tee-sys
- name: Combine Reports - name: Combine Reports
working-directory: playwright_tests working-directory: playwright_tests
if: success() || failure() if: success() || failure()

Просмотреть файл

@ -34,10 +34,6 @@ class TestUtilities:
user_message_test_data = json.load(user_message_test_data_file) user_message_test_data = json.load(user_message_test_data_file)
user_message_test_data_file.close() user_message_test_data_file.close()
with open("test_data/general_data.json", "r") as general_test_data_file:
general_test_data = json.load(general_test_data_file)
general_test_data_file.close()
user_secrets_accounts = { user_secrets_accounts = {
"TEST_ACCOUNT_12": os.environ.get("TEST_ACCOUNT_12"), "TEST_ACCOUNT_12": os.environ.get("TEST_ACCOUNT_12"),
"TEST_ACCOUNT_13": os.environ.get("TEST_ACCOUNT_13"), "TEST_ACCOUNT_13": os.environ.get("TEST_ACCOUNT_13"),
@ -131,9 +127,6 @@ class TestUtilities:
def wait_for_given_timeout(self, milliseconds: int): def wait_for_given_timeout(self, milliseconds: int):
self.page.wait_for_timeout(milliseconds) self.page.wait_for_timeout(milliseconds)
def wait_for_url_to_be(self, expected_url: str):
self.page.wait_for_url(expected_url, timeout=4000)
# Store authentication states # Store authentication states
def store_session_cookies(self, session_file_name: str): def store_session_cookies(self, session_file_name: str):
self.context.storage_state(path=f"core/sessions/.auth/{session_file_name}.json") self.context.storage_state(path=f"core/sessions/.auth/{session_file_name}.json")
@ -151,9 +144,6 @@ class TestUtilities:
# session # session
self.page.reload() self.page.reload()
def get_user_agent(self) -> str:
return self.page.evaluate('window.navigator.userAgent ')
def replace_special_chars_account(self, account: str) -> str: def replace_special_chars_account(self, account: str) -> str:
return account.replace(account, "testMozillaSpecialChars") return account.replace(account, "testMozillaSpecialChars")

Просмотреть файл

@ -3,7 +3,7 @@ from playwright_tests.core.testutilities import TestUtilities
from playwright_tests.pages.product_solutions_pages.product_solutions_page import ( from playwright_tests.pages.product_solutions_pages.product_solutions_page import (
ProductSolutionsPage) ProductSolutionsPage)
from playwright_tests.pages.top_navbar import TopNavbar from playwright_tests.pages.top_navbar import TopNavbar
from playwright_tests.pages.aaq_pages.aaq_form_page import AAQFormPage from playwright_tests.pages.user_questions_pages.aaq_form_page import AAQFormPage
from playwright_tests.pages.user_questions_pages.questions_page import QuestionPage from playwright_tests.pages.user_questions_pages.questions_page import QuestionPage
@ -11,65 +11,24 @@ class AAQFlow(AAQFormPage, ProductSolutionsPage, TopNavbar, TestUtilities, Quest
def __init__(self, page: Page): def __init__(self, page: Page):
super().__init__(page) super().__init__(page)
# Mozilla VPN has an extra optional dropdown menu for choosing an operating system def submit_valid_firefox_prod_question_via_ask_now_fx_solutions(self) -> dict:
def submit_an_aaq_question_for_a_product(self, random_number = str(super().generate_random_number(min_value=0, max_value=1000))
subject: str, super().click_on_ask_a_question_firefox_browser_option()
topic_name: str, super().click_ask_now_button()
body: str, aaq_question_data = super().aaq_question_test_data
os="", aaq_subject = aaq_question_data["valid_firefox_question"]["subject"] + " " + random_number
attach_image=False): super().add_text_to_aaq_form_subject_field(aaq_subject)
question_subject = self.add__valid_data_to_all_input_fields_without_submitting( super().select_aaq_form_topic_value(
subject, aaq_question_data["valid_firefox_question"]["topic_value"]
topic_name,
body,
os,
attach_image
) )
# Submitting the question. super().add_text_to_aaq_textarea_field(
aaq_question_data["valid_firefox_question"]["question_body"]
)
# Investigate why image upload is not working
super().click_aaq_form_submit_button() super().click_aaq_form_submit_button()
# Waiting for submitted question reply button visibility.
super().is_post_reply_button_visible() super().is_post_reply_button_visible()
current_page_url = self._page.url current_page_url = self._page.url
# Returning the posted question subject and url for further usage. return {"aaq_subject": aaq_subject, "question_page_url": current_page_url}
return {"aaq_subject": question_subject, "question_page_url": current_page_url}
# Mozilla VPN has an extra optional dropdown menu for choosing an operating system
def add__valid_data_to_all_input_fields_without_submitting(self,
subject: str,
topic_value: str,
body_text: str,
os='',
attach_image=False):
random_number = str(super().generate_random_number(min_value=0, max_value=1000))
aaq_subject = subject + random_number
# Adding text to subject field.
super().add_text_to_aaq_form_subject_field(aaq_subject)
# Selecting a topic.
super().select_aaq_form_topic_value(
topic_value
)
# Adding text to question body.
super().add_text_to_aaq_textarea_field(
body_text
)
# Some products contain another OS dropdown menu. We are selecting an option for those.
if os != "":
super().select_aaq_form_os_value(os)
if attach_image:
# Uploading an image to the aaq question form.
super().get_upload_image_button_locator().set_input_files(
super().aaq_question_test_data["valid_firefox_question"]["image_path"]
)
# Waiting for the image preview to be displayed.
super().uploaded_image_locator()
# Returning the entered question subject for further usage.
return aaq_subject
def adding_an_image_to_aaq_form(self):
super().get_upload_image_button_locator().set_input_files(
super().aaq_question_test_data["valid_firefox_question"]["image_path"]
)

Просмотреть файл

@ -1,10 +0,0 @@
class AAQFormMessages:
COMPLETED_MILESTONE_ONE = "Change Product"
COMPLETED_MILESTONE_TWO = "Explore Solutions"
IN_PROGRESS_MILESTONE = "Get Support"
SUMO_PAGE_INTRO = ("Be nice. Our volunteers are Mozilla users just like you, who take the "
"time out of their day to help.")
INFO_CARD = ("Be descriptive. Saying “playing video on YouTube is always choppy” will help us "
"understand the issue better than saying “something is wrong” or “the app is "
"broken”.")
ERROR_MESSAGE = "This field is required."

Просмотреть файл

@ -1,5 +0,0 @@
class AAQWidgetMessages:
FREEMIUM_PRODUCTS_AAQ_WIDGET_BUTTON_TEXT = "Ask Now"
PREMIUM_PRODUCTS_AAQ_WIDGET_BUTTON_TEXT = "Contact Support"
FREEMIUM_AAQ_SUBHEADING_TEXT_SIGNED_OUT = "Sign in/up to post your question and get help."
PREMIUM_AAQ_SUBHEADING_TEXT = "Send a message to our support team."

Просмотреть файл

@ -1,23 +0,0 @@
class ContactSupportMessages:
PAGE_URL = "https://support.allizom.org/en-US/questions/new"
PAGE_URL_CHANGE_PRODUCT_REDIRECT = PAGE_URL + "?q=change_product"
CURRENT_MILESTONE = "Select Product"
MAIN_HEADER = "Contact Support"
SUBHEADING = "Which product do you need help with?"
PRODUCT_CARDS_SUBHEADING = {
"Firefox": "Web browser for Windows, Mac and Linux",
"Firefox for Android": "Web browser for Android smartphones and tablets",
"Firefox for iOS": "Firefox for iPhone, iPad and iPod touch devices",
"Firefox for Enterprise": "Firefox Quantum for businesses",
"MDN Plus": "MDN Plus provides a custom experience for MDN supporters.",
"Firefox Reality": "Firefox for Virtual Reality headsets",
"Mozilla VPN": "VPN for Windows 10, Android and iOS devices",
"Firefox Private Network": "Browse securely on public Wi-Fi",
"Firefox Relay": "Service that lets you create aliases to hide your real email",
"Pocket": "The webs most intriguing articles",
"Hubs": "Virtual 3D meeting spaces for collaborating with friends, family, "
"and colleagues on your browser or VR headset",
"Thunderbird": "Email software for Windows, Mac and Linux",
"Firefox Focus": "Automatic privacy browser and content blocker",
"Mozilla Account": "Mozilla account is the account system for Mozilla"
}

Просмотреть файл

@ -1,4 +0,0 @@
class SupportForumsPageMessages:
PAGE_URL = "https://support.allizom.org/en-US/questions/"
PAGE_TITLE = "Support Forums"
PAGE_SUBTITLE = "Browse by product"

Просмотреть файл

@ -1,6 +1,5 @@
class HomepageMessages: class HomepageMessages:
STAGE_HOMEPAGE_URL = "https://support.allizom.org" STAGE_HOMEPAGE_URL = "https://support.allizom.org/en-US/"
STAGE_HOMEPAGE_URL_EN_US = "https://support.allizom.org/en-US/"
JOIN_OUR_COMMUNITY_CARD_TITLE = "Join Our Community" JOIN_OUR_COMMUNITY_CARD_TITLE = "Join Our Community"
JOIN_OUR_COMMUNITY_CARD_DESCRIPTION = ( JOIN_OUR_COMMUNITY_CARD_DESCRIPTION = (
"Grow and share your expertise with others. Answer questions and improve " "Grow and share your expertise with others. Answer questions and improve "

Просмотреть файл

@ -1,4 +1,2 @@
class KBArticlePageMessages: class KBArticlePageMessages:
CREATE_NEW_KB_ARTICLE_STAGE_URL = "https://support.allizom.org/en-US/kb/new" CREATE_NEW_KB_ARTICLE_STAGE_URL = "https://support.allizom.org/en-US/kb/new"
GET_COMMUNITY_SUPPORT_ARTICLE_LINK = ("https://support.allizom.org/en-US/kb/get-community"
"-support?exit_aaq=1")

Просмотреть файл

@ -1,3 +0,0 @@
class ProductSolutionsMessages:
PAGE_HEADER = " Solutions"
CURRENT_MILESTONE_TEXT = "Explore Solutions"

Просмотреть файл

@ -1,158 +0,0 @@
from playwright.sync_api import Page, ElementHandle, Locator
from playwright_tests.core.basepage import BasePage
class AAQFormPage(BasePage):
__uploaded_image_title = ""
__in_progress_item_label = ("//li[@class='progress--item is-current']//span["
"@class='progress--label']")
__aaq_page_logo = "//img[@class='page-heading--logo']"
__aaq_page_product_heading = "//div[@id='main-content']/article/h3"
__aaq_page_intro_text = "//form[@id='question-form']/p[@class='sumo-page-intro']"
__aaq_page_info_card = "//div[contains(@class, 'info card')]"
# AAQ Subject
__aaq_subject_input_field = "//input[@id='id_title']"
__aaq_subject_input_field_error_message = "//input[@id='id_title']/following-sibling::ul/li"
# Product topic dropdown
__product_topic_options = "//select[@id='id_category']/option"
__product_topic_options_without_default_none = ('//select[@id="id_category"]/option[not('
'@value="")]')
__product_topic_select_dropdown = "//select[@id='id_category']"
__product_topic_select_dropdown_error_message = ("//select[@id='id_category']/../ul["
"@class='errorlist']/li")
# Product os dropdown (Available for Mozilla VPN product only)
__product_os_select_dropdown = "//select[@id='id_os']"
# How can we help textarea field
__how_can_we_help_textarea = "//textarea[@id='id_content']"
__how_can_we_help_textarea_error_field = ("//textarea[@id='id_content']/../following-sibling"
"::ul/li")
# Add Image
__add_image_browse_button = "//span[text()='Browse...']/.."
__uploaded_test_image_preview = f"//img[@title='{__uploaded_image_title}']"
__uploaded_test_image_delete_button = "//form[@class='upload-input']/input[@class='delete']"
__uploaded_image = "//a[@class='image']/img"
# Email me when someone answers the thread checkbox
__email_me_checkbox = "//input[@id='id_notifications']"
# form buttons
__form_submit_button = "//button[contains(text(), 'Submit')]"
__form_cancel_option = "//a[contains(text(),'Cancel')]"
# Share Data
__share_data_button = "//button[@id='share-data']"
__troubleshooting_information_textarea = "//textarea[@id='id_troubleshooting']"
__try_these_manual_steps_link = "//p[@id='troubleshooting-manual']/a"
__show_details_option = "//a[@class='show']"
__product_version_input = "//input[@id='id_ff_version']"
__product_os = "//input[@id='id_os']"
# Helfpul Tip section
__helpful_tip_section = "//aside[@class='sumo-l-two-col--sidebar']/div[@class='large-only']"
# Learn more button
__learn_more_button = "//aside[@class='sumo-l-two-col--sidebar']//a"
def __init__(self, page: Page):
super().__init__(page)
def get_in_progress_item_label(self) -> str:
return super()._get_text_of_element(self.__in_progress_item_label)
def get_product_image_locator(self) -> Locator:
return super()._get_element_locator(self.__aaq_page_logo)
def get_aaq_form_page_heading(self) -> str:
return super()._get_text_of_element(self.__aaq_page_product_heading)
def get_aaq_form_page_intro_text(self) -> str:
return super()._get_text_of_element(self.__aaq_page_intro_text)
def get_aaq_form_info_card_text(self) -> str:
return super()._get_text_of_element(self.__aaq_page_info_card)
def get_aaq_form_subject_error(self) -> str:
return super()._get_text_of_element(self.__aaq_subject_input_field_error_message)
def get_learn_more_button_locator(self) -> Locator:
return super()._get_element_locator(self.__learn_more_button)
def get_helpful_tip_locator(self) -> Locator:
return super()._get_element_locator(self.__helpful_tip_section)
def get_aaq_form_topic_select_error(self) -> str:
return super()._get_text_of_element(self.__product_topic_select_dropdown_error_message)
# Returns all the non-default selectable topic options.
def get_aaq_form_topic_options(self) -> list[str]:
return super()._get_text_of_elements(self.__product_topic_options_without_default_none)
def get_aaq_form_body_error(self) -> str:
return super()._get_text_of_element(self.__how_can_we_help_textarea_error_field)
def add_text_to_aaq_form_subject_field(self, text: str):
super()._fill(self.__aaq_subject_input_field, text)
def add_text_to_troubleshooting_information_textarea(self, text: str):
super()._fill(self.__troubleshooting_information_textarea, text)
def add_text_to_product_version_field(self, text: str):
super()._fill(self.__product_version_input, text)
def add_text_to_os_field(self, text: str):
super()._fill(self.__product_os, text)
def select_aaq_form_topic_value(self, value: str):
super()._select_option_by_value(self.__product_topic_select_dropdown, value)
def select_aaq_form_os_value(self, value: str):
super()._select_option_by_value(self.__product_os_select_dropdown, value)
def add_text_to_aaq_textarea_field(self, text: str):
super()._fill(self.__how_can_we_help_textarea, text)
def image_preview_element(self) -> ElementHandle:
return super()._get_element_handle(self.__uploaded_test_image_preview)
def uploaded_image_locator(self) -> Locator:
try:
super()._wait_for_selector(self.__uploaded_image)
except TimeoutError:
print("Uploaded image not displayed")
return super()._get_element_locator(self.__uploaded_image)
def uploaded_images_handles(self) -> list[ElementHandle]:
return super()._get_element_handles(self.__uploaded_image)
def get_upload_image_button_locator(self) -> Locator:
return super()._get_element_locator(self.__add_image_browse_button)
def click_on_email_me_when_someone_answers_the_thread_checkbox(self):
super()._click(self.__email_me_checkbox)
def click_on_a_particular_completed_milestone(self, milestone_name: str):
xpath = f'//span[@class="progress--label" and text()="{milestone_name}"]/../..'
super()._click(xpath)
def click_aaq_form_cancel_button(self):
super()._click(self.__form_cancel_option)
def click_aaq_form_submit_button(self):
super()._click(self.__form_submit_button)
def click_on_learn_more_button(self):
super()._click(self.__learn_more_button)
def click_on_share_data_button(self):
super()._click(self.__share_data_button)
def click_on_show_details_option(self):
super()._click(self.__show_details_option)
def click_on_try_these_manual_steps_link(self):
super()._click(self.__try_these_manual_steps_link)

Просмотреть файл

@ -1,38 +0,0 @@
from playwright.sync_api import Page
from playwright_tests.core.basepage import BasePage
class ContactSupportPage(BasePage):
__current_milestone = ("//li[@class='progress--item is-current']//span["
"@class='progress--label']")
__page_main_heading = "//h1[@class='sumo-page-heading']"
__page_subheading = "//h2[@class='sumo-page-subheading']"
__browse_all_product_forums_button = "//a[contains(text(), 'Browse All Product Forums')]"
__product_cards_titles = "//div[@id='product-picker']//h3[@class='card--title']"
def __init__(self, page: Page):
super().__init__(page)
def _get_text_of_current_milestone(self) -> str:
return super()._get_text_of_element(self.__current_milestone)
def _get_contact_support_main_heading(self) -> str:
return super()._get_text_of_element(self.__page_main_heading)
def _get_contact_support_subheading_text(self) -> str:
return super()._get_text_of_element(self.__page_subheading)
def _get_all_product_card_titles(self) -> list[str]:
return super()._get_text_of_elements(self.__product_cards_titles)
def _get_product_card_subtitle(self, card_name: str) -> str:
xpath = (f"//a[@data-event-label='{card_name}']/..//following-sibling::p["
f"@class='card--desc']")
return super()._get_text_of_element(xpath)
def _click_on_browse_all_product_forums_button(self):
super()._click(self.__browse_all_product_forums_button)
def _click_on_a_particular_card(self, card_name: str):
xpath = f"//h3[@class='card--title']/a[@data-event-label='{card_name}']"
super()._click(xpath)

Просмотреть файл

@ -1,32 +0,0 @@
from playwright.sync_api import Page
from playwright_tests.core.basepage import BasePage
class SupportForumsPage(BasePage):
__page_main_heading = "//h1[@class='sumo-page-heading']"
__page_intro = "//p[@class='sumo-page-intro']"
__product_card_titles = "//h3[@class='card--title']"
__all_products_support_forum_button = "//a[contains(text(), 'All Products Support Forum')]"
def __init__(self, page: Page):
super().__init__(page)
def _get_page_heading_text(self) -> str:
return super()._get_text_of_element(self.__page_main_heading)
def _get_page_intro_text(self) -> str:
return super()._get_text_of_element(self.__page_intro)
def _get_product_card_titles_list(self) -> list[str]:
return super()._get_text_of_elements(self.__product_card_titles)
def _get_card_description_text(self, card_title: str) -> str:
xpath = f"//strong[text()='{card_title}']/../../following-sibling::p"
return super()._get_text_of_element(xpath)
def _click_on_all_products_support_forum_button(self):
super()._click(self.__all_products_support_forum_button)
def _click_on_a_particular_product_card(self, card_name: str):
xpath = f"//strong[text()='{card_name}']"
super()._click(xpath)

Просмотреть файл

@ -6,59 +6,22 @@ class ProductSolutionsPage(BasePage):
__complete_progress_item = "//li[@class='progress--item is-complete']/a" __complete_progress_item = "//li[@class='progress--item is-complete']/a"
__complete_progress_item_label = ("//li[@class='progress--item is-complete']//span[" __complete_progress_item_label = ("//li[@class='progress--item is-complete']//span["
"@class='progress--label']") "@class='progress--label']")
__current_progress_item = "//li[@class='progress--item is-current']/a"
__current_progress_item_label = ("//li[@class='progress--item is-current']//span[" __current_progress_item_label = ("//li[@class='progress--item is-current']//span["
"@class='progress--label']") "@class='progress--label']")
__product_title_heading = "//span[@class='product-title-text']" __product_title_heading = "//span[@class='product-title-text']"
__product_solutions_find_help_searchbar = "//form[@id='question-search-masthead']/input" __product_solutions_find_help_searchbar = "//form[@id='question-search-masthead']/input"
__product_solutions_find_help_search_button = "//form[@id='question-search-masthead']/button" __product_solutions_find_help_search_button = "//form[@id='question-search-masthead']/button"
__page_heading_intro_text = "//p[@class='page-heading--intro-text']" __page_heading_intro_text = "//p[@class='page-heading--intro-text']"
__still_need_help_subheading = "//div[contains(@class, 'aaq-widget')]/p"
__still_need_help_ask_now_button = "//a[@data-event-action='aaq']" __still_need_help_ask_now_button = "//a[@data-event-action='aaq']"
__featured_article_section_title = "//h2[contains(text(),'Featured Articles')]"
__featured_articles_cards = "//h2[contains(text(),'Featured Articles')]/../..//a" __featured_articles_cards = "//h2[contains(text(),'Featured Articles')]/../..//a"
__popular_topics_section_title = "//h2[contains(text(),'Popular Topics')]"
__popular_topics_cards = "//h2[contains(text(),'Popular Topics')]/../..//a" __popular_topics_cards = "//h2[contains(text(),'Popular Topics')]/../..//a"
def __init__(self, page: Page): def __init__(self, page: Page):
super().__init__(page) super().__init__(page)
def _click_ask_now_button(self): def click_ask_now_button(self):
super()._click(self.__still_need_help_ask_now_button) super()._click(self.__still_need_help_ask_now_button)
def _click_on_the_completed_milestone(self): def is_product_solutions_page_header_displayed(self) -> ElementHandle:
super()._click(self.__complete_progress_item)
def _click_on_a_featured_article_card(self, card_name: str):
xpath = f'//h2[contains(text(),"Featured Articles")]/../..//a[text()="{card_name}"]'
super()._click(xpath)
def _click_on_a_popular_topic_card(self, card_name: str):
xpth = f'//h2[contains(text(),"Popular Topics")]/../..//a[@data-event-label="{card_name}"]'
super()._click(xpth)
def _get_current_milestone_text(self) -> str:
return super()._get_text_of_element(self.__current_progress_item_label)
def _get_product_solutions_heading(self) -> str:
return super()._get_text_of_element(self.__product_title_heading)
def _get_aaq_subheading_text(self) -> str:
return super()._get_text_of_element(self.__still_need_help_subheading)
def _get_all_featured_articles_titles(self) -> list[str]:
return super()._get_text_of_elements(self.__featured_articles_cards)
def _get_aaq_widget_button_name(self) -> str:
return super()._get_text_of_element(self.__still_need_help_ask_now_button)
def _get_popular_topics(self) -> list[str]:
return super()._get_text_of_elements(self.__popular_topics_cards)
def _is_product_solutions_page_header_displayed(self) -> ElementHandle:
return super()._get_element_handle(self.__product_title_heading) return super()._get_element_handle(self.__product_title_heading)
def _is_featured_article_section_displayed(self) -> bool:
return super()._is_element_visible(self.__featured_article_section_title)
def _is_popular_topics_section_displayed(self) -> bool:
return super()._is_element_visible(self.__popular_topics_section_title)

Просмотреть файл

@ -8,8 +8,8 @@ class ProductSupportPage(BasePage):
def __init__(self, page: Page): def __init__(self, page: Page):
super().__init__(page) super().__init__(page)
def _get_product_title_text(self) -> str: def get_product_title_text(self) -> str:
return super()._get_text_of_element(self.__product_title) return super()._get_text_of_element(self.__product_title)
def _product_product_title_element(self) -> Locator: def product_product_title_element(self) -> Locator:
return super()._get_element_locator(self.__product_title) return super()._get_element_locator(self.__product_title)

Просмотреть файл

@ -1,41 +0,0 @@
from playwright.sync_api import Page
from playwright_tests.core.basepage import BasePage
class ProductTopicPage(BasePage):
__page_title = "//h1[@class='topic-title sumo-page-heading']"
__page_subheading = "//div[@class='sumo-article-header--text']/p"
__navbar_links = "//a[@data-event-action='topic sidebar']"
__selected_nav_link = "//a[contains(@class,'selected')]"
__learn_more_button = "//section[@id='get-involved-button']//a"
__still_need_help_subheading = "//div[contains(@class, 'aaq-widget')]/p"
__aaq_button = "//a[@data-event-label='aaq widget']"
def __init__(self, page: Page):
super().__init__(page)
def _get_page_title(self) -> str:
return super()._get_text_of_element(self.__page_title)
def _get_selected_navbar_option(self) -> str:
return super()._get_text_of_element(self.__selected_nav_link)
def _get_navbar_links_text(self) -> list[str]:
return super()._get_text_of_elements(self.__navbar_links)
def _get_aaq_subheading_text(self) -> str:
return super()._get_text_of_element(self.__still_need_help_subheading)
def _click_on_a_navbar_option(self, option_name: str):
xpath = f'//a[@data-event-action="topic sidebar" and contains(text(), "{option_name}")]'
super()._click(xpath)
def _click_on_aaq_button(self):
super()._click(self.__aaq_button)
def _click_on_learn_more_button(self):
super()._click(self.__learn_more_button)
def _get_navbar_option_link(self, option_name: str) -> str:
xpath = f'//a[@data-event-action="topic sidebar" and contains(text(), "{option_name}")]'
return super()._get_element_attribute_value(xpath, "href")

Просмотреть файл

@ -6,25 +6,19 @@ from playwright_tests.flows.auth_flows.auth_flow import AuthFlowPage
from playwright_tests.flows.messaging_system_flows.messaging_system_flow import ( from playwright_tests.flows.messaging_system_flows.messaging_system_flow import (
MessagingSystemFlows) MessagingSystemFlows)
from playwright_tests.flows.user_profile_flows.edit_profile_data_flow import EditProfileDataFlow from playwright_tests.flows.user_profile_flows.edit_profile_data_flow import EditProfileDataFlow
from playwright_tests.pages.aaq_pages.aaq_form_page import AAQFormPage
from playwright_tests.pages.articles.kb_article_page import KBArticlePage from playwright_tests.pages.articles.kb_article_page import KBArticlePage
from playwright_tests.pages.articles.kb_article_show_history_page import KBArticleShowHistoryPage from playwright_tests.pages.articles.kb_article_show_history_page import KBArticleShowHistoryPage
from playwright_tests.pages.auth_page import AuthPage from playwright_tests.pages.auth_page import AuthPage
from playwright_tests.pages.contact_support_pages.contact_support_page import ContactSupportPage
from playwright_tests.pages.contribute_pages.contribute_page import ContributePage from playwright_tests.pages.contribute_pages.contribute_page import ContributePage
from playwright_tests.pages.contribute_pages.ways_to_contribute_pages import WaysToContributePages from playwright_tests.pages.contribute_pages.ways_to_contribute_pages import WaysToContributePages
from playwright_tests.pages.footer import FooterSection from playwright_tests.pages.footer import FooterSection
from playwright_tests.pages.forums_pages.support_forums_page import SupportForumsPage
from playwright_tests.pages.homepage import Homepage from playwright_tests.pages.homepage import Homepage
from playwright_tests.pages.messaging_system_pages.inbox_page import InboxPage from playwright_tests.pages.messaging_system_pages.inbox_page import InboxPage
from playwright_tests.pages.messaging_system_pages.mess_system_user_navbar import ( from playwright_tests.pages.messaging_system_pages.mess_system_user_navbar import (
MessagingSystemUserNavbar) MessagingSystemUserNavbar)
from playwright_tests.pages.messaging_system_pages.new_message import NewMessagePage from playwright_tests.pages.messaging_system_pages.new_message import NewMessagePage
from playwright_tests.pages.messaging_system_pages.sent_messages import SentMessagePage from playwright_tests.pages.messaging_system_pages.sent_messages import SentMessagePage
from playwright_tests.pages.product_solutions_pages.product_solutions_page import \
ProductSolutionsPage
from playwright_tests.pages.product_support_page import ProductSupportPage from playwright_tests.pages.product_support_page import ProductSupportPage
from playwright_tests.pages.product_topics_pages.product_topics_page import ProductTopicPage
from playwright_tests.pages.top_navbar import TopNavbar from playwright_tests.pages.top_navbar import TopNavbar
from playwright_tests.pages.user_pages.my_profile_answers_page import MyProfileAnswersPage from playwright_tests.pages.user_pages.my_profile_answers_page import MyProfileAnswersPage
from playwright_tests.pages.user_pages.my_profile_documents_page import MyProfileDocumentsPage from playwright_tests.pages.user_pages.my_profile_documents_page import MyProfileDocumentsPage
@ -76,28 +70,13 @@ class SumoPages:
# Contribute page. # Contribute page.
self.contribute_page = ContributePage(page) self.contribute_page = ContributePage(page)
# AAQ Pages
self.aaq_form_page = AAQFormPage(page)
# KB Articles. # KB Articles.
self.kb_article_page = KBArticlePage(page) self.kb_article_page = KBArticlePage(page)
self.kb_article_show_history_page = KBArticleShowHistoryPage(page) self.kb_article_show_history_page = KBArticleShowHistoryPage(page)
# Product Topics page
self.product_topics_page = ProductTopicPage(page)
# Product Solutions page.
self.product_solutions_page = ProductSolutionsPage(page)
# Product Support page. # Product Support page.
self.product_support_page = ProductSupportPage(page) self.product_support_page = ProductSupportPage(page)
# Contact Support page.
self.contact_support_page = ContactSupportPage(page)
# Forums
self.support_forums_page = SupportForumsPage(page)
# Auth flow Page. # Auth flow Page.
self.auth_flow_page = AuthFlowPage(page) self.auth_flow_page = AuthFlowPage(page)

Просмотреть файл

@ -14,8 +14,6 @@ class TopNavbar(BasePage):
__ask_a_question_option = "//h4[contains(text(),'Ask a Question')]/parent::a" __ask_a_question_option = "//h4[contains(text(),'Ask a Question')]/parent::a"
__aaq_firefox_browser_option = ("//div[@id='main-navigation']//h4[contains(text(), 'Ask a " __aaq_firefox_browser_option = ("//div[@id='main-navigation']//h4[contains(text(), 'Ask a "
"Question')]/../..//a[contains(text(),'Firefox Browser')]") "Question')]/../..//a[contains(text(),'Firefox Browser')]")
__browse_all_products_option = "//div[@id='main-navigation']//a[text()='Browse All Products']"
# Contribute Tools # Contribute Tools
__contribute_option = "//a[contains(text(),'Contribute')]" __contribute_option = "//a[contains(text(),'Contribute')]"
@ -78,18 +76,10 @@ class TopNavbar(BasePage):
super()._hover_over_element(self.__signed_in_username) super()._hover_over_element(self.__signed_in_username)
super()._click(self.__signed_in_my_questions_option) super()._click(self.__signed_in_my_questions_option)
def click_on_ask_a_question_option(self):
super()._hover_over_element(self.__get_help_option)
super()._click(self.__ask_a_question_option)
def click_on_ask_a_question_firefox_browser_option(self): def click_on_ask_a_question_firefox_browser_option(self):
super()._hover_over_element(self.__get_help_option) super()._hover_over_element(self.__get_help_option)
super()._click(self.__aaq_firefox_browser_option) super()._click(self.__aaq_firefox_browser_option)
def click_on_browse_all_products_option(self):
super()._hover_over_element(self.__get_help_option)
super()._click(self.__browse_all_products_option)
def get_text_of_logged_in_username(self) -> str: def get_text_of_logged_in_username(self) -> str:
return super()._get_text_of_element(self.__signed_in_username) return super()._get_text_of_element(self.__signed_in_username)

Просмотреть файл

@ -30,10 +30,3 @@ class MyProfileMyQuestionsPage(BasePage):
def get_text_of_first_listed_question(self) -> str: def get_text_of_first_listed_question(self) -> str:
xpath = "//article[@id='profile']/ul/a[1]" xpath = "//article[@id='profile']/ul/a[1]"
return super()._get_element_inner_text_from_page(xpath) return super()._get_element_inner_text_from_page(xpath)
def get_listed_question(self, question_name: str) -> Locator:
xpath = f"//article[@id='profile']/ul/a/li[text()='{question_name}']"
return super()._get_element_locator(xpath)
def get_all_my_posted_questions(self) -> list[str]:
return super()._get_text_of_elements(self.__my_profile_my_questions_titles)

Просмотреть файл

@ -0,0 +1,102 @@
from playwright.sync_api import Page, ElementHandle
from playwright_tests.core.basepage import BasePage
class AAQFormPage(BasePage):
__uploaded_image_title = ""
__complete_progress_items = "//li[@class='progress--item is-complete']/a"
__complete_progress_items_labels = ("//li[@class='progress--item is-complete']//span["
"@class='progress--label']")
__in_progress_item_label = ("//li[@class='progress--item is-current']//span["
"@class='progress--label']")
__aaq_page_heading = "//h2[@class='sumo-page-heading']"
__aaq_page_intro_text = "//form[@id='question-form']/p[@class='sumo-page-intro']"
__aaq_page_info_card = "//div[contains(@class, 'info card')]"
# AAQ Subject
__aaq_subject_input_field = "//input[@id='id_title']"
__aaq_subject_input_field_error_message = ("//input[@id='id_title']/../ul["
"@class='errorlist']/li")
# Product topic dropdown
__product_topic_select_dropdown = "//select[@id='id_category']"
__product_topic_select_dropdown_error_message = ("//select[@id='id_category']/../ul["
"@class='errorlist']/li")
# How can we help textarea field
__how_can_we_help_textarea = "//textarea[@id='id_content']"
__how_can_we_help_textarea_error_field = ("//textarea[@id='id_content']/../following-sibling"
"::ul/li")
# Add Image
__add_image_browse_button = "//input[@id='id_image']"
__uploaded_test_image_preview = f"//img[@title='{__uploaded_image_title}']"
__uploaded_test_image_delete_button = "//form[@class='upload-input']/input[@class='delete']"
__uploaded_image = "//a[@class='image']/img"
# Email me when someone answers the thread checkbox
__email_me_checkbox = "//input[@id='id_notifications']"
# form buttons
__form_submit_button = "//button[contains(text(), 'Submit')]"
__form_cancel_option = "//a[contains(text(),'Cancel')]"
# Learn more button
def __init__(self, page: Page):
super().__init__(page)
def get_complete_progress_item_labels(self) -> list[str]:
return super()._get_text_of_elements(self.__complete_progress_items_labels)
def get_in_progress_item_label(self) -> str:
return super()._get_text_of_element(self.__in_progress_item_label)
def get_aaq_form_page_heading(self) -> str:
return super()._get_text_of_element(self.__aaq_page_heading)
def get_aaq_form_page_intro_text(self) -> str:
return super()._get_text_of_element(self.__aaq_page_intro_text)
def get_aaq_form_info_card_text(self) -> str:
return super()._get_text_of_element(self.__aaq_page_info_card)
def get_aaq_form_subject_error(self) -> str:
return super()._get_text_of_element(self.__aaq_subject_input_field_error_message)
def get_aaq_form_topic_select_error(self) -> str:
return super()._get_text_of_element(self.__product_topic_select_dropdown_error_message)
def add_text_to_aaq_form_subject_field(self, text: str):
super()._fill(self.__aaq_subject_input_field, text)
def select_aaq_form_topic_value(self, value: str):
super()._select_option_by_value(self.__product_topic_select_dropdown, value)
def add_text_to_aaq_textarea_field(self, text: str):
super()._fill(self.__how_can_we_help_textarea, text)
# def attach_image_to_question(self, image_path: str, image_title: str):
# Need to update this when needed in tests
# self.__uploaded_image_title = image_title
# super()._upload_jpg_image(locator=self.__add_image_browse_button, path_to_image=image_path)
def image_preview_element(self) -> ElementHandle:
return super()._get_element_handle(self.__uploaded_test_image_preview)
def uploaded_image_element(self) -> ElementHandle:
return super()._get_element_handle(self.__uploaded_image)
def click_on_email_me_when_someone_answers_the_thread_checkbox(self):
super()._click(self.__email_me_checkbox)
def click_aaq_form_cancel_button(self):
super()._click(self.__form_cancel_option)
def click_aaq_form_submit_button(self):
super()._click(self.__form_submit_button)
def delete_uploaded_image(self):
super()._hover_over_element(self.__uploaded_image)
super()._click(self.__uploaded_test_image_delete_button)
super()._accept_dialog()

Просмотреть файл

@ -1,4 +1,4 @@
from playwright.sync_api import Page, ElementHandle, Locator from playwright.sync_api import Page, ElementHandle
from playwright_tests.core.basepage import BasePage from playwright_tests.core.basepage import BasePage
@ -10,7 +10,6 @@ class QuestionPage(BasePage):
# Question # Question
__question_author = "//div[@class='question']//span[@class='display-name']" __question_author = "//div[@class='question']//span[@class='display-name']"
__questions_header = "//article//h2"
# Progress bar # Progress bar
__complete_progress_items_label = ("//li[@class='progress--item is-complete']//span[" __complete_progress_items_label = ("//li[@class='progress--item is-complete']//span["
@ -20,10 +19,7 @@ class QuestionPage(BasePage):
__aaq_page_breadcrumbs = "//ol[@id='breadcrumbs']/li" __aaq_page_breadcrumbs = "//ol[@id='breadcrumbs']/li"
# Question details # Question details
__question_details_button = "//button[@aria-controls='question-details']" __questions_header = "//article//h2"
__more_system_details_option = "//a[@id='show-more-details']"
__close_additional_system_details_button = "//div[@class='mzp-c-modal-close']/button"
__user_agent_information = "//div[@class='about-support']//li"
# Searchbar # Searchbar
__search_support_searchbar = "//form[@id='support-search-sidebar']/input" __search_support_searchbar = "//form[@id='support-search-sidebar']/input"
@ -37,7 +33,6 @@ class QuestionPage(BasePage):
__stop_email_updates_option = "//ul[@id='related-content']/li[@class='email']/a" __stop_email_updates_option = "//ul[@id='related-content']/li[@class='email']/a"
__subscribe_to_feed_option = "//ul[@id='related-content']/li[@class='rss']/a" __subscribe_to_feed_option = "//ul[@id='related-content']/li[@class='rss']/a"
__delete_this_question_option = "//ul[@id='related-content']//a[@class='delete']" __delete_this_question_option = "//ul[@id='related-content']//a[@class='delete']"
__system_details_options = "//div[@id='system-details']/ul[@class='system']/li"
# Tags section # Tags section
__question_tags_options = "//li[@class='tag']/a" __question_tags_options = "//li[@class='tag']/a"
@ -55,8 +50,7 @@ class QuestionPage(BasePage):
# Needs more information from the user # Needs more information from the user
__needs_more_information_from_the_user_checkbox = "//input[@id='id_needs_info']" __needs_more_information_from_the_user_checkbox = "//input[@id='id_needs_info']"
# Attached image # Add images button
__attached_image = "//a[@class='image']/img"
# Preview Reply button # Preview Reply button
__preview_reply_button = "//input[@id='preview']" __preview_reply_button = "//input[@id='preview']"
@ -74,25 +68,9 @@ class QuestionPage(BasePage):
def get_question_author_name(self) -> str: def get_question_author_name(self) -> str:
return super()._get_text_of_element(self.__question_author) return super()._get_text_of_element(self.__question_author)
def get_question_tag_options(self) -> list[str]:
return super()._get_text_of_elements(self.__question_tags_options)
def get_attached_image(self) -> Locator:
return super()._get_element_locator(self.__attached_image)
def get_more_information_with_text_locator(self, text: str) -> Locator:
xpath = f"//div[@class='about-support']/p[text()='{text}']"
return super()._get_element_locator(xpath)
def get_user_agent_information(self) -> str:
return super()._get_text_of_element(self.__user_agent_information)
def add_text_to_post_a_reply_textarea(self, text: str): def add_text_to_post_a_reply_textarea(self, text: str):
super()._fill(self.__post_a_reply_textarea, text) super()._fill(self.__post_a_reply_textarea, text)
def get_system_details_information(self) -> list[str]:
return super()._get_text_of_elements(self.__system_details_options)
def click_on_post_reply_button(self, repliant_username) -> str: def click_on_post_reply_button(self, repliant_username) -> str:
xpath_display_name = \ xpath_display_name = \
f"//span[@class='display-name' and contains(text(), '{repliant_username}')]" f"//span[@class='display-name' and contains(text(), '{repliant_username}')]"
@ -103,9 +81,6 @@ class QuestionPage(BasePage):
super()._wait_for_selector(xpath_display_name) super()._wait_for_selector(xpath_display_name)
return super()._get_element_attribute_value(xpath_reply_id, "id") return super()._get_element_attribute_value(xpath_reply_id, "id")
def click_on_my_questions_banner_option(self):
super()._click(self.__posted_questions_success_banner_my_questions_link)
def click_on_solves_the_problem_button(self, target_reply_id: str): def click_on_solves_the_problem_button(self, target_reply_id: str):
xpath = f"//div[@id='{target_reply_id}']/following-sibling::aside//input[@type='submit']" xpath = f"//div[@id='{target_reply_id}']/following-sibling::aside//input[@type='submit']"
@ -124,12 +99,3 @@ class QuestionPage(BasePage):
def click_delete_this_question_button(self): def click_delete_this_question_button(self):
super()._click(self.__delete_question_delete_button) super()._click(self.__delete_question_delete_button)
def click_on_question_details_button(self):
super()._click(self.__question_details_button)
def click_on_more_system_details_option(self):
super()._click(self.__more_system_details_option)
def click_on_the_additional_system_panel_close_button(self):
super()._click(self.__close_additional_system_details_button)

Просмотреть файл

@ -11,7 +11,3 @@ markers =
userContributionTests: Tests belonging to the user contribution section. userContributionTests: Tests belonging to the user contribution section.
userQuestions: Tests belonging to the user questions section. userQuestions: Tests belonging to the user questions section.
messagingSystem: Tests belonging to the messaging system. messagingSystem: Tests belonging to the messaging system.
contactSupportPage: Tests belonging to the contact support page.
productSolutionsPage: Tests belonging to the product solutions page.
productTopicsPage: Tests belonging to the product topics page.
aaqPage: Tests belonging to the AAQ page.

Просмотреть файл

@ -4,92 +4,6 @@
"topic_value": "bookmarks", "topic_value": "bookmarks",
"question_body": "'''Lorem ipsum''' dolor ''sit amet'', consectetur [https://www.mediafax.ro adipiscing] elit, [[Stage test owl|sed]] do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tincidunt id aliquet risus feugiat in ante. Etiam non quam lacus suspendisse faucibus interdum posuere. Diam sollicitudin tempor id eu nisl nunc mi ipsum. Velit egestas dui id ornare arcu odio ut sem nulla. Risus nec feugiat in fermentum posuere urna nec tincidunt. Sed egestas egestas fringilla phasellus faucibus. Amet consectetur adipiscing elit duis tristique. Lorem mollis aliquam ut porttitor. Purus sit amet volutpat consequat mauris. Lobortis mattis aliquam faucibus purus in. Enim praesent elementum facilisis leo vel. Volutpat lacus laoreet non curabitur gravida arcu. Tempus iaculis urna id volutpat.", "question_body": "'''Lorem ipsum''' dolor ''sit amet'', consectetur [https://www.mediafax.ro adipiscing] elit, [[Stage test owl|sed]] do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tincidunt id aliquet risus feugiat in ante. Etiam non quam lacus suspendisse faucibus interdum posuere. Diam sollicitudin tempor id eu nisl nunc mi ipsum. Velit egestas dui id ornare arcu odio ut sem nulla. Risus nec feugiat in fermentum posuere urna nec tincidunt. Sed egestas egestas fringilla phasellus faucibus. Amet consectetur adipiscing elit duis tristique. Lorem mollis aliquam ut porttitor. Purus sit amet volutpat consequat mauris. Lobortis mattis aliquam faucibus purus in. Enim praesent elementum facilisis leo vel. Volutpat lacus laoreet non curabitur gravida arcu. Tempus iaculis urna id volutpat.",
"image_name": "test.image.jpg", "image_name": "test.image.jpg",
"image_path": "test_data/test-image.png" "image_path": "test_data/images/test-image.jpg"
},
"troubleshooting_information_kb_article_url": "https://support.mozilla.org/en-US/kb/use-troubleshooting-information-page-fix-firefox",
"troubleshooting_information_textarea_field": "Test Troubleshooting data",
"troubleshoot_product_and_os_versions": ["Test os", "Test product version"],
"products_aaq_url": {
"Firefox": "https://support.allizom.org/en-US/questions/new/desktop/form",
"Firefox for Android": "https://support.allizom.org/en-US/questions/new/mobile/form",
"Firefox for iOS": "https://support.allizom.org/en-US/questions/new/ios/form",
"Firefox for Enterprise": "https://support.allizom.org/en-US/questions/new/firefox-enterprise/form",
"MDN Plus": "https://support.allizom.org/en-US/questions/new/mdn-plus/form",
"Firefox Reality": "https://support.allizom.org/en-US/questions/new/firefox-reality/form",
"Mozilla VPN": "https://support.allizom.org/en-US/questions/new/firefox-private-network-vpn/form",
"Firefox Private Network": "https://support.allizom.org/en-US/questions/new/firefox-private-network/form",
"Firefox Relay": "https://support.allizom.org/en-US/questions/new/relay/form",
"Pocket": "https://support.allizom.org/en-US/questions/new/pocket/form",
"Hubs": "https://support.allizom.org/en-US/questions/new/hubs/form",
"Thunderbird": "https://support.allizom.org/en-US/questions/new/thunderbird/form",
"Firefox Focus": "https://support.allizom.org/en-US/questions/new/focus/form",
"Mozilla Account": "https://support.allizom.org/en-US/questions/new/mozilla-account/form"
},
"aaq_topic_tags": {
"Firefox": {
"Learn the Basics: get started": "get-started",
"Download, install and migration": "download-and-install",
"Privacy and security settings": "privacy-and-security",
"Customize controls, options and add-ons": "customize",
"Fix slowness, crashing, error messages and other problems": "fix-problems",
"Tips and tricks": "tips",
"Bookmarks": "bookmarks",
"Cookies": "cookies",
"Tabs": "tabs",
"Website breakages": "website-breakages",
"Firefox Sync": "sync",
"Other": "other",
"default_slug": "desktop"
},
"Firefox for Android": {
"Download, install and migration": "download-and-install",
"Privacy and security settings": "privacy-and-security",
"Customize controls, options and add-ons": "customize",
"Fix slowness, crashing, error messages and other problems": "fix-problems",
"Tips and tricks": "tips",
"Bookmarks": "bookmarks",
"Cookies": "cookies",
"Tabs": "tabs",
"Websites": "websites",
"Firefox Sync": "sync",
"Other": "other",
"default_slug": "mobile"
},
"Firefox for iOS": {
"Install and Update": "install-and-update-firefox-ios",
"How to use Firefox for iOS": "how-to-use-firefox-ios",
"Crash": "crash",
"Sync": "sync",
"Bookmarks": "bookmarks",
"Tabs": "tabs",
"Private Browsing mode": "privacy",
"default_slug": "ios"
},
"Firefox for Enterprise": {
"Deploy": "deployment",
"Manage updates, policies & customization": "customization",
"Manage add-ons": "customization",
"Manage certificates": "customization",
"default_slug": "none"
},
"Firefox Reality": {
"Get started with Firefox Reality": "get-started",
"Troubleshooting Firefox Reality": "troubleshooting",
"default_slug": "none"
},
"Thunderbird": {
"Download, install and migration": "download-and-install",
"Privacy and security settings": "privacy-and-security",
"Customize controls, options and add-ons": "customize",
"Fix slowness, crashing, error messages and other problems": "fix-problems",
"Calendar": "calendar",
"Other": "other",
"default_slug": "none"
},
"Firefox Focus": {
"Firefox Focus for iOS": "Focus-ios",
"Firefox Focus for Android": "firefox-focus-android",
"default_slug": "focus-firefox"
}
} }
} }

Просмотреть файл

@ -1,52 +0,0 @@
{
"freemium_products": [
"Firefox",
"Firefox for Android",
"Firefox for iOS",
"Firefox for Enterprise",
"Firefox Reality",
"Thunderbird",
"Firefox Focus"
],
"premium_products": [
"MDN Plus",
"Mozilla VPN",
"Firefox Private Network",
"Firefox Relay",
"Pocket",
"Hubs",
"Mozilla Account"
],
"product_topics": {
"Firefox": "https://support.allizom.org/en-US/products/firefox/fix-problems",
"Firefox for Android": "https://support.allizom.org/en-US/products/mobile/fix-problems",
"Firefox for iOS": "https://support.allizom.org/en-US/products/ios/install-and-update-firefox-ios",
"Firefox for Enterprise": "https://support.allizom.org/en-US/products/firefox-enterprise/deploy-firefox-for-enterprise",
"MDN Plus": "https://support.allizom.org/en-US/products/mdn-plus/getting-started",
"Firefox Reality": "https://support.allizom.org/en-US/products/firefox-reality/get-started",
"Mozilla VPN": "https://support.allizom.org/en-US/products/firefox-private-network-vpn/download-setup",
"Firefox Private Network": "https://support.allizom.org/en-US/products/firefox-private-network/accounts",
"Firefox Relay": "https://support.allizom.org/en-US/products/relay/technical",
"Pocket": "https://support.allizom.org/en-US/products/pocket/pocket-for-ios",
"Hubs": "https://support.allizom.org/en-US/products/hubs/hubs-get-started",
"Thunderbird": "https://support.allizom.org/en-US/products/thunderbird/privacy-and-security-settings",
"Firefox Focus": "https://support.allizom.org/en-US/products/focus-firefox/Focus-ios",
"Mozilla Account": "https://support.allizom.org/en-US/products/mozilla-account/passwords-recovery"
},
"product_solutions": {
"Firefox": "https://support.allizom.org/en-US/questions/new/desktop",
"Firefox for Android": "https://support.allizom.org/en-US/questions/new/mobile",
"Firefox for iOS": "https://support.allizom.org/en-US/questions/new/ios",
"Firefox for Enterprise": "https://support.allizom.org/en-US/questions/new/firefox-enterprise",
"MDN Plus": "https://support.allizom.org/en-US/questions/new/mdn-plus",
"Firefox Reality": "https://support.allizom.org/en-US/questions/new/firefox-reality",
"Mozilla VPN": "https://support.allizom.org/en-US/questions/new/firefox-private-network-vpn",
"Firefox Private Network": "https://support.allizom.org/en-US/questions/new/firefox-private-network",
"Firefox Relay": "https://support.allizom.org/en-US/questions/new/relay",
"Pocket": "https://support.allizom.org/en-US/questions/new/pocket",
"Hubs": "https://support.allizom.org/en-US/questions/new/hubs",
"Thunderbird": "https://support.allizom.org/en-US/questions/new/thunderbird",
"Firefox Focus": "https://support.allizom.org/en-US/questions/new/focus",
"Mozilla Account": "https://support.allizom.org/en-US/questions/new/mozilla-account"
}
}

Двоичные данные
playwright_tests/test_data/test-image.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 26 KiB

Просмотреть файл

@ -1,421 +0,0 @@
import pytest
import pytest_check as check
from playwright.sync_api import expect
from playwright_tests.core.testutilities import TestUtilities
from playwright_tests.messages.AAQ_messages.aaq_form_page_messages import AAQFormMessages
from playwright_tests.messages.contact_support_page_messages.contact_support_messages import (
ContactSupportMessages)
from playwright_tests.messages.contribute_pages_messages.con_page_messages import (
ContributePageMessages)
class TestAAQPage(TestUtilities):
# C2188694, C2188695
@pytest.mark.aaqPage
def test_community_card_and_helpful_tip_are_displayed_for_freemium_product(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts['TEST_ACCOUNT_12']
))
self.logger.info("Navigating to each freemium aaq form")
for freemium_product in super().general_test_data["freemium_products"]:
self.navigate_to_link(
super().aaq_question_test_data["products_aaq_url"][freemium_product]
)
self.logger.info("Verifying that the helpful tip card is displayed")
expect(
self.sumo_pages.aaq_form_page.get_helpful_tip_locator()
).to_be_visible()
self.logger.info("Clicking on the 'Learn More' button from the community help card")
self.sumo_pages.aaq_form_page.click_on_learn_more_button()
self.logger.info("Verifying that we are on the contribute page")
expect(
self.page
).to_have_url(ContributePageMessages.STAGE_CONTRIBUTE_PAGE_URL)
# C2188694, C2188695
@pytest.mark.aaqPage
def test_community_card_and_helpful_tip_not_displayed_for_premium_products(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts['TEST_ACCOUNT_12']
))
self.logger.info("Navigating to each premium aaq form")
for premium_product in super().general_test_data["premium_products"]:
self.navigate_to_link(
super().aaq_question_test_data["products_aaq_url"][premium_product]
)
self.logger.info("Verifying that the helpful tip option is not displayed")
expect(
self.sumo_pages.aaq_form_page.get_helpful_tip_locator()
).to_be_hidden()
self.logger.info("Verifying that the 'Learn More' button from the community help "
"banner is not displayed")
expect(
self.sumo_pages.aaq_form_page.get_learn_more_button_locator()
).to_be_hidden()
# C890537
@pytest.mark.aaqPage
def test_corresponding_aaq_product_name_and_image_are_displayed(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts['TEST_ACCOUNT_12']
))
self.logger.info("Navigating to each product aaq form")
for product in super().aaq_question_test_data["products_aaq_url"]:
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
# This needs to change when we add the Mozilla Account icon/product.
if product != "Mozilla Account":
self.logger.info("Verifying that the product image is displayed")
expect(
self.sumo_pages.aaq_form_page.get_product_image_locator()
).to_be_visible()
else:
self.logger.info("Verifying that the product image is hidden for Mozilla Account "
"product")
expect(
self.sumo_pages.aaq_form_page.get_product_image_locator()
).to_be_visible()
self.logger.info("Verifying that the correct product header is displayed")
check.equal(
self.sumo_pages.aaq_form_page.get_aaq_form_page_heading(),
product,
f"Incorrect form header displayed. "
f"Expected: {product} "
f"Received: {self.sumo_pages.aaq_form_page.get_aaq_form_page_heading()}"
)
# C890535, C890536
@pytest.mark.aaqPage
def test_progress_milestone_redirect(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts['TEST_ACCOUNT_12']
))
self.logger.info("Navigating to each product aaq form")
for product in super().aaq_question_test_data["products_aaq_url"]:
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
self.logger.info("Verifying that the correct in progress milestone is displayed")
check.equal(
self.sumo_pages.aaq_form_page.get_in_progress_item_label(),
AAQFormMessages.IN_PROGRESS_MILESTONE,
f"Incorrect current milestone. "
f"Expected: {AAQFormMessages.IN_PROGRESS_MILESTONE} "
f"Received: {self.sumo_pages.aaq_form_page.get_in_progress_item_label()}"
)
self.logger.info(
f"Clicking on the {AAQFormMessages.COMPLETED_MILESTONE_TWO} milestone'"
)
self.sumo_pages.aaq_form_page.click_on_a_particular_completed_milestone(
AAQFormMessages.COMPLETED_MILESTONE_TWO)
self.logger.info("Verifying that the we are on the correct product solutions page")
expect(
self.page
).to_have_url(super().general_test_data["product_solutions"][product])
self.logger.info(
f"Navigating back to the aaq form and "
f"clicking on the {AAQFormMessages.COMPLETED_MILESTONE_ONE} milestone")
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
self.sumo_pages.aaq_form_page.click_on_a_particular_completed_milestone(
AAQFormMessages.COMPLETED_MILESTONE_ONE)
self.logger.info("Verifying that we are redirected to the correct page")
expect(
self.page
).to_have_url(ContactSupportMessages.PAGE_URL_CHANGE_PRODUCT_REDIRECT)
# C890612
@pytest.mark.aaqPage
def test_aaq_form_cancel_button_freemium_products(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts["TEST_ACCOUNT_MODERATOR"]
))
self.logger.info("Accessing the 'My profile' page via the top-navbar menu")
self.sumo_pages.top_navbar.click_on_view_profile_option()
self.logger.info("Extracting original number of posted questions")
original_number_of_questions = self.number_extraction_from_string(
self.sumo_pages.my_profile_page.get_my_profile_questions_text()
)
self.logger.info("Navigating to each product aaq form")
for product in super().general_test_data["freemium_products"]:
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
self.logger.info("Adding data inside AAQ form fields without submitting the form")
self.sumo_pages.aaq_flow.add__valid_data_to_all_input_fields_without_submitting(
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_value=self.sumo_pages.aaq_form_page.get_aaq_form_topic_options()[0],
body_text=super().aaq_question_test_data["valid_firefox_question"]["question_body"]
)
self.logger.info("Clicking on the Cancel button")
self.sumo_pages.aaq_form_page.click_aaq_form_cancel_button()
self.logger.info("Verifying that we are redirected back to the correct product "
"solutions page")
expect(
self.page
).to_have_url(super().general_test_data["product_solutions"][product])
self.logger.info("Navigating back to the My Profile page")
self.sumo_pages.top_navbar.click_on_view_profile_option()
new_number = self.number_extraction_from_string(
self.sumo_pages.my_profile_page.get_my_profile_questions_text()
)
self.logger.info("Verifying that the correct number of posted questions is displayed "
"at profile level")
check.equal(
new_number,
original_number_of_questions,
f"Incorrect number of questions displayed. "
f"Expected: {original_number_of_questions} "
f"Received: {new_number}"
)
# C890614, C890613, C890538
@pytest.mark.aaqPage
def test_post_aaq_questions_for_all_freemium_products_topics(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts["TEST_ACCOUNT_MODERATOR"]
))
self.logger.info("Navigating to each product aaq form")
for product in super().general_test_data["freemium_products"]:
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
for topic in self.sumo_pages.aaq_form_page.get_aaq_form_topic_options():
self.logger.info(f"Submitting question for {product} product")
question_info = self.sumo_pages.aaq_flow.submit_an_aaq_question_for_a_product(
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_name=topic,
body=super().aaq_question_test_data["valid_firefox_question"]["question_body"],
attach_image=False
)
self.logger.info("Verifying that the correct implicit tags are added to the "
"question")
slugs = [super().aaq_question_test_data['aaq_topic_tags'][product][topic]]
if (super().aaq_question_test_data['aaq_topic_tags'][product]['default_slug']
!= "none"):
slugs.append(
super().aaq_question_test_data['aaq_topic_tags'][product]['default_slug']
)
assert (
all(map(
lambda x: x in self.sumo_pages.question_page.get_question_tag_options(),
slugs))
)
self.logger.info("Clicking on the 'My Questions' banner option")
self.sumo_pages.question_page.click_on_my_questions_banner_option()
self.logger.info(
"Verifying that the posted question is displayed inside the 'My Questions "
"page'")
expect(
self.sumo_pages.my_questions_page.get_listed_question(
question_info['aaq_subject']
)
).to_be_visible()
self.logger.info("Clicking on the question and deleting it")
self.sumo_pages.my_questions_page.click_on_a_question_by_index(1)
self.sumo_pages.question_page.click_delete_this_question_question_tools_option()
self.sumo_pages.question_page.click_delete_this_question_button()
self.logger.info(
"Verifying that the question is no longer displayed inside My Questions page")
self.sumo_pages.top_navbar.click_on_my_questions_profile_option()
expect(
self.sumo_pages.my_questions_page.get_listed_question(
question_info['aaq_subject']
)
).to_be_hidden()
self.logger.info(f"Navigating back to the {product} product aa form")
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
@pytest.mark.aaqPage
def test_share_firefox_data_functionality(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts["TEST_ACCOUNT_MODERATOR"]
))
self.logger.info("Navigating to the Firefox AAQ form page")
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"]["Firefox"])
self.logger.info("Clicking on the 'Share Data' option")
self.sumo_pages.aaq_form_page.click_on_share_data_button()
self.logger.info(
"Clicking on the 'try these manual steps' option")
self.sumo_pages.aaq_form_page.click_on_try_these_manual_steps_link()
self.logger.info("Verifying that we are redirected to the correct page")
assert (
super().aaq_question_test_data["troubleshooting_information_kb_article_url"] in
self.get_page_url()
)
self.logger.info("Navigating back to the aaq form")
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"]["Firefox"])
self.logger.info("Adding data inside AAQ form fields without submitting the form")
self.sumo_pages.aaq_flow.add__valid_data_to_all_input_fields_without_submitting(
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_value=self.sumo_pages.aaq_form_page.get_aaq_form_topic_options()[0],
body_text=super().aaq_question_test_data["valid_firefox_question"]["question_body"]
)
self.logger.info("Clicking on the 'Share Data' option")
self.sumo_pages.aaq_form_page.click_on_share_data_button()
self.logger.info("Adding text inside the troubleshooting information field")
self.sumo_pages.aaq_form_page.add_text_to_troubleshooting_information_textarea(
super().aaq_question_test_data["troubleshooting_information_textarea_field"]
)
self.logger.info("Submitting the aaq question")
self.sumo_pages.aaq_form_page.click_aaq_form_submit_button()
self.logger.info("Verifying that the troubleshooting information is displayed")
self.sumo_pages.question_page.click_on_question_details_button()
self.sumo_pages.question_page.click_on_more_system_details_option()
expect(
self.sumo_pages.question_page.get_more_information_with_text_locator(
super().aaq_question_test_data["troubleshooting_information_textarea_field"]
)
).to_be_visible()
self.logger.info("Closing additional details panel")
self.sumo_pages.question_page.click_on_the_additional_system_panel_close_button()
self.logger.info("Deleting the posted question")
self.sumo_pages.question_page.click_delete_this_question_question_tools_option()
self.sumo_pages.question_page.click_delete_this_question_button()
@pytest.mark.aaqPage
def test_additional_system_details_user_agent_information(self):
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts["TEST_ACCOUNT_MODERATOR"]
))
self.logger.info("Navigating to each product aaq form")
for product in super().general_test_data["freemium_products"]:
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
self.logger.info(f"Submitting question for {product} product")
self.sumo_pages.aaq_flow.submit_an_aaq_question_for_a_product(
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_name=self.sumo_pages.aaq_form_page.get_aaq_form_topic_options()[0],
body=super().aaq_question_test_data["valid_firefox_question"]["question_body"],
attach_image=True
)
self.logger.info("Verifying that the correct user-agent information is displayed")
self.sumo_pages.question_page.click_on_question_details_button()
self.sumo_pages.question_page.click_on_more_system_details_option()
check.equal(
"User Agent: " + self.get_user_agent(),
self.sumo_pages.question_page.get_user_agent_information(),
f"Incorrect user agent displayed. "
f"Expected: {'User Agent: ' + self.get_user_agent()} "
f"Received: {self.sumo_pages.question_page.get_user_agent_information()}"
)
self.logger.info("Closing additional details panel")
self.sumo_pages.question_page.click_on_the_additional_system_panel_close_button()
self.logger.info("Deleting the posted question")
self.sumo_pages.question_page.click_delete_this_question_question_tools_option()
self.sumo_pages.question_page.click_delete_this_question_button()
@pytest.mark.aaqPage
def test_system_details_information(self):
troubleshooting_info = [
super().aaq_question_test_data["troubleshoot_product_and_os_versions"][
0],
"Firefox " + super().aaq_question_test_data["troubleshoot_product_and_os_versions"][1]
]
self.logger.info("Signing in with a normal user account")
self.start_existing_session(super().username_extraction_from_email(
self.user_secrets_accounts["TEST_ACCOUNT_MODERATOR"]
))
self.logger.info("Navigating to each product aaq form")
for product in super().general_test_data["freemium_products"]:
self.logger.info(product)
if product == 'Firefox Reality' or product == "Thunderbird":
continue
else:
self.navigate_to_link(super().aaq_question_test_data["products_aaq_url"][product])
self.logger.info("Adding data inside AAQ form fields without submitting the form")
self.sumo_pages.aaq_flow.add__valid_data_to_all_input_fields_without_submitting(
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_value=self.sumo_pages.aaq_form_page.get_aaq_form_topic_options()[0],
body_text=super().aaq_question_test_data["valid_firefox_question"][
"question_body"]
)
self.logger.info("Clicking on the 'Show details' option")
self.sumo_pages.aaq_form_page.click_on_show_details_option()
self.logger.info("Adding data to product version and OS fields")
self.sumo_pages.aaq_form_page.add_text_to_product_version_field(
super().aaq_question_test_data[
"troubleshoot_product_and_os_versions"][1]
)
self.sumo_pages.aaq_form_page.add_text_to_os_field(
super().aaq_question_test_data[
"troubleshoot_product_and_os_versions"][0]
)
self.logger.info("Submitting the aaq question")
self.sumo_pages.aaq_form_page.click_aaq_form_submit_button()
self.logger.info(
"Verifying that the correct provided troubleshooting information is displayed")
self.sumo_pages.question_page.click_on_question_details_button()
check.equal(
self.sumo_pages.question_page.get_system_details_information(),
troubleshooting_info,
f"Expected: {troubleshooting_info} "
f"Received:{self.sumo_pages.question_page.get_system_details_information()}"
)
self.logger.info("Deleting the posted question")
self.sumo_pages.question_page.click_delete_this_question_question_tools_option()
self.sumo_pages.question_page.click_delete_this_question_button()

Просмотреть файл

@ -1,104 +0,0 @@
import pytest
import pytest_check as check
from playwright.sync_api import expect
from playwright_tests.core.testutilities import TestUtilities
from playwright_tests.messages.contact_support_page_messages.contact_support_messages import (
ContactSupportMessages)
from playwright_tests.messages.forums_messages.support_forums_page_messages import (
SupportForumsPageMessages)
from playwright_tests.messages.product_solutions_page_messages.product_solutions_messages import (
ProductSolutionsMessages)
class TestContactSupportPage(TestUtilities):
# C890363
@pytest.mark.contactSupportPage
def test_contact_support_page_content(self):
self.logger.info("Accessing the contact support page via the top navbar Get Help > Ask a "
"Question")
self.sumo_pages.top_navbar.click_on_ask_a_question_option()
self.logger.info("Verifying that the current milestone is the correct one")
check.equal(
self.sumo_pages.contact_support_page._get_text_of_current_milestone(),
ContactSupportMessages.CURRENT_MILESTONE,
f"Incorrect current milestone displayed. "
f"Expected: {ContactSupportMessages.CURRENT_MILESTONE}"
f"Received: {self.sumo_pages.contact_support_page._get_text_of_current_milestone()}"
)
self.logger.info("Verifying that the correct page header is displayed")
check.equal(
self.sumo_pages.contact_support_page._get_contact_support_main_heading(),
ContactSupportMessages.MAIN_HEADER,
f"Incorrect page header displayed. "
f"Expected: {ContactSupportMessages.MAIN_HEADER} "
f"Received: {self.sumo_pages.contact_support_page._get_contact_support_main_heading()}"
)
self.logger.info("Verifying that the correct page subheading is displayed")
check.equal(
self.sumo_pages.contact_support_page._get_contact_support_subheading_text(),
ContactSupportMessages.SUBHEADING,
f"Incorrect page subheading displayed. "
f"Expected: {ContactSupportMessages.SUBHEADING} "
f"Actual:{self.sumo_pages.contact_support_page._get_contact_support_subheading_text()}"
)
self.logger.info("Verifying that each product card has the correct subheading")
for card in self.sumo_pages.contact_support_page._get_all_product_card_titles():
check.equal(
ContactSupportMessages.PRODUCT_CARDS_SUBHEADING[card],
self.sumo_pages.contact_support_page._get_product_card_subtitle(card),
f"Incorrect card subheading displayed "
f"Expected: {ContactSupportMessages.PRODUCT_CARDS_SUBHEADING[card]} "
f"Actual: {self.sumo_pages.contact_support_page._get_product_card_subtitle(card)}"
)
# C890368, C890387, C890388
@pytest.mark.contactSupportPage
def test_contact_support_page_cards_redirect(self):
self.logger.info("Accessing the contact support page via the top navbar Get Help > "
"Browse All products")
self.sumo_pages.top_navbar.click_on_browse_all_products_option()
self.logger.info("Clicking on all product cards")
for card in self.sumo_pages.contact_support_page._get_all_product_card_titles():
self.sumo_pages.contact_support_page._click_on_a_particular_card(card)
self.logger.info("Verifying that we are on the correct product solutions page")
check.equal(
self.sumo_pages.product_solutions_page._get_product_solutions_heading(),
card + ProductSolutionsMessages.PAGE_HEADER,
f"Incorrect product solutions page displayed: "
f"Expected: {card + ProductSolutionsMessages.PAGE_HEADER} "
f"Actual:{self.sumo_pages.product_solutions_page._get_product_solutions_heading()}"
)
self.logger.info("Verifying that we are on the correct milestone")
check.equal(
self.sumo_pages.product_solutions_page._get_current_milestone_text(),
ProductSolutionsMessages.CURRENT_MILESTONE_TEXT,
f"Incorrect current milestone displayed "
f"Expected: {ProductSolutionsMessages.CURRENT_MILESTONE_TEXT} "
f"Received: {self.sumo_pages.product_solutions_page._get_current_milestone_text()}"
)
self.logger.info("Click on the 'Change Product' milestone")
self.sumo_pages.product_solutions_page._click_on_the_completed_milestone()
@pytest.mark.contactSupportPage
def test_browse_all_product_forums_button_redirect(self):
self.logger.info("Accessing the contact support page via the top navbar Get Help > Ask a "
"Question")
self.sumo_pages.top_navbar.click_on_ask_a_question_option()
self.sumo_pages.contact_support_page._click_on_browse_all_product_forums_button()
self.logger.info("Verifying that we are redirected to the correct page url")
expect(
self.page
).to_have_url(SupportForumsPageMessages.PAGE_URL)

Просмотреть файл

@ -228,9 +228,9 @@ class TestContributeArticlePage(TestUtilities):
self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage") self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage")
check.equal( check.equal(
self.get_page_url(), self.get_page_url(),
HomepageMessages.STAGE_HOMEPAGE_URL_EN_US, HomepageMessages.STAGE_HOMEPAGE_URL,
f"Expected to be on: " f"Expected to be on: "
f"{HomepageMessages.STAGE_HOMEPAGE_URL_EN_US}" f"{HomepageMessages.STAGE_HOMEPAGE_URL}"
f"We are actual on: " f"We are actual on: "
f"{self.get_page_url()}", f"{self.get_page_url()}",
) )

Просмотреть файл

@ -180,8 +180,8 @@ class TestContributeForumPage(TestUtilities):
self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage") self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage")
check.equal( check.equal(
self.get_page_url(), self.get_page_url(),
HomepageMessages.STAGE_HOMEPAGE_URL_EN_US, HomepageMessages.STAGE_HOMEPAGE_URL,
f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL_EN_US}" f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL}"
f"We are actual on {self.get_page_url()}", f"We are actual on {self.get_page_url()}",
) )

Просмотреть файл

@ -181,8 +181,8 @@ class TestContributeLocalizationPage(TestUtilities):
self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage") self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage")
check.equal( check.equal(
self.get_page_url(), self.get_page_url(),
HomepageMessages.STAGE_HOMEPAGE_URL_EN_US, HomepageMessages.STAGE_HOMEPAGE_URL,
f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL_EN_US}" f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL}"
f"We are actual on {self.get_page_url()}", f"We are actual on {self.get_page_url()}",
) )

Просмотреть файл

@ -181,8 +181,8 @@ class TestContributeMobilePage(TestUtilities):
self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage") self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage")
check.equal( check.equal(
self.get_page_url(), self.get_page_url(),
HomepageMessages.STAGE_HOMEPAGE_URL_EN_US, HomepageMessages.STAGE_HOMEPAGE_URL,
f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL_EN_US}" f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL}"
f"We are actual on {self.get_page_url()}", f"We are actual on {self.get_page_url()}",
) )

Просмотреть файл

@ -134,8 +134,8 @@ class TestContributePage(TestUtilities):
self.logger.info("Verifying that the home breadcrumb redirects to the homepage") self.logger.info("Verifying that the home breadcrumb redirects to the homepage")
self.sumo_pages.contribute_page.click_on_home_breadcrumb() self.sumo_pages.contribute_page.click_on_home_breadcrumb()
assert self.get_page_url() == HomepageMessages.STAGE_HOMEPAGE_URL_EN_US, ( assert self.get_page_url() == HomepageMessages.STAGE_HOMEPAGE_URL, (
f"{HomepageMessages.STAGE_HOMEPAGE_URL_EN_US} page was expected to be displayed" f"{HomepageMessages.STAGE_HOMEPAGE_URL} page was expected to be displayed"
f"{self.get_page_url()} is displayed instead" f"{self.get_page_url()} is displayed instead"
) )

Просмотреть файл

@ -193,8 +193,8 @@ class TestContributeSocialMediaPage(TestUtilities):
self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage") self.logger.info("Verifying that the Home breadcrumb redirects to the Homepage")
check.equal( check.equal(
self.get_page_url(), self.get_page_url(),
HomepageMessages.STAGE_HOMEPAGE_URL_EN_US, HomepageMessages.STAGE_HOMEPAGE_URL,
f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL_EN_US}" f"Expected to be on {HomepageMessages.STAGE_HOMEPAGE_URL}"
f"We are actual on {self.get_page_url()}", f"We are actual on {self.get_page_url()}",
) )

Просмотреть файл

@ -94,10 +94,10 @@ class TestHomepage(TestUtilities):
self.logger.info("Verifying that the correct product support page is displayed") self.logger.info("Verifying that the correct product support page is displayed")
assert ( assert (
expected_product_title expected_product_title
== self.sumo_pages.product_support_page._get_product_title_text() == self.sumo_pages.product_support_page.get_product_title_text()
), (f"Incorrect support page displayed. " ), (f"Incorrect support page displayed. "
f"Expected: {expected_product_title} " f"Expected: {expected_product_title} "
f"Received: {self.sumo_pages.product_support_page._get_product_title_text()}") f"Received: {self.sumo_pages.product_support_page.get_product_title_text()}")
self.logger.info("Navigating back to the previous page") self.logger.info("Navigating back to the previous page")
self.navigate_back() self.navigate_back()

Просмотреть файл

@ -1,125 +0,0 @@
import pytest
import pytest_check as check
from playwright.sync_api import TimeoutError, expect
from playwright_tests.core.testutilities import TestUtilities
from playwright_tests.messages.AAQ_messages.aaq_widget import AAQWidgetMessages
from playwright_tests.messages.contribute_pages_messages.con_page_messages import (
ContributePageMessages)
from playwright_tests.messages.homepage_messages import HomepageMessages
from playwright_tests.messages.kb_article.kb_article_page_messages import KBArticlePageMessages
class TestPopularTopicsPage(TestUtilities):
# C890379
@pytest.mark.productTopicsPage
def test_popular_topics_navbar(self):
self.logger.info("Navigating to product topics pages")
for product_topic in super().general_test_data["product_topics"]:
topic_url = super().general_test_data["product_topics"][product_topic]
self.page.wait_for_timeout(400)
self.navigate_to_link(topic_url)
self.wait_for_url_to_be(topic_url)
for option in self.sumo_pages.product_topics_page._get_navbar_links_text():
self.logger.info(f"Clicking on {option} navbar option")
option_url = (HomepageMessages.STAGE_HOMEPAGE_URL + self.sumo_pages.
product_topics_page._get_navbar_option_link(option))
self.sumo_pages.product_topics_page._click_on_a_navbar_option(option)
try:
self.wait_for_url_to_be(option_url)
except TimeoutError:
self.logger.info("Failed click, retrying")
self.sumo_pages.product_topics_page._click_on_a_navbar_option(option)
self.wait_for_url_to_be(option_url)
self.logger.info("Verifying that the correct option is displayed")
check.equal(
self.sumo_pages.product_topics_page._get_page_title(),
option,
f"Incorrect topic: "
f"Expected: {option} "
f"Received: {self.sumo_pages.product_topics_page._get_page_title()}"
)
self.logger.info("Verifying that the correct navbar option is selected")
check.equal(
self.sumo_pages.product_topics_page._get_selected_navbar_option(),
option,
f"Incorrect selected navbar option "
f"Expected: {option} "
f"Actual: {self.sumo_pages.product_topics_page._get_selected_navbar_option()}"
)
# C2428991
@pytest.mark.productTopicsPage
def test_learn_more_redirect(self):
self.logger.info("Navigating to product topics pages")
for product_topic in super().general_test_data["product_topics"]:
topic_url = super().general_test_data["product_topics"][product_topic]
self.navigate_to_link(topic_url)
self.wait_for_url_to_be(topic_url)
self.logger.info("Clicking on the 'Learn More' button")
self.sumo_pages.product_topics_page._click_on_learn_more_button()
self.logger.info("Verifying that we are redirected to the contribute page")
expect(
self.page
).to_have_url(ContributePageMessages.STAGE_CONTRIBUTE_PAGE_URL)
# C2188690
@pytest.mark.productTopicsPage
def test_aaq_redirect(self):
self.logger.info("Navigating to product topics pages")
sign_in_with_the_same_account = False
for product_topic in super().general_test_data["product_topics"]:
topic_url = super().general_test_data["product_topics"][product_topic]
self.navigate_to_link(topic_url)
self.wait_for_url_to_be(topic_url)
self.logger.info("Verifying the subheading text")
if product_topic in super().general_test_data["premium_products"]:
check.equal(
self.sumo_pages.product_topics_page._get_aaq_subheading_text(),
AAQWidgetMessages.PREMIUM_AAQ_SUBHEADING_TEXT,
f"Incorrect aaq subheading "
f"Expected: {AAQWidgetMessages.PREMIUM_AAQ_SUBHEADING_TEXT} "
f"Received: {self.sumo_pages.product_topics_page._get_aaq_subheading_text()}"
)
self.logger.info("Clicking on the AAQ button")
self.sumo_pages.product_topics_page._click_on_aaq_button()
self.logger.info("Signing in to SUMO")
self.sumo_pages.auth_flow_page.sign_in_flow(
username=super().user_special_chars,
account_password=super().user_secrets_pass,
sign_in_with_same_account=sign_in_with_the_same_account,
)
self.logger.info("Verifying that we are on the correct AAQ form page")
expect(
self.page
).to_have_url(super().aaq_question_test_data["products_aaq_url"][product_topic])
self.logger.info("Signing out")
self.sumo_pages.top_navbar.click_on_sign_out_button()
sign_in_with_the_same_account = True
else:
check.equal(
self.sumo_pages.product_topics_page._get_aaq_subheading_text(),
AAQWidgetMessages.FREEMIUM_AAQ_SUBHEADING_TEXT_SIGNED_OUT,
f"Incorrect aaq subheading "
f"Expected: {AAQWidgetMessages.FREEMIUM_AAQ_SUBHEADING_TEXT_SIGNED_OUT} "
f"Received: {self.sumo_pages.product_topics_page._get_aaq_subheading_text()}"
)
self.logger.info("Clicking on the AAQ button")
self.sumo_pages.product_topics_page._click_on_aaq_button()
self.logger.info("Verifying that we are on the 'Get community support article'")
expect(
self.page
).to_have_url(KBArticlePageMessages.GET_COMMUNITY_SUPPORT_ARTICLE_LINK)

Просмотреть файл

@ -1,215 +0,0 @@
import pytest
import pytest_check as check
from playwright.sync_api import expect
from playwright_tests.core.testutilities import TestUtilities
from playwright_tests.messages.AAQ_messages.aaq_widget import AAQWidgetMessages
from playwright_tests.messages.product_solutions_page_messages.product_solutions_messages import (
ProductSolutionsMessages)
class TestProductSolutionsPage(TestUtilities):
# Currently fails due to https://github.com/mozilla/sumo/issues/1608
# C890370
@pytest.mark.skip
def test_featured_articles_redirect(self):
self.logger.info("Accessing the contact support page via the top navbar Get Help > "
"Browse All products")
self.sumo_pages.top_navbar.click_on_browse_all_products_option()
self.logger.info("Clicking on all product cards")
for card in self.sumo_pages.contact_support_page._get_all_product_card_titles():
self.sumo_pages.contact_support_page._click_on_a_particular_card(card)
check.equal(
self.sumo_pages.product_solutions_page._get_product_solutions_heading(),
card + ProductSolutionsMessages.PAGE_HEADER,
f"Incorrect product solutions page displayed: "
f"Expected: {card + ProductSolutionsMessages.PAGE_HEADER} "
f"Actual:{self.sumo_pages.product_solutions_page._get_product_solutions_heading()}"
)
if self.sumo_pages.product_solutions_page._is_featured_article_section_displayed():
for featured_article_card in (self.sumo_pages.product_solutions_page
._get_all_featured_articles_titles()):
self.sumo_pages.product_solutions_page._click_on_a_featured_article_card(
featured_article_card)
with self.page.context.expect_page() as tab:
feature_article_page = tab.value
print("Tab open")
article_text = (feature_article_page.
locator("//h1[@class='sumo-page-heading']").inner_text())
check.equal(
article_text,
featured_article_card,
f"Incorrect article page title. "
f"Expected: {featured_article_card} "
f"Received: {article_text}"
)
feature_article_page.close()
else:
self.logger.info(f"{card} has no featured articles displayed!!!")
self.navigate_back()
# C890375, C890379
@pytest.mark.productSolutionsPage
def test_popular_topics_redirect(self):
self.logger.info("Accessing the contact support page via the top navbar Get Help > "
"Browse All products")
self.sumo_pages.top_navbar.click_on_browse_all_products_option()
self.logger.info("Clicking on all product cards")
for card in self.sumo_pages.contact_support_page._get_all_product_card_titles():
self.sumo_pages.contact_support_page._click_on_a_particular_card(card)
check.equal(
self.sumo_pages.product_solutions_page._get_product_solutions_heading(),
card + ProductSolutionsMessages.PAGE_HEADER,
f"Incorrect product solutions page displayed: "
f"Expected: {card + ProductSolutionsMessages.PAGE_HEADER} "
f"Actual:{self.sumo_pages.product_solutions_page._get_product_solutions_heading()}"
)
if self.sumo_pages.product_solutions_page._is_popular_topics_section_displayed:
for topic in self.sumo_pages.product_solutions_page._get_popular_topics():
self.sumo_pages.product_solutions_page._click_on_a_popular_topic_card(topic)
with self.page.context.expect_page() as tab:
feature_article_page = tab.value
print("Tab open")
popular_topic = (feature_article_page
.locator("//h1[@class='topic-title sumo-page-heading']")
.inner_text())
check.equal(
popular_topic,
topic,
f"Incorrect topic page title. "
f"Expected: {topic} "
f"Received: {popular_topic}"
)
feature_article_page.close()
else:
self.logger.info(f"{card} has no featured articles displayed!!!")
self.navigate_back()
# C890382
@pytest.mark.productSolutionsPage
def test_ask_now_widget_redirect(self):
self.logger.info("Accessing the contact support page via the top navbar Get Help > "
"Browse All products")
self.sumo_pages.top_navbar.click_on_browse_all_products_option()
self.logger.info("Clicking on all product cards")
sign_in_with_the_same_account = False
for freemium_product in super().general_test_data["freemium_products"]:
self.sumo_pages.contact_support_page._click_on_a_particular_card(freemium_product)
self.logger.info("Verifying that the correct 'Still need help' subtext is displayed")
check.equal(
self.sumo_pages.product_solutions_page._get_aaq_subheading_text(),
AAQWidgetMessages.FREEMIUM_AAQ_SUBHEADING_TEXT_SIGNED_OUT,
f"Incorrect AAQ widget displayed: "
f"Expected: {AAQWidgetMessages.FREEMIUM_AAQ_SUBHEADING_TEXT_SIGNED_OUT} "
f"Received: {self.sumo_pages.product_solutions_page._get_aaq_subheading_text()}"
)
self.logger.info("Verifying that the correct AAQ button text is displayed")
check.equal(
self.sumo_pages.product_solutions_page._get_aaq_widget_button_name(),
AAQWidgetMessages.FREEMIUM_PRODUCTS_AAQ_WIDGET_BUTTON_TEXT,
f"Incorrect AAQ button name. "
f"Expected: {self.sumo_pages.product_solutions_page._get_aaq_widget_button_name()}"
f" Actual: {AAQWidgetMessages.FREEMIUM_PRODUCTS_AAQ_WIDGET_BUTTON_TEXT}"
)
self.logger.info("Clicking on the AAQ button and verifying that the auth page is "
"displayed")
self.sumo_pages.product_solutions_page._click_ask_now_button()
self.logger.info("Signing in to SUMO")
self.sumo_pages.auth_flow_page.sign_in_flow(
username=super().user_special_chars,
account_password=super().user_secrets_pass,
sign_in_with_same_account=sign_in_with_the_same_account,
)
self.logger.info("Verifying that we are on the correct AAQ form page")
expect(
self.page
).to_have_url(super().aaq_question_test_data["products_aaq_url"][freemium_product])
self.logger.info("Signing out")
self.sumo_pages.top_navbar.click_on_sign_out_button()
sign_in_with_the_same_account = True
self.logger.info("Accessing the contact support page via the top navbar Get Help > "
"Browse All products")
self.sumo_pages.top_navbar.click_on_browse_all_products_option()
# C890382
@pytest.mark.productSolutionsPage
def test_contact_support_widget_redirect(self):
self.logger.info("Accessing the contact support page via the top navbar Get Help > "
"Browse All products")
self.sumo_pages.top_navbar.click_on_browse_all_products_option()
self.logger.info("Clicking on all product cards")
sign_in_with_the_same_account = False
for premium_product in super().general_test_data["premium_products"]:
self.sumo_pages.contact_support_page._click_on_a_particular_card(premium_product)
self.logger.info("Verifying that the correct 'Still need help' subtext is displayed")
check.equal(
self.sumo_pages.product_solutions_page._get_aaq_subheading_text(),
AAQWidgetMessages.PREMIUM_AAQ_SUBHEADING_TEXT,
f"Incorrect AAQ widget displayed: "
f"Expected: {AAQWidgetMessages.PREMIUM_AAQ_SUBHEADING_TEXT} "
f"Received: {self.sumo_pages.product_solutions_page._get_aaq_subheading_text()}"
)
self.logger.info("Verifying that the correct AAQ button text is displayed")
check.equal(
self.sumo_pages.product_solutions_page._get_aaq_widget_button_name(),
AAQWidgetMessages.PREMIUM_PRODUCTS_AAQ_WIDGET_BUTTON_TEXT,
f"Incorrect AAQ button name. "
f"Expected: {self.sumo_pages.product_solutions_page._get_aaq_widget_button_name()}"
f" Actual: {AAQWidgetMessages.FREEMIUM_PRODUCTS_AAQ_WIDGET_BUTTON_TEXT}"
)
self.logger.info("Clicking on the AAQ button and verifying that the auth page is "
"displayed")
self.sumo_pages.product_solutions_page._click_ask_now_button()
self.logger.info("Signing in to SUMO")
self.sumo_pages.auth_flow_page.sign_in_flow(
username=super().user_special_chars,
account_password=super().user_secrets_pass,
sign_in_with_same_account=sign_in_with_the_same_account,
)
self.logger.info("Verifying that we are on the correct AAQ form page")
expect(
self.page
).to_have_url(super().aaq_question_test_data["products_aaq_url"][premium_product])
self.logger.info("Signing out")
self.sumo_pages.top_navbar.click_on_sign_out_button()
sign_in_with_the_same_account = True
self.logger.info("Accessing the contact support page via the top navbar Get Help > "
"Browse All products")
self.sumo_pages.top_navbar.click_on_browse_all_products_option()

Просмотреть файл

@ -70,7 +70,7 @@ class TestMyProfilePage(TestUtilities):
expect( expect(
self.page self.page
).to_have_url(HomepageMessages.STAGE_HOMEPAGE_URL_EN_US) ).to_have_url(HomepageMessages.STAGE_HOMEPAGE_URL)
self.logger.info("Verify that the 'Sign in/Up' button from the page header is displayed") self.logger.info("Verify that the 'Sign in/Up' button from the page header is displayed")
@ -88,18 +88,9 @@ class TestMyProfilePage(TestUtilities):
repliant_username = self.sumo_pages.top_navbar.get_text_of_logged_in_username() repliant_username = self.sumo_pages.top_navbar.get_text_of_logged_in_username()
self.logger.info("Navigating to the Firefox AAQ form") self.logger.info("Posting a new AAQ question")
self.navigate_to_link(
super().aaq_question_test_data["products_aaq_url"]["Firefox"]
)
self.logger.info("Posting a new AAQ question for Firefox product")
question_info = ( question_info = (
self.sumo_pages.aaq_flow.submit_an_aaq_question_for_a_product( self.sumo_pages.aaq_flow.submit_valid_firefox_prod_question_via_ask_now_fx_solutions()
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_name=super().aaq_question_test_data["valid_firefox_question"]["topic_value"],
body=super().aaq_question_test_data["valid_firefox_question"]["question_body"]
)
) )
self.sumo_pages.top_navbar.click_on_view_profile_option() self.sumo_pages.top_navbar.click_on_view_profile_option()
@ -158,7 +149,7 @@ class TestMyProfilePage(TestUtilities):
self.logger.info("Verifying that we are on the product support forum page after deletion") self.logger.info("Verifying that we are on the product support forum page after deletion")
expect( expect(
self.sumo_pages.product_support_page._product_product_title_element() self.sumo_pages.product_support_page.product_product_title_element()
).to_be_visible() ).to_be_visible()
# C890832, C2094281 # C890832, C2094281
@ -181,18 +172,9 @@ class TestMyProfilePage(TestUtilities):
self.sumo_pages.my_profile_page.get_my_profile_answers_text() self.sumo_pages.my_profile_page.get_my_profile_answers_text()
) )
self.logger.info("Navigating to the Firefox AAQ form")
self.navigate_to_link(
super().aaq_question_test_data["products_aaq_url"]["Firefox"]
)
self.logger.info("Posting a new AAQ question") self.logger.info("Posting a new AAQ question")
question_info = ( question_info = (
self.sumo_pages.aaq_flow.submit_an_aaq_question_for_a_product( self.sumo_pages.aaq_flow.submit_valid_firefox_prod_question_via_ask_now_fx_solutions()
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_name=super().aaq_question_test_data["valid_firefox_question"]["topic_value"],
body=super().aaq_question_test_data["valid_firefox_question"]["question_body"]
)
) )
self.logger.info("Posting a reply for the question") self.logger.info("Posting a reply for the question")
@ -245,7 +227,7 @@ class TestMyProfilePage(TestUtilities):
self.logger.info("Verifying that we are on the product support forum page after deletion") self.logger.info("Verifying that we are on the product support forum page after deletion")
expect( expect(
self.sumo_pages.product_support_page._product_product_title_element() self.sumo_pages.product_support_page.product_product_title_element()
).to_be_visible() ).to_be_visible()
# C2094285, C2094284 # C2094285, C2094284

Просмотреть файл

@ -23,18 +23,9 @@ class TestMyQuestions(TestUtilities):
self.sumo_pages.my_profile_page.get_my_profile_questions_text() self.sumo_pages.my_profile_page.get_my_profile_questions_text()
) )
self.logger.info("Navigating to the Firefox AAQ form") self.logger.info("Posting a new AAQ question")
self.navigate_to_link(
super().aaq_question_test_data["products_aaq_url"]["Firefox"]
)
self.logger.info("Posting a new AAQ question for Firefox product")
question_info = ( question_info = (
self.sumo_pages.aaq_flow.submit_an_aaq_question_for_a_product( self.sumo_pages.aaq_flow.submit_valid_firefox_prod_question_via_ask_now_fx_solutions()
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_name=super().aaq_question_test_data["valid_firefox_question"]["topic_value"],
body=super().aaq_question_test_data["valid_firefox_question"]["question_body"]
)
) )
self.logger.info("Navigating back to the My Profile page") self.logger.info("Navigating back to the My Profile page")
@ -44,7 +35,9 @@ class TestMyQuestions(TestUtilities):
) )
assert ( assert (
new_number self.number_extraction_from_string(
self.sumo_pages.my_profile_page.get_my_profile_questions_text()
)
== original_number_of_questions + 1 == original_number_of_questions + 1
), ( ), (
f"The number of questions should have incremented! " f"The number of questions should have incremented! "
@ -62,7 +55,7 @@ class TestMyQuestions(TestUtilities):
self.logger.info("Verifying that we are on the product support forum page after deletion") self.logger.info("Verifying that we are on the product support forum page after deletion")
expect( expect(
self.sumo_pages.product_support_page._product_product_title_element() self.sumo_pages.product_support_page.product_product_title_element()
).to_be_visible() ).to_be_visible()
# write tests to check my questions section as well # write tests to check my questions section as well
@ -136,18 +129,10 @@ class TestMyQuestions(TestUtilities):
self.sumo_pages.my_questions_page.is_question_list_displayed() self.sumo_pages.my_questions_page.is_question_list_displayed()
).to_be_hidden() ).to_be_hidden()
self.logger.info("Navigating to the Firefox AAQ form") self.logger.info("Posting a new aaq question")
self.navigate_to_link(
super().aaq_question_test_data["products_aaq_url"]["Firefox"]
)
self.logger.info("Posting a new AAQ question for Firefox product")
question_info = ( question_info = (
self.sumo_pages.aaq_flow.submit_an_aaq_question_for_a_product( self.sumo_pages.aaq_flow.submit_valid_firefox_prod_question_via_ask_now_fx_solutions()
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_name=super().aaq_question_test_data["valid_firefox_question"]["topic_value"],
body=super().aaq_question_test_data["valid_firefox_question"]["question_body"]
)
) )
self.logger.info( self.logger.info(
@ -226,18 +211,9 @@ class TestMyQuestions(TestUtilities):
self.user_secrets_accounts["TEST_ACCOUNT_MODERATOR"] self.user_secrets_accounts["TEST_ACCOUNT_MODERATOR"]
)) ))
self.logger.info("Navigating to the Firefox AAQ form") self.logger.info("Posting a new aaq question")
self.navigate_to_link(
super().aaq_question_test_data["products_aaq_url"]["Firefox"]
)
self.logger.info("Posting a new AAQ question for Firefox product")
question_info = ( question_info = (
self.sumo_pages.aaq_flow.submit_an_aaq_question_for_a_product( self.sumo_pages.aaq_flow.submit_valid_firefox_prod_question_via_ask_now_fx_solutions()
subject=super().aaq_question_test_data["valid_firefox_question"]["subject"],
topic_name=super().aaq_question_test_data["valid_firefox_question"]["topic_value"],
body=super().aaq_question_test_data["valid_firefox_question"]["question_body"]
)
) )
self.logger.info( self.logger.info(