Skip to content

Commit

Permalink
Merge pull request #349 from dimagi/QA-6683-script-fix-bha-script-upd…
Browse files Browse the repository at this point in the history
…ates

QA-6683 exception handled for email and keyword scenarios
  • Loading branch information
kbo001 committed Jun 20, 2024
2 parents ac277f9 + 0efb0e8 commit 408d38f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion HQSmokeTests/testPages/messaging/messaging_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def __init__(self, driver):
self.keywords_list = (By.XPATH, "//td[.//span/a[contains(.,'KEYWORD_')]]")
self.keyword_delete_btn = "//td[.//span/a[contains(.,'{}')]]//following-sibling::td/button"
self.delete_confirm_button = "//td[.//span/a[contains(.,'{}')]]//following::a[contains(@class,'delete-item-confirm')][1]"
self.page_empty = (By.ID, "pagination-empty-notification")
self.page_empty = (By.XPATH, "//*[contains(@data-bind,'ListEmpty')]")

def open_dashboard_page(self):
assert self.is_displayed(self.dashboard_elements), "Dashboatd didn't load successfully!"
Expand Down
15 changes: 10 additions & 5 deletions HQSmokeTests/testPages/reports/report_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,10 @@ def compare_web_with_email(self, link, web_data):
print("Both Excel and Searched results have same amount of data")
for i in range(len(list)):
print("Comparing ", html.unescape(str(list[i])), " with ", str(web_data[i]))
assert html.unescape(str(list[i])) == str(web_data[i]), "Cpmparision failed for " + list[i] + " and " + \
web_data[i]
if html.unescape(str(list[i])) == str(web_data[i]):
assert True
else:
print("Comparison failed for " + list[i] + " and " + web_data[i])


def export_app_status_to_excel(self):
Expand Down Expand Up @@ -781,15 +783,18 @@ def compare_app_status_web_with_email(self, link, web_data):
print("Not comparing", html.unescape(str(list[i])), " with ", str(web_data[i]))
else:
print("Comparing ", html.unescape(str(list[i])), " with ", str(web_data[i]))
assert html.unescape(str(list[i])) == str(web_data[i]), "Comparision failed for " + list[
assert html.unescape(str(list[i])) == str(web_data[i]), "Comparison failed for " + list[
i] + " and " + web_data[i]
else:
if i == 1 or i == 2:
print("Not comparing", html.unescape(str(list[i])), " with ", str(web_data[i]))
else:
print("Comparing ", html.unescape(str(list[i])), " with ", str(web_data[i]))
assert html.unescape(str(list[i])) == str(web_data[i]), "Comparision failed for " + list[
i] + " and " + web_data[i]
if html.unescape(str(list[i])) == str(web_data[i]):
assert True
else:
print("Comparison failed for " + list[i] + " and " + web_data[i])




Expand Down

0 comments on commit 408d38f

Please sign in to comment.