package cz.moneta.test.dsl.ib.cards.application.contract;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.dsl.ib.cards.CardsVerticalMenu;
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.cards.application.contract.ReviewContractPage.PAGE_NAME;

@Wait(PAGE_NAME)
public interface ReviewContractPage extends IbPageFlow<ReviewContractPage>, CardsVerticalMenu {
    String PAGE_NAME = "//*[@id=\"agreementSign_2_9\"]/tbody/tr/td/table[1]/tbody/tr/td[text()='Parametry kreditní karty dle Vaší žádosti']";
    String SIGN_BUTTON = "//img[@id='sendBtn']";
    String SMS_CODE_INPUT = "//input[@id='SMSCode']";

    @TypeInto(SMS_CODE_INPUT)
    ReviewContractPage typeSmsCode(String smsCode);

    @Click("//input[@type='checkbox' and @name='prvaP']")
    ReviewContractPage clickConfirm();

    @Click(SIGN_BUTTON)
    SignatureConfirmationPage signContractAndContinueToConfirmationPage();
}
