From c22d2e0e2c31f175dee3aa471f2a49951104fdd3 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Wed, 15 Apr 2026 15:36:32 +0300 Subject: [PATCH 1/2] ref test_gp_03.06 Verifying navigation by links update group_page.py, conftest.py #402 --- pages/groups_page.py | 37 +++++++++++++++++++++++++++++++++---- tests/conftest.py | 1 - 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/pages/groups_page.py b/pages/groups_page.py index 0134ed949f..c1d666c765 100644 --- a/pages/groups_page.py +++ b/pages/groups_page.py @@ -189,21 +189,50 @@ def click_on_links_on_ru_local(self): @allure.step("Click on links on the 'en' local and thereby open corresponding web pages in the same tab") def click_on_links_on_en_local(self): opened_pages = [] + starting_url = self.driver.current_url + print(starting_url) link1 = self.element_is_present_and_clickable(self.locators.PAGE_LINK1) - current_url = self.driver.current_url link1.click() - Wait(self.driver, 10).until(EC.url_changes(current_url)) + + # Waiting for the first URL change (intermediate page) + Wait(self.driver, 10).until(EC.url_changes(starting_url)) + intermediate_url = self.driver.current_url + print(intermediate_url) + + # Waiting for the second URL change (aimed page) + Wait(self.driver, 10).until(EC.url_changes(intermediate_url)) + current_url = self.driver.current_url + print(current_url) + opened_pages.append(self.get_current_tab_url()) self.driver.back() + intermediate_url = self.driver.current_url + print(intermediate_url) + + self.driver.back() + starting_url = self.driver.current_url + print(starting_url) + + # Waiting for the starting page loading Wait(self.driver, 10).until(EC.presence_of_element_located((By.TAG_NAME, "h3"))) link2 = self.element_is_present_and_clickable(self.locators.PAGE_LINK2) - current_url = self.driver.current_url link2.click() - Wait(self.driver, 10).until(EC.url_changes(current_url)) + + # Waiting for the first URL change (intermediate page) + Wait(self.driver, 10).until(EC.url_changes(starting_url)) + intermediate_url = self.driver.current_url + print(intermediate_url) + + # Waiting for the second URL change (aimed page) + Wait(self.driver, 10).until(EC.url_changes(intermediate_url)) + current_url = self.driver.current_url + print(current_url) + opened_pages.append(self.get_current_tab_url()) + print(opened_pages) return opened_pages diff --git a/tests/conftest.py b/tests/conftest.py index 7be248a657..f97e0909ef 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -154,7 +154,6 @@ def auto_test_user_authorized(driver, main_page_open): page.element_is_visible(LoginPageLocators.INPUT_PASSWORD).send_keys(os.environ["PASSWORD"]) page.element_is_present_and_clickable(LoginPageLocators.SIGN_IN_BUTTON).click() page.check_expected_link(MainPageLinks.URL_GROUPS_PAGE) - print("Current URL:", driver.current_url) # Temporarily for debugging page = ProfilePage(driver) page.loader_checking() From 8d0b988e93c547a1e30a0624b1a6a8b1d2f657c2 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Wed, 15 Apr 2026 16:16:13 +0300 Subject: [PATCH 2/2] update processes --- .github/workflows/Daily-report.yml | 20 +++++++++----------- .github/workflows/pull_request_report.yml | 21 +++++++++------------ 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/Daily-report.yml b/.github/workflows/Daily-report.yml index c256d03400..f51f43c8f0 100644 --- a/.github/workflows/Daily-report.yml +++ b/.github/workflows/Daily-report.yml @@ -3,7 +3,6 @@ name: Test-All-Daily on: workflow_dispatch - permissions: contents: read @@ -11,10 +10,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Обновлено с v3 до v4 - name: Set up Python 3.12 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 # Обновлено с v3 до v5 with: python-version: "3.12" @@ -45,7 +44,6 @@ jobs: pytest -s -v --alluredir=allure-results continue-on-error: true - - name: Add allure information working-directory: allure-results if: always() @@ -67,7 +65,7 @@ jobs: continue-on-error: true - name: Allure Report action - uses: simple-elf/allure-report-action@v1.6 + uses: simple-elf/allure-report-action@master if: always() with: allure_results: allure-results @@ -77,23 +75,23 @@ jobs: - name: Commit Allure report if: always() - uses: peaceiris/actions-gh-pages@v2 + uses: peaceiris/actions-gh-pages@v4 # Обновлено с v2 до v4 env: PERSONAL_TOKEN: ${{ secrets.CI_TOKEN }} PUBLISH_BRANCH: gh-pages PUBLISH_DIR: allure-history continue-on-error: true - - messsage: + message: # Исправлено: было messsage (опечатка) needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Send message to Telegram - uses: "appleboy/telegram-action@master" + uses: appleboy/telegram-action@master with: - to: ${{secrets.CHAT_ID}} - token: ${{secrets.TELEGRAM_TOKEN}} + to: ${{ secrets.CHAT_ID }} + token: ${{ secrets.TELEGRAM_TOKEN }} args: Daily full report https://brain-up.github.io/auto-tests-python/ continue-on-error: true + diff --git a/.github/workflows/pull_request_report.yml b/.github/workflows/pull_request_report.yml index d7d98acd68..3f035504c3 100644 --- a/.github/workflows/pull_request_report.yml +++ b/.github/workflows/pull_request_report.yml @@ -1,12 +1,11 @@ name: Test-pull_requests on: - push: + push: # workflow_dispatch # schedule: # - cron: '0 0 * * *' - permissions: contents: read @@ -14,10 +13,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Обновлено с v3 до v4 - name: Set up Python 3.12 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 # Обновлено с v3 до v5 with: python-version: "3.12" @@ -48,7 +47,6 @@ jobs: pytest -s -v --alluredir=allure-results continue-on-error: true - - name: Add allure information working-directory: allure-results if: always() @@ -70,7 +68,7 @@ jobs: continue-on-error: true - name: Allure Report action - uses: simple-elf/allure-report-action@v1.6 + uses: simple-elf/allure-report-action@master if: always() with: allure_results: allure-results @@ -80,23 +78,22 @@ jobs: - name: Commit Allure report if: always() - uses: peaceiris/actions-gh-pages@v2 + uses: peaceiris/actions-gh-pages@v4 # Обновлено с v2 до v4 env: PERSONAL_TOKEN: ${{ secrets.CI_TOKEN }} PUBLISH_BRANCH: gh-pages PUBLISH_DIR: allure-history continue-on-error: true - - messsage: + message: # Исправлено: было messsage (опечатка) needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Send message to Telegram - uses: "appleboy/telegram-action@master" + uses: appleboy/telegram-action@master with: - to: ${{secrets.CHAT_ID}} - token: ${{secrets.TELEGRAM_TOKEN}} + to: ${{ secrets.CHAT_ID }} + token: ${{ secrets.TELEGRAM_TOKEN }} args: Last pull request report https://brain-up.github.io/auto-tests-python/ continue-on-error: true