def test_cc_retail_customer_information_download(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Bob Retail') # Search certificates by customer number retail_search_actions.retail_search_pick_search_field('customer number', 'cust_9') # Execute retail search retail_search_actions.actions.click(''search') # Click the second certificate in the first row of search results retail_search_actions.click_search_result_certificate(1, 2) # Storing the current newest PDF file in the downloads directory file = retail_search_actions.check_for_newest_pdf_in_download_directory() # Clicks the 'Download' button on the 'Customer Information' modal retail_search_actions.click_certificate_download_button() # Check for the newest PDF file in the downloads directory retail_search_actions.check_for_newest_pdf_in_download_directory() # Checking that a new file has been added to the downloads directory retail_search_actions.verify_new_file_download(file)
def test_cc_retail_search_sort_certificates(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Bob Retail') # Search certificates by customer number retail_search_actions.retail_search_pick_search_field('email', '*****@*****.**') # Execute a blank retail search retail_search_actions.actions.click(''search') # Sort search results by customer number retail_search_actions.retail_search_sort_results('certs') # Compare results retail_search.audits.compare_results('retail_expected', 'retail_search_sort_certificates')
def test_cc_retail_search_sort_customer_number(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Joe Retail') # Search certificates by customer number retail_search_actions.retail_search_pick_search_field('state', 'Alaska') # Execute a blank retail search retail_search_actions.actions.click(''search') # Sort search results by customer number retail_search_actions.retail_search_sort_results('number') # Compare results retail_search.audits.compare_results('retail_expected', 'retail_search_sort_customer_number')
def test_cc_retail_click_customer(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Bob Retail') # Search certificates by customer number customer = 'cust_1' retail_search_actions.retail_search_pick_search_field('customer number', customer) # Execute a blank retail search retail_search_actions.actions.click(''search') # Click on the first row of search results retail_search_actions.click_search_result_row(1) # Verify that the customer information modal for searched customer was opened retail_search_actions.verify_click_customer(customer)
def test_cc_retail_customer_information_edit(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Bob Retail') # Search certificates by customer number retail_search_actions.retail_search_pick_search_field('customer number', 'cust_9') # Execute retail search retail_search_actions.actions.click(''search') # Click on the first row of search results retail_search_actions.click_search_result_row(1) # Click the customer edit button retail_search_actions.click_customer_edit_button() # Verify that the 'Edit Customer' modal appears retail_search_actions.verify_customer_edit_modal()
def test_cc_retail_exemption_search_by_certificate_id(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Nick') #general.actions.change_company('034Motorsport') #general.actions.change_client('034Motorsport, Inc.') # Navigate to Retail general.go_to_retail_page() # Search certificates by certificate id retail_search_actions.retail_search_pick_search_field('customer number', 28) # Execute retail search retail_search_actions.actions.click(''search') # Verify search results retail_search.audits.compare_results('retail_expected', 'retail_search_cert_id')
def test_cc_retail_customer_information_x_button(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Bob Retail') # Search certificates by customer number retail_search_actions.retail_search_pick_search_field('customer number', 'cust_1') # Execute retail search retail_search_actions.actions.click(''search') # Click on the first row of search results retail_search_actions.click_search_result_row(1) # Click the 'X' on the customer details modal retail_search_actions.click_customer_details_modal_close() # Verify that modal was closed retail_search_actions.verify_customer_details_modal_close()
def test_cc_retail_customer_information_print(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Bob Retail') # Search certificates by customer number retail_search_actions.retail_search_pick_search_field('customer number', 'cust_9') # Execute retail search retail_search_actions.actions.click(''search') # Click on the first row of search results retail_search_actions.click_search_result_row(1) # Storing current window handles [Should only be 1] window = self.driver.window_handles # Click the certificate download button retail_search_actions.click_certificate_print_button() # Verify that pressing the download button opened a new window retail_search_actions.verify_certificate_print_window(window)
def test_cc_retail_clear_screen_button(self): # Open CertCapture capture_login_actions.capture_open_portal() # Login to CertCapture capture_login_actions.cc_login_from_google_sheet('Bob Retail') # Execute a blank retail search retail_search_actions.actions.click(''search') # Storing search result count for a blank search count = retail_search_actions.retail_search_count() # Open search modal again retail_search_actions.open_search_modal() # Search certificates by email retail_search_actions.retail_search_pick_search_field('customer name', 'Johnny Test') retail_search_actions.retail_search_pick_search_field('phone', '1234567890') retail_search_actions.retail_search_pick_search_field('email', '*****@*****.**') retail_search_actions.retail_search_pick_search_field('city', 'Townsville') retail_search_actions.retail_search_pick_search_field('state', 'California') retail_search_actions.retail_search_pick_search_field('zip', '90210') retail_search_actions.retail_search_pick_search_field('customer number', '1886') retail_search_actions.retail_search_pick_search_field('id', 'doc_id') retail_search_actions.retail_search_pick_search_field('exposure zone', 'New York') # Click 'Clear Screen' button retail_search_actions.click_clear_screen_button() time.sleep(2) # Execute a blank retail search retail_search_actions.actions.click(''search') assert count == retail_search_actions.retail_search_count()