package cz.moneta.test.dsl.ib.loans.expressloan.signLoan;

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

import static cz.moneta.test.dsl.ib.loans.expressloan.signLoan.IbPreContractExpressLoanPage.PRE_CONTRACT_TEXT;

@Wait(PRE_CONTRACT_TEXT)
public interface IbPreContractExpressLoanPage extends IbPageFlow<IbPreContractExpressLoanPage> {
    String PRE_CONTRACT_TEXT = "//td[text() ='Předsmluvní informace']";
    String ACCEPT_CHECKBOX = "//input[@id = 'accept']";
    String CONTINUE_BUTTON = "continueButton";

    @Wait(ACCEPT_CHECKBOX)
    @Click(value = ACCEPT_CHECKBOX, jsClick = true)
    @Click(value = CONTINUE_BUTTON, by = Lookup.ID, jsClick = true)
    IbSignExpressLoanPage acceptAndContinue();
}