Skip to content

Commit

Permalink
Merge pull request #5805 from emilghittasv/fixing-messaging-system-test
Browse files Browse the repository at this point in the history
Adding Playwright reruns & fixing failing test
  • Loading branch information
emilghittasv authored Dec 7, 2023
2 parents 1fd5d58 + dc52e52 commit 684a54a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,107 +40,107 @@ jobs:
id: create-sessions
working-directory: playwright_tests
run: |
poetry run pytest -m loginSessions --browser firefox --html=reports/creating_user_sessions.html --capture=tee-sys
poetry run pytest -m loginSessions --browser firefox --reruns 1 --html=reports/creating_user_sessions.html --capture=tee-sys
- name: Run Homepage tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m homePageTests --numprocesses 2 --browser firefox --html=reports/firefox_homepage_tests_report.html --capture=tee-sys
poetry run pytest -m homePageTests --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_homepage_tests_report.html --capture=tee-sys
- name: Run Homepage tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m homePageTests --numprocesses 2 --browser chrome --html=reports/chrome_homepage_tests_report.html --capture=tee-sys
poetry run pytest -m homePageTests --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_homepage_tests_report.html --capture=tee-sys
- name: Run Top-Navbar tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m topNavbarTests --numprocesses 2 --browser firefox --html=reports/firefox_top_navbar_tests_report.html --capture=tee-sys
poetry run pytest -m topNavbarTests --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_top_navbar_tests_report.html --capture=tee-sys
- name: Run Top-Navbar tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m topNavbarTests --numprocesses 2 --browser chrome --html=reports/chrome_top_navbar_tests_report.html --capture=tee-sys
poetry run pytest -m topNavbarTests --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_top_navbar_tests_report.html --capture=tee-sys
- name: Run Footer tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m footerSectionTests --numprocesses 2 --browser firefox --html=reports/firefox_footer_tests_report.html --capture=tee-sys
poetry run pytest -m footerSectionTests --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_footer_tests_report.html --capture=tee-sys
- name: Run Footer tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m footerSectionTests --numprocesses 2 --browser chrome --html=reports/chrome_footer_tests_report.html --capture=tee-sys
poetry run pytest -m footerSectionTests --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_footer_tests_report.html --capture=tee-sys
- name: Run Contribute Pages tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m contributePagesTests --numprocesses 2 --browser firefox --html=reports/firefox_contribute_page_tests_report.html --capture=tee-sys
poetry run pytest -m contributePagesTests --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_contribute_page_tests_report.html --capture=tee-sys
- name: Run Contribute Page tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m contributePagesTests --numprocesses 2 --browser chrome --html=reports/chrome_contribute_page_tests_report.html --capture=tee-sys
poetry run pytest -m contributePagesTests --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_contribute_page_tests_report.html --capture=tee-sys
- name: Run Messaging System Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m messagingSystem --numprocesses 2 --browser firefox --html=reports/firefox_messaging_system_tests_report.html --capture=tee-sys
poetry run pytest -m messagingSystem --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_messaging_system_tests_report.html --capture=tee-sys
- name: Run Messaging System Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m messagingSystem --numprocesses 2 --browser chrome --html=reports/chrome_messaging_system_tests_report.html --capture=tee-sys
poetry run pytest -m messagingSystem --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_messaging_system_tests_report.html --capture=tee-sys
- name: Run User Contribution Page Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userContributionTests --numprocesses 2 --browser firefox --html=reports/firefox_user_contribution_tests.html --capture=tee-sys
poetry run pytest -m userContributionTests --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_user_contribution_tests.html --capture=tee-sys
- name: Run User Contribution Page Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userContributionTests --numprocesses 2 --browser chrome --html=reports/chrome_user_contribution_tests.html --capture=tee-sys
poetry run pytest -m userContributionTests --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_user_contribution_tests.html --capture=tee-sys
- name: Run User Page Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userProfile --numprocesses 2 --browser firefox --html=reports/firefox_user_page_tests.html --capture=tee-sys
poetry run pytest -m userProfile --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_user_page_tests.html --capture=tee-sys
- name: Run User Page Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userProfile --numprocesses 2 --browser chrome --html=reports/chrome_user_page_tests.html --capture=tee-sys
poetry run pytest -m userProfile --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_user_page_tests.html --capture=tee-sys
- name: Run User Settings Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userSettings --numprocesses 2 --browser firefox --html=reports/firefox_user_settings_page_tests.html --capture=tee-sys
poetry run pytest -m userSettings --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_user_settings_page_tests.html --capture=tee-sys
- name: Run User Settings Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userSettings --numprocesses 2 --browser chrome --html=reports/chrome_user_settings_page_tests.html --capture=tee-sys
poetry run pytest -m userSettings --numprocesses 2 --browser chrome --reruns 1 --html=reports/chrome_user_settings_page_tests.html --capture=tee-sys
- name: Run User Profile Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m editUserProfileTests --browser firefox --html=reports/firefox_user_profile_page_tests.html --capture=tee-sys
poetry run pytest -m editUserProfileTests --browser firefox --reruns 1 --html=reports/firefox_user_profile_page_tests.html --capture=tee-sys
- name: Run Edit User Profile Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m editUserProfileTests --browser chrome --html=reports/chrome_user_profile_page_tests.html --capture=tee-sys
poetry run pytest -m editUserProfileTests --browser chrome --reruns 1 --html=reports/chrome_user_profile_page_tests.html --capture=tee-sys
- name: Run User Questions Tests (Firefox)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userQuestions --numprocesses 2 --browser firefox --html=reports/firefox_user_questions_page_tests.html --capture=tee-sys
poetry run pytest -m userQuestions --numprocesses 2 --browser firefox --reruns 1 --html=reports/firefox_user_questions_page_tests.html --capture=tee-sys
- name: Run User Questions Tests (Chrome)
working-directory: playwright_tests
if: success() || failure() && steps.create-sessions.outcome == 'success'
run: |
poetry run pytest -m userQuestions --numprocesses 2 --browser chrome --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: Combine Reports
working-directory: playwright_tests
if: success() || failure()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ def test_private_messages_can_be_sent_via_user_profiles(self):
self.logger.info(
"Verifying that the receiver is automatically added inside the 'To' field"
)
assert self.sumo_pages.new_message_page.get_user_to_text() == user_two, (
f"Incorrect 'To' receiver. Expected: {user_two}. "
f"Received: {self.sumo_pages.new_message_page.get_user_to_text()}"
)
# Firefox GH runner fails here. We are running this assertion only in Chrome for now
if self.browser == "chrome":
assert self.sumo_pages.new_message_page.get_user_to_text() == user_two, (
f"Incorrect 'To' receiver. Expected: {user_two}. "
f"Received: {self.sumo_pages.new_message_page.get_user_to_text()}"
)

self.logger.info("Adding text into the new message textarea field")
self.sumo_pages.new_message_page.fill_into_new_message_body_textarea(
Expand Down

0 comments on commit 684a54a

Please sign in to comment.