From f459418ad785ffff7d8f70da3360c9edd4f16a2f Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Thu, 18 Apr 2024 15:24:00 +0500 Subject: [PATCH 1/3] failing sanity test --- .github/workflows/ui_suites_workflow.yml | 6 +++++- frontend/test_project/features/web/web_tests.feature | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ui_suites_workflow.yml b/.github/workflows/ui_suites_workflow.yml index 7be673fb..a9407199 100644 --- a/.github/workflows/ui_suites_workflow.yml +++ b/.github/workflows/ui_suites_workflow.yml @@ -30,26 +30,30 @@ jobs: tags: 'web_tests and healthcheck' config_file: ./env_configs/win_chrome.json html_report: win-chrome + suite_name: 'Health Check' - name: Win Firefox baseurl: https://opensource-demo.orangehrmlive.com tags: 'web_tests and firefox and smoke' config_file: ./env_configs/win_firefox.json html_report: win-firefox + suite_name: 'Smoke' - name: Win Edge baseurl: https://opensource-demo.orangehrmlive.com tags: 'web_tests and sanity' config_file: ./env_configs/win_edge.json html_report: win-edge + suite_name: 'Sanity' - name: Mac Safari baseurl: https://opensource-demo.orangehrmlive.com tags: 'web_tests and regression' config_file: ./env_configs/mac_safari.json html_report: mac-safari + suite_name: 'Regression' - name: ${{ matrix.name }} - Regression + name: ${{ matrix.name }} - ${{ matrix.suite_name }} runs-on: ubuntu-latest steps: - name: Setup Python diff --git a/frontend/test_project/features/web/web_tests.feature b/frontend/test_project/features/web/web_tests.feature index 7702b74c..58c7ea2a 100644 --- a/frontend/test_project/features/web/web_tests.feature +++ b/frontend/test_project/features/web/web_tests.feature @@ -62,7 +62,7 @@ Feature: OrangeHRM Login and Modus QA blog Scenario: Check QA modus blog Search Given I set web base url 'https://moduscreate.com' And The browser resolution is '1024' per '768' - And The title is 'Modus Create | Consulting and Product Development Partner' + And The title is 'Modus Create test | Consulting and Product Development Partner' When The element 'Modus_Site > main_heading' is displayed And I click item 'Blog' for element 'Modus_Site > header_link' And The title is 'Blog | Digital Transformation Insights - Modus Create' From 8b7d2cb701d18ae1d01c042b67b3f0465ad8b01e Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Thu, 18 Apr 2024 15:36:32 +0500 Subject: [PATCH 2/3] passing sanity test --- frontend/test_project/features/web/web_tests.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/test_project/features/web/web_tests.feature b/frontend/test_project/features/web/web_tests.feature index 58c7ea2a..7702b74c 100644 --- a/frontend/test_project/features/web/web_tests.feature +++ b/frontend/test_project/features/web/web_tests.feature @@ -62,7 +62,7 @@ Feature: OrangeHRM Login and Modus QA blog Scenario: Check QA modus blog Search Given I set web base url 'https://moduscreate.com' And The browser resolution is '1024' per '768' - And The title is 'Modus Create test | Consulting and Product Development Partner' + And The title is 'Modus Create | Consulting and Product Development Partner' When The element 'Modus_Site > main_heading' is displayed And I click item 'Blog' for element 'Modus_Site > header_link' And The title is 'Blog | Digital Transformation Insights - Modus Create' From 8b0a396bc75374352d234e9b36f2b89eb8d39356 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Fri, 19 Apr 2024 13:36:29 +0500 Subject: [PATCH 3/3] 30 days check --- main/frontend/common/step_definitions/email.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/frontend/common/step_definitions/email.py b/main/frontend/common/step_definitions/email.py index 4c1d57e4..a9b59448 100644 --- a/main/frontend/common/step_definitions/email.py +++ b/main/frontend/common/step_definitions/email.py @@ -29,7 +29,7 @@ def check_email(user_type, selenium_generics: SeleniumGenerics): yesterday = today - timedelta(days=1) date_today = today.strftime("%d %b %Y") - date_yesterday = yesterday.strftime("%d %b %Y") + date_old = yesterday.strftime("%d %b %Y") if '0' in date_today[0]: date_today = date_today[1:] f = open(test_data_dir) @@ -37,7 +37,7 @@ def check_email(user_type, selenium_generics: SeleniumGenerics): for i in data: value = i if ("Test Project Data" in value["Subject"] and "tauqirsarwar1@gmail.com" in value["From"]) \ - and (date_today in value["Date"] or date_yesterday in value["Date"]) and (user_type in value["To"]): + and (date_old < value["Date"]) and (user_type in value["To"]): decoded_data = base64.b64decode(value["Message"]) soup = BeautifulSoup(decoded_data, "lxml") email_body = str(soup.body()[0])