package cz.moneta.test.dsl.mobile.smartbanking.accounts;

import cz.moneta.test.dsl.mobile.smartbanking.SbViewFlow;
import cz.moneta.test.dsl.mobile.smartbanking.payment.PaymentView;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.mobile.android.AndroidClick;
import cz.moneta.test.harness.support.mobile.android.AndroidWait;
import cz.moneta.test.harness.support.mobile.MobileLookup;
import cz.moneta.test.harness.support.mobile.ios.IosClick;
import cz.moneta.test.harness.support.mobile.ios.IosWait;

import static cz.moneta.test.dsl.mobile.smartbanking.accounts.AccountSelectionView.HORIZONTAL_MENU;
import static cz.moneta.test.dsl.mobile.smartbanking.accounts.AccountSelectionView.IOS_PAY_BUTTON;

@AndroidWait(value = HORIZONTAL_MENU, by = MobileLookup.XPATH)
@IosWait(IOS_PAY_BUTTON)
public interface AccountSelectionView extends SbViewFlow<AccountSelectionView>, StoreAccessor {
    String HORIZONTAL_MENU = "//android.widget.LinearLayout[contains(@resource-id, 'id/transaction_list_parent_horizontal_menu')]";
    String PAY_BUTTON = HORIZONTAL_MENU + "//android.widget.TextView[@text='Zaplatit']";

    String IOS_PAY_BUTTON = "Zaplatit";

    @IosClick(IOS_PAY_BUTTON)
    @AndroidClick(value = PAY_BUTTON, by = MobileLookup.XPATH)
    PaymentView payment();
}