From 2d9c9abb672a10c57b42742d1a14082084c31d0e Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Mon, 15 Apr 2024 13:26:39 +0500 Subject: [PATCH 1/2] removed emails --- .gitignore | 3 ++- main/frontend/common/step_definitions/email.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cc37a4f9..dfa01abe 100644 --- a/.gitignore +++ b/.gitignore @@ -160,4 +160,5 @@ allure-report/* reports/screenshots/* /test_data/visualtesting/test/* /output/ -/test_data/files/* +/test_data/files/email_data.json +/test_data/files/email_reader.txt diff --git a/main/frontend/common/step_definitions/email.py b/main/frontend/common/step_definitions/email.py index 9937aa2e..276d31aa 100644 --- a/main/frontend/common/step_definitions/email.py +++ b/main/frontend/common/step_definitions/email.py @@ -45,7 +45,7 @@ def check_email(user_type, selenium_generics: SeleniumGenerics): decoded_data = base64.b64decode(value["Message"]) soup = BeautifulSoup(decoded_data, "lxml") email_body = str(soup.body()[0]) - url = re.findall('https://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*, ]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', + url = re.findall('https?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|%[0-9a-fA-F][0-9a-fA-F])+', email_body) final_url = "" if len(url) >= 1: @@ -54,7 +54,7 @@ def check_email(user_type, selenium_generics: SeleniumGenerics): decoded_data = base64.b64decode(value["Url"]) soup = BeautifulSoup(decoded_data, "lxml") email_body = str(soup.body()[0]) - url = re.findall('https://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*, ]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', + url = re.findall('https?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|%[0-9a-fA-F][0-9a-fA-F])+', email_body) new_url = '' for j in url: From ec82fff13dbfa4ec20ab3c67ba20e83c1e0007f9 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Mon, 15 Apr 2024 13:29:06 +0500 Subject: [PATCH 2/2] removed emails --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index dfa01abe..12fac5b4 100644 --- a/.gitignore +++ b/.gitignore @@ -160,5 +160,5 @@ allure-report/* reports/screenshots/* /test_data/visualtesting/test/* /output/ -/test_data/files/email_data.json -/test_data/files/email_reader.txt +/test_data/files/*.json +/test_data/files/*.txt \ No newline at end of file