def gift_receipt_from_transaction(): general_functions.errorhandling("ABORT") general_functions.start_of_test_case('print gift receipt from transaction') # make test receipt and get it to print it as a gift receipt get_receipt_for_gift_receipt( general_functions.make_test_receipts(l_test_settings[0], l_test_settings[1])) wait(10) # select all transaction items general_buttons.gift_receipt_key_pad_btns_click('SELECT ALL') # print gift receipt sleep(2) general_buttons.gift_receipt_key_pad_btns_click('PRINT') # general end of test case general_functions.end_of_test_case()
def returns_with_receipt_and_exchange(): general_functions.start_of_test_case('returns with receipt and exchange') receipt_number = general_functions.make_test_receipts( l_test_settings[0], l_test_settings[1]) print('receipt_number: ' + receipt_number) general_functions.extended_wait('main_page_key_pad', 30) returns_with_receipt_return_items(receipt_number) # click SEARCH ITEM button general_buttons.main_page_key_pad_btns_click('ITEM SEARCH') # move to next line on search form type(Key.ENTER) # article number type(l_test_settings[0]) # click SEARCH button # article_search_form_en_GB.png" general_buttons.click_element('article_search_form', 300, 40, 'search btn') # add product(s) z = 0 print('number of products: ' + str(l_test_settings[1])) while z < l_test_settings[1] - 2: general_buttons.click_element('add_or_substract_product', 100, 0, 'PLUS btn') z += 1 print('z: ' + str(z)) general_buttons.main_page_key_pad_btns_click('TOTAL') general_functions.extended_wait('four_eyes_form', 60) # In case of italy there is no 4 eyes if l_general_test_settings[13] != 'IT': general_functions.four_eyes(l_general_test_settings[4], l_general_test_settings[5]) general_functions.extended_wait('payment_page_key_pad', 60) general_functions.pay_transaction_with_multiple_tenders( [['DINERS', 'REST']]) general_functions.end_of_test_case()
def gift_receipt_from_line_items(): general_functions.errorhandling("ABORT") general_functions.start_of_test_case('print gift receipt from line item') # make test receipt and get it to print it as a gift receipt get_receipt_for_gift_receipt( general_functions.make_test_receipts(l_test_settings[0], l_test_settings[1])) wait(10) # TEST CASE if is_gui_test == 'YES': gui_screens.check_gui_element('print_gift_receipt') # select 2 items Location(254, 214).click() Location(241, 346).click() # print gift receipt general_buttons.gift_receipt_key_pad_btns_click('PRINT') # general end of test case general_functions.end_of_test_case()
def returns_with_receipt(): general_functions.start_of_test_case('returns with receipt line items') receipt_number = general_functions.make_test_receipts( l_test_settings[0], l_test_settings[1]) print('receipt_number: ' + receipt_number) general_functions.extended_wait('main_page_key_pad', 30) returns_with_receipt_return_items(receipt_number) if l_general_test_settings[13] != 'IT': general_buttons.main_page_key_pad_btns_click('TOTAL') general_functions.extended_wait('four_eyes_form', 60) general_functions.four_eyes(l_general_test_settings[4], l_general_test_settings[5]) general_functions.extended_wait('payment_page_key_pad', 30) general_functions.pay_transaction_with_multiple_tenders( [['CHINA UNION PAY', 'REST']]) general_functions.end_of_test_case()
def issue_tax_form_after_sale_any_tender(): ##y = l_test_settings[0] general_functions.errorhandling("ABORT") general_functions.start_of_test_case('Issue tax form on AFTER sale with ' + str('receipt number ...')) # create a receipt with_number to retrieve for after sales tax free form test case #is ok now# receipt_number = general_functions.make_test_receipts( l_test_aftersales_settings[0], l_test_aftersales_settings[1]) #is ok now# print('receipt_number: ' + receipt_number) #is ok now# general_functions.extended_wait('main_page_key_pad', 30) # # select the Customer button to go to Issue tax form button #is ok now# wait(1) general_buttons.main_page_footer_menu_btns_click('CUSTOMER') # # select the Issue tax form button wait(0.1) #is ok now# general_buttons.main_page_customer_menu_btns_click_taxfree( 'ISSUE TAX FREE') #is ok now# wait(2) type(l_general_test_settings[1]) # store type(Key.ENTER) type(Key.ENTER) # date is today type(l_general_test_settings[7]) # till type(Key.ENTER) print(str(receipt_number)) type(str(receipt_number)) # receipt# type(Key.ENTER) # confirm receipt wait(5) # # select the OK button to show the Issue tax form pop-up confirmation #is ok now# click(Location(900, 700)) # # select the OK button to show the Issue tax form #is ok now# click(Location(810, 584)) wait(1) general_functions.extended_wait('TFF', 30) # # # 'Verify steps after this point ', 'are ok now.' #is ok now# # general_functions.show_value__msg('Tax free form requested', 'Global Blue form pulled up to be ready') # wait(0.5) #review 1st# # # mandatory field1: select a country # # click area click(Location(200, 510)) type('1') type(Key.DOWN) type(Key.ENTER) # # mandatory field2: select a tender # # click area click(Location(660, 250)) type('4') type(Key.DOWN) type(Key.ENTER) # # Enter at least mandatory fields: country and tender # # 'Verify steps after this point ', 'are ok now.' #general_functions.show_value__msg('Verify steps after this point ', 'are ok now.') # # select the Yes button to submit the Issue tax form wait(1) type(Key.ALT + 'y') ##wait(16) wait(6) # general end of test case general_functions.end_of_test_case()