package cz.moneta.test.dsl.ib.accountsandtransactions.directdebitorder;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.harness.support.web.CheckElementContent;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.ib.accountsandtransactions.directdebitorder.DirectDebitAuthorizePage.SMS_CODE_IPUT;

@Wait(value = SMS_CODE_IPUT)
public interface DirectDebitAuthorizePage extends IbPageFlow<DirectDebitCreatePage> {
    String SIPO_PAYMENT_AUTHORIZATION_OVERVIEW = "//a[@id='sendBtn']";
    String SMS_CODE_IPUT = "//input[@id='SMSCode']";
    String DIRECT_DEBIT_LIMIT_PRESENCE = "//table[@id='helpNav']";

    @TypeInto(SMS_CODE_IPUT)
    DirectDebitAuthorizePage typeSmsCode(String smsCode);

    @Click(SIPO_PAYMENT_AUTHORIZATION_OVERVIEW)
    DirectDebitConfirmationPage clickSign();

    @CheckElementContent(DIRECT_DEBIT_LIMIT_PRESENCE)
    DirectDebitAuthorizePage checkDirectDebitLimitPresence(String insurance);
}
