Exemplo n.º 1
0
def pick_up():
    general_functions.errorhandling("ABORT")
    general_functions.start_of_test_case('pick up')
    l_general_test_settings = test_settings.general_test_settings()

    general_buttons.main_page_footer_menu_btns_click('OTHER')

    general_buttons.main_page_other_menu_btns_click('PICK UP')

    general_functions.four_eyes(l_general_test_settings[4],
                                l_general_test_settings[5])

    time.sleep(6)
    for x in range(0, l_general_test_settings[9]):
        time.sleep(0.5)

        number_of_items = l_test_settings

        type(str(number_of_items[x]))
        time.sleep(0.5)
        type(Key.ENTER)
        time.sleep(0.5)
        general_functions.writeTestResults("def pick up", "GUI", "data",
                                           str(x), "",
                                           "number of denominations", "", "")
        x += 1

    general_buttons.pick_up_page_click('TAKE OVER')

    type(Key.ENTER)

    general_functions.close_drawer_msg()
Exemplo n.º 2
0
def item_not_found_tc_0010(test_case_description):
    l_general_test_settings = test_settings.general_test_settings()
    print("l_general_test_settings 1: " + l_general_test_settings[8])

    picture = 'main_screen_complete_' + locale + '.png'

    if exists(Pattern(picture).similar(0.85)):
        test_result = "OK"
        reg = find(Pattern(picture).similar(0.85))
    else:
        test_result = "NOK"
        reg = ""

    print("test result for function: " + test_result)
    general_functions.writeTestResults(test_case_description, "GUI", "home_page_TC_0010_002", test_result, "", "main page", reg, picture)
Exemplo n.º 3
0
def custom():
    general_functions.errorhandling("ABORT")
    general_functions.start_of_test_case('item not found all divisions')

    l_general_test_settings = test_settings.general_test_settings()
    locale = l_general_test_settings[8]
    brand = l_general_test_settings[6]
    transactions = test_settings.custom(locale)

    # test_cases.item_not_found_tc_0010("does the main screen look OK?")

    time.sleep(5)

    for transaction in transactions:
        general_buttons.main_page_items_gv_menu_btns_click('ITEM NOT FOUND')

        division = transaction[0]

        print('division: ' + division)

        general_buttons.main_page_items_gv_menu_item_not_found_btns_click(
            division)

        type(transaction[1])

        type(Key.ENTER)

        type(transaction[2])

        type(Key.ENTER)

        # click the TOTAL button
        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', 60)

        general_functions.pay_transaction_with_multiple_tenders(transaction[3])

        general_functions.extended_wait('main_page_key_pad', 60)

    # general end of test case
    general_functions.end_of_test_case()
Exemplo n.º 4
0
def cancel_receipt():
    general_functions.errorhandling("ABORT")
    l_test_settings = test_settings.void_tender_type_settings(locale)
    l_general_test_settings = test_settings.general_test_settings()

    x = 0
    while x < len(l_test_settings):
        y = l_test_settings[x]
        print("y: " + str(y))

        general_functions.fill_basket(y[0], y[1])

        if y[5]== 1:  # cancel before the total button is clicked
            general_buttons.click_element('secondary_pages_key_pad', 190, -100, 'CANCEL btn')
        else:
            # click TOTAL button
            general_buttons.click_element('secondary_pages_key_pad', 100, 100, 'TOTAL btn')
			receipt_meta_data_array = general_functions.get_receipt_meta_data()			
            general_buttons.click_element('secondary_pages_key_pad_after_TOTAL', 190, -100,
                                          'CANCEL TRANSACTION btn')

        general_functions.four_eyes(l_general_test_settings[4], l_general_test_settings[5])

        test_cases.errors_and_warnings_tc_0030("does the cancellation warning pop up")

        # confirm cancelation
        type(Key.ENTER)

        # use all cancelation reasons

        y_coordinaat = (160 + (x * 50)) * -1
        print("y_coordinaat: " + str(y_coordinaat))
        general_buttons.click_element('cancelation_reasons', 0, y_coordinaat, 'CANCEL REASON btn')

        # confirm reason
        type(Key.ENTER)

        x = x + 1
        print("x: " + str(x))
        if x == 3:
             break
Exemplo n.º 5
0
def basic_sale_off_line_card():
    general_functions.errorhandling("ABORT")

    l_general_test_settings = test_settings.general_test_settings()
    locale = l_general_test_settings[8]
    l_test_settings = test_settings.global_blue_transactions(locale)

    general_functions.errorhandling("ABORT")
    general_functions.start_of_test_case('basic sale paid with ' + y[2])

    wait(1)

    general_functions.fill_basket(y[0], y[1])

    general_buttons.main_page_key_pad_btns_click('TOTAL')

    general_buttons.payment_page_other_menu_btns_click('ISSUE TAX FREE')

    type(Key.ENTER)

    general_functions.extended_wait('payment_page_key_pad', 30)
    general_functions.pay_transaction_with_multiple_tenders([y[2], 'REST']])
Exemplo n.º 6
0
from sikuli import *
import general_functions
import general_buttons
import test_cases
import test_settings
import time
import gui_screens

global l_general_test_settings
l_general_test_settings = test_settings.general_test_settings()
global brand
brand = l_general_test_settings[6]
global locale
locale = l_general_test_settings[8]
global l_base_dir
l_base_dir = l_general_test_settings[10]
global is_gui_test
is_gui_test = l_general_test_settings[11]
global country
country = l_general_test_settings[13]
global l_test_settings
l_test_settings = test_settings.remove_promotion(locale)


def remove():
    general_functions.errorhandling("ABORT")
    general_functions.start_of_test_case('remove promotion')

    general_functions.fill_basket(l_test_settings[0], l_test_settings[1])
    wait(5)