Skip to content

Commit

Permalink
QA-7156 removed duplicate testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
kbo001 committed Oct 30, 2024
1 parent e4d384b commit 14305a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
1 change: 0 additions & 1 deletion ExportTests/testCases/test_01_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def test_case_24_daily_saved_exports(driver, settings):
export = ExportDataPage(driver)
export.cleanup_existing_dse()
export.daily_saved_exports_form()
home.data_menu()
export.daily_saved_exports_case()


Expand Down
41 changes: 12 additions & 29 deletions HQSmokeTests/testPages/data/export_data_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,12 @@ def date_filter(self):
self.click(self.close_date_picker)
self.wait_and_sleep_to_click(self.apply, timeout=10)

def prepare_and_download_export(self, name='', flag=None):
if name != '':
self.wait_and_sleep_to_click((By.XPATH, self.export_form_case_data_button.format(name)))
def prepare_and_download_export(self, name, flag=None):
time.sleep(5)
if name != 'sms':
self.wait_for_element((By.XPATH, self.export_form_case_data_button.format(name)), 200)
self.js_click((By.XPATH, self.export_form_case_data_button.format(name)))
time.sleep(10)
self.date_filter()
if flag == None:
self.send_keys(self.users_field, UserData.web_user)
Expand Down Expand Up @@ -258,7 +261,7 @@ def add_form_exports(self):


def form_exports(self, name):
self.prepare_and_download_export(name)
self.prepare_and_download_export(name=name)
self.find_data_by_id_and_verify('form.womans_name', 'formid', UserData.form_export_name,
self.woman_form_name_HQ
)
Expand Down Expand Up @@ -290,23 +293,23 @@ def add_case_exports(self):
return UserData.case_export_name

def case_exports(self, name):
self.wait_and_sleep_to_click(self.export_case_data_link)
self.prepare_and_download_export(name)
print(name)
self.prepare_and_download_export(name=name, flag=None)
self.find_data_by_id_and_verify('name', 'caseid', UserData.case_export_name, self.woman_case_name_HQ)

# Test Case 21 - Export SMS Messages

def sms_exports(self):
self.wait_and_sleep_to_click(self.export_sms_link)
self.prepare_and_download_export(flag="no")
self.prepare_and_download_export(name='sms', flag="no")
newest_file = latest_download_file()
print("Newest:", newest_file)
self.assert_downloaded_file(newest_file, "Messages")
print("SMS Export successful")

def create_dse_and_download(self, exported_file, type):
self.scroll_to_element(self.create_DSE_checkbox)
self.wait_to_click(self.create_DSE_checkbox)
self.js_click(self.create_DSE_checkbox)
time.sleep(5)
# saving export
self.scroll_to_bottom()
Expand All @@ -317,8 +320,7 @@ def create_dse_and_download(self, exported_file, type):
self.scroll_to_element((By.XPATH, self.update_data.format(exported_file)))
self.js_click((By.XPATH, self.update_data.format(exported_file)))
time.sleep(5)
self.wait_for_element((By.XPATH, self.update_data.format(exported_file)), 50)
self.scroll_to_element((By.XPATH, self.update_data.format(exported_file)))
self.wait_for_element((By.XPATH, self.update_data_conf.format(exported_file)), 50)
self.js_click((By.XPATH, self.update_data_conf.format(exported_file)))
self.wait_till_progress_completes("integration")
try:
Expand Down Expand Up @@ -670,25 +672,6 @@ def verify_duplicate_data_in_dashboard(self, link, username, password):
else:
print("No duplicate data present")

def add_case_exports(self):
self.wait_to_click(self.export_case_data_link)
self.delete_bulk_exports()
self.wait_and_sleep_to_click(self.add_export_button)
time.sleep(100)
self.is_visible_and_displayed(self.case_type, 200)
self.wait_for_element(self.case_type, 200)
self.select_by_text(self.case, UserData.case_reassign)
self.wait_to_click(self.add_export_conf)
self.wait_for_element(self.export_name, 200)
self.clear(self.export_name)
self.send_keys(self.export_name, UserData.case_export_name+Keys.TAB)
time.sleep(5)
self.scroll_to_bottom()
time.sleep(5)
self.js_click(self.export_settings_create)
print("Export created!!")
time.sleep(10)

def add_form_exports_reassign(self):
self.delete_bulk_exports()
self.wait_and_sleep_to_click(self.add_export_button)
Expand Down

0 comments on commit 14305a8

Please sign in to comment.