Граф коммитов

92 Коммитов

Автор SHA1 Сообщение Дата
Emil Ghitta c6316d9532 - Adding the newly AAQ topics for AAQ test coverage.
- Adding the functionality of creating a new KB article via kb/new API inside the add_kb_article_flow.py
- Catching potential failures yielded by load_state events not being fired in conftest.py
- Reducing the default navigation timeout from 2 minutes to 30 seconds and using the internal navigate_to_link() function in conftest.py
- Creating kb articles via kb/new API calls in several tests.
- Removing external link validations in test_edit_my_profile.py
- Skipping some flaky tests from Chromium.
2024-11-18 15:50:14 +02:00
Emil Ghitta 9a7a3c0781 - Adding TestGroup3 to playwright.
- Expanding the user_groups_messages.py to include locale leader removal or addition page messages.
- Modifying the flows in user_group_flow.py to handle actions against group leaders.
- Adding locators and functions for group leaders in groups_page.py page object.
Adding a new test in test_groups.py which verifies:
- That admin users can add and remove locale leaders from groups.
- That the correct banner is displayed when adding or removing a group leader.
- That adding a group leader to a group successfully adds the leader in both the leaders & members group lists.
2024-11-13 21:20:04 +02:00
Emil Ghitta 8dd4ae5c8d - Fix test_post_aaq_questions_for_all_freemium_products_topics and test_additional_system_details_user_agent_information tests from the test_aaq_form_page.py by waiting for a particular selector after performing the ticket submission. If the locator is not displayed we are re-trying the ticket submission.
- Fix some failures related to the top_navbar.py hover function by waiting for a particular top-navbar selector to be displayed before attempting to perform the click.
2024-11-12 23:58:36 +02:00
Emil Ghitta 854fa465d3 - Improving the groups_page.py page object and adding new locators & functions against them to be used in tests.
- Adding a function to click on groups listed inside the profile page.
- Adding user group tests pytest marker to pytest.ini
- Adding new test images for usage in tests.
- Expanding playwright coverage over the groups section via the test_groups.py
- Expanding playwright coverage into verifying that messages can be sent via the groups page inside the test_messaging_system.py
- Adding a couple of helper functions inside the utilities.py to:
1. Have the capability of uploading files via file choosers.
2. Have the capability of taking a screenshot for a particular locator.
3. Have the capability of comparing two given images using python pillow.
2024-11-11 13:17:50 +02:00
Emil Ghitta 5dda7567da - Creating a new helper function in utilities.py that gives the possibility of re-calling a function which failed due to a 502 error. This function relies on catching a warning emitted by the handle_502_error function inside conftest.py.
- Fix locators issues due to the transition from selectize to tom-select.
- Extended the checkbox_interaction() function in basepage.py to handle ElementHandles and implemented a retry mechanism if the element check() or uncheck() has failed due to some reason.
- Modified the click() function in basepage.py to:
1. Accept and interact with ElementHandles.
2. Implement a retry mechanism based on a given expected_locator or expected_url after the click action. If the expected_locator or expected_url condition is not fulfilled after the click action we are forcing a re-click on the target element.
3. Wait for networkidle before attempting to click on the element.
- Updated the page objects, tests and flows for which flakiness occurred in the past to use the newly implemented click() and function re-call mechanism.
- Added a helper function in basepage.py which moves the mouse to a given location.
2024-11-06 19:00:43 +02:00
Emil Ghitta c320441697 - Handle 502 errors inside the page context by refreshing the current page after a 5 seconds delay.
- Increase number of threads from 2 to 4 for playwright tests.
2024-10-25 11:48:15 +03:00
Emil Ghitta fc2f23b4bf - Improve and document the explore_by_topic_page.py page object. 2024-10-24 18:45:57 +03:00
Emil Ghitta 4dcbcd9b0c - Improve and document the product_support_page.py page object.
- Enable the "Guides" product page verification inside the test_still_need_help_button_redirect test.
2024-10-24 18:16:15 +03:00
Emil Ghitta 6f30eefa25 - Improve and document the messaging_system_flow.py
- Document the page objects related to messaging system.
2024-10-24 11:07:31 +03:00
Emil Ghitta 16a2340e70 - Improve and document search_page page object.
- Document utilities.py
- Remove unused search_synonym.py
2024-10-22 23:15:24 +03:00
Emil Ghitta 5e24e0b1e6 - Improve auth_flow.py and auth_page.py classes. 2024-10-21 23:03:28 +03:00
Emil Ghitta e5f228356c - Improve footer.py page object.
- Improve homepage.py page object.
- Improve test_footer.py by using playwright's API for making the GET request to the sumo footer links.
2024-10-21 19:53:22 +03:00
Emil Ghitta 7b9feadd46 - Improve top_navbar.py page object. 2024-10-21 18:19:47 +03:00
Emil Ghitta 1136dcd54f - basepage.py: add function for checkbox interaction
- Improve profile related page objects, flows & tests.
2024-10-20 23:22:43 +03:00
Emil Ghitta 8099cfcb1f - Block all Pontoon requests in page context during Playwright test execution.
- Simplifying a userQuestions test.
- Forcing the click for the update_my_profile_button to try avoiding flakiness.
2024-10-17 11:13:40 +03:00
Emil Ghitta c017fd9219
Merge pull request #6290 from emilghittasv/playwright-search-tests
Playwright add test for doc_id search
2024-10-16 16:50:51 +03:00
Emil Ghitta ff17a95b76 - Added the possibility for playwright to navigate to the Guides product page via the top-navbar section.
- Refactored & enabled the productSupportPage tests.
- Expanded playwright coverage for the "Guides" product page inside the productSupportPage tests.
- Refactored the products_page.py by making the functions public & replace super() with self.
- Refactored the product_support_page.py by making the functions public & replace super() with self.
- Enabled the productSupportPage tests in playwright.yml
2024-10-15 15:05:20 +03:00
Emil Ghitta 11e785aa63 - Adding test for doc_id field operator verification in test_main_searchbar.py
- Adding a function inside the utilities.py which returns the GET api response.
- Enabling test_featured_articles_redirect test inside test_product_solutions_page.py.
- Mapping some automated tests with their manual representative via the TestRail tc ID
2024-10-11 16:22:52 +03:00
Emil Ghitta 8dae17bdaa
Merge pull request #6285 from emilghittasv/playwright-search-tests
Playwright add second batch of search tests
2024-10-10 21:08:41 +03:00
Emil Ghitta bebc0e4c92 - Refactoring the moderate_forum_content.py class.
- Fixing the test_report_abuse test inside the test_posted_questions.py
2024-10-10 18:05:22 +03:00
Emil Ghitta 774510c707 - Added the possibility of submitting a test article with a custom content inside the add_kb_article_flow.py
- Expanded the functionality of playwright to translate articles in different locales (not only in the ro locale) inside the kb_localization_flow.py, and kb_translate_article_page.py
- Calling the clear_the_searchbar() each time playwright tries to add input inside the searchbar inside the fill_into_searchbar() function from the search_page.py page class.
- Added second batch of search tests inside test_main_searchbar.py
2024-10-10 10:32:35 +03:00
Emil Ghitta 082488144e - Refactoring the footer.py and homepage.py page objects by marking the page functions as public, replacing super() with self and updating function calls in tests.
- Adding a couple of synonyms inside the search_synonym.py page which are used in tests.
- Adding a WordNetLemmatizer instance in utilities.py which is going to help extracting the singular form of words when searching for synonyms of the search term inside the search results.
- Extending playwright coverage with the first batch of search tests inside the test_main_searchbar.py.
- Adding searchTests marker inside pytest.ini and playwright.yml
2024-10-08 14:45:49 +03:00
Emil Ghitta 0c743cabbc
Merge pull request #6274 from emilghittasv/playwright-expand-coverage-to-search
Playwright add foundation for search tests
2024-10-07 15:22:18 +03:00
Emil Ghitta 5b8fefb178 - Add locators for unread, read messages and related functions inside inbox_page.py
- Expand playwright test coverage over the unread message avatar red dot notification & counter inside test_messaging_system.py
- Add locators for the red dot unread message notification, unread notification counter and functions against them inside top_navbar.py
2024-10-04 01:15:00 +03:00
Emil Ghitta 4ab24477da - This PR is the building block for the search tests.
- Added nltk to the project as a dev dependency.
- Updated the search_page.py page object by adding a couple of new locators, functions against those locators, changing the usage of super() to self and making the functions public.
- Added search_synonym.py which lists a couple of synonyms that can be returned from SUMO when performing a search. Will reduce the list to the ones which are actually used in tests once the tests are written.
- Updated utilities.py with adding the helper functions that will be responsible of handling the search term and evaluating if the correct search results are returned.
2024-10-02 19:11:10 +03:00
Emil Ghitta c4407928b6 - Try fixing situations in which the playwright click event is not successfully registered by attempting to re-click twice with a delay of 2 seconds between retries.
- Modified the contact_support_page.py, product_solutions_page.py and product_topics_page.py to use self. instead of super() and made the page functions public.
- Modified the function calls in tests.
- Excluded Thunderbird for Android from the test_system_details_information test.
2024-10-02 15:22:05 +03:00
Emil Ghitta 0e57633a49 - Using composition instead of inheritance inside the kb_localization_flow.py class.
- Using self. instead of super() and making the functions public inside the kb_translate_article_page.py class.
- Updating the modified function calls in tests.
2024-10-01 15:46:27 +03:00
Emil Ghitta eb20b7a5e7 - Fixing failing tests caused by moderator tool locator changes.
- Adding Thunderbird for Android product to tests.
2024-09-30 11:28:56 +03:00
Emil Ghitta 69f37fda35 - Mark the functions from the kb article discussions class as public and replace super() with self.
- Use composition instead of inheritance for the kb_article_threads_flow.py class.
- Updating modified function calls in tests.
2024-09-26 23:47:20 +03:00
Emil Ghitta 90289957d4 - Mark the functions from the kb article metadata class as public and replace super() with self.
- Use composition instead of inheritance for the delete_kb_article_flow.py and edit_article_meta_flow.py class.
- Updating modified function calls in tests.
2024-09-26 09:32:37 +03:00
Emil Ghitta c43f5ab963 - Mark the functions from the kb related classes as public and replace super() with self.
- Use composition instead of inheritance for the add_kb_article_flow.py and add_kb_media_flow.py class.
- Updating modified function calls in tests.
2024-09-24 19:22:54 +03:00
Emil Ghitta 98a19fa09f - Mark the auth_page class functions as public and replace super() with self.
- Use composition instead of inheritance for the auth_flow.py class.
- Updating modified function calls in tests.
2024-09-24 10:28:32 +03:00
Emil Ghitta 0524e6edc3 - Mark the aaq_form_page, questions_page, ways_to_contribute_pages page classes functions as public and replace super() with self.
- Use composition instead of inheritance for the aaq_flow.py class.
- Updating modified function calls in tests.
2024-09-23 18:43:24 +03:00
Emil Ghitta 147717f45d - Mark the new_message, sent_messages, mess_system_user_navbar and inbox_page page functions as public and replace super() with self.
- Use composition instead of inheritance for the messaging_system_flow.py class.
2024-09-23 16:16:20 +03:00
Emil Ghitta 7762a1e9df - Mark the group page functions as public.
- Replace super() with self in group_page class.
- Use composition instead of inheritance for the user_group_flow.py
2024-09-23 14:14:33 +03:00
Emil Ghitta 108936a7c8 - Mark the page functions as public.
- Replace super() with self in page classes.
- Use composition instead of inheritance for the edit_profile_data_flow.py
2024-09-19 15:56:37 +03:00
Emil Ghitta f82e0d7b13 - Updating a couple of places in playwright since the new kb/new and kb/edit/metadata pages contain the new "product" field instead of the "relevancy" one.
- Updating a couple of mapped TestRail test id's.
2024-09-12 12:19:44 +03:00
Ryan Johnson edcef8e82e
improve relevant products/topics selection 2024-09-05 08:36:01 -07:00
Emil Ghitta c2aeff39b9 - Fix waits & test errors. 2024-08-22 21:53:43 +03:00
Tasos Katsoulas 41cc8d6bc4
Use internal IA for the AAQ instead of a config. 2024-08-08 09:27:56 -07:00
Emil Ghitta d043719cd6 - Playwright pytest provides the is_chromium, is_webkit and is_firefox fixtures to determine the current browser used for testing. Modifying the test to use those. 2024-08-02 18:36:38 +03:00
Emil Ghitta 4d50f5e0cf - Adding Mozilla Monitor to playwright coverage.
- Fixing some failures caused by the recent taxonomy work.
- Isolating the restricted visibility kb articles to avoid flakiness (no longer using a single kb article for multiple tests. Making use of the create_delete_article fixture to create a fresh kb article before each test & delete it when done)
- Removing unused playwright.yml and pytest.ini markers.
- Reworking the waits.
2024-08-01 20:45:27 +03:00
Emil Ghitta f92c0b92ba - Adding a new helper function in BasePage to extract the list of textContent for a given locator.
- Adding the https://support.allizom.org/en-US/kb/get-community-support?exit_aaq=1 page to test data.
- Adding the AAQ widget text which is displayed when the "All Products" filter is applied to AAQWidgetMessage for further usage in tests.
- Expanding the locators & actions for the ExploreByTopicsPage class.
- Adding playwright coverage for the "Explore By Topic" page:
  - Verifying that the correct explore by topic page header is displayed when changing the topic via the "All Topics" side navbar.
  - Verifying that the "Filter by product" successfully updates the displayed list of articles with articles that belong to the chosen product from the "Filter by product" dropdown (by verifying the displayed metadata for each listed article)
  - Verifying that the correct AAQ widget text is displayed for each filtered product.
  - Verifying the correct AAQ widget redirect for each filtered product.
  - Added playwright coverage for the https://github.com/mozilla/sumo/issues/1876 case
- Adding the new test suite to playwright.yml
2024-07-23 15:55:04 +03:00
Emil Ghitta c25974ece2 - Adding a new helper function inside BasePage which should check if a given Locator is visible.
- Creating the contributor_discussions_page.py page (for /forums SUMO page), discussions_page.py (for /forums/{forumName}/ page) and explore_by_topic_page.py page (for /topics/ SUMO page).
- Instantiating the newly created pages inside sumo_pages.py
- Updating the top-navbar.py with several new locators (for the new top-navbar) & action functions against them.
- Expanding playwright coverage over the top-navbar section by verifying:
 - All Explore Help Articles > Explore by product top-navbar options redirects.
 - All Explore Help Articles > Explore by topic redirects top-navbar options redirects + the default "Filter by product" & "All Topics" filter when accessing the page.
 - All Community Forums > Browse by product top-navbar options redirects.
 - All Community Forums > Browse all forum threads by topic top-navbar options redirects + the filter displayed inside the "Topics" dropdown.
 - All Ask a Question top-navbar option redirects.
 - All Contribute > Contributor Discussions top-navbar redirects + the highlighted option inside the "Contributor discussions" side-navbar
2024-07-22 19:44:14 +03:00
Emil Ghitta 29d1844d52 - Update browser option from chrome to chromium.
- Renamed the TestUtilities class to Utilities & class instance from test_utilities to utilities
- Adding create_delete_article mark to pytest.ini
2024-07-19 12:59:22 +03:00
Emil Ghitta 4eef3588cb Refactoring playwright framework 2024-07-18 12:27:33 +03:00
Tasos Katsoulas b953efb0b9
Wording menu updates 2024-07-17 17:11:50 +03:00
Emil Ghitta beda693055 - Enabling test_fallback_languages test since https://github.com/mozilla/sumo/issues/1820 is now fixed.
- Removed some other Firefox Reality, FPN and Hubs mentions inside the playwright framework.
2024-07-15 22:59:35 +03:00
Emil Ghitta f8aabec21f Removing sunset products from playwright coverage. 2024-07-11 15:08:42 +03:00
Emil Ghitta 0dbb6f1909 Update Firefox for Enterprise aaq topic tags 2024-07-08 18:12:47 +03:00