package cz.moneta.test.dsl.ib.loans.flexicredit.contract;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.dsl.ib.loans.flexicredit.FlexicreditApplicationPage;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.ib.loans.flexicredit.contract.FlexicreditReadContractInformation.AGREE_AND_CONTINUE;
import static cz.moneta.test.dsl.ib.loans.flexicredit.contract.FlexicreditReadContractInformation.PRE_CONTRACT_HEADER_TEXT;
import static cz.moneta.test.dsl.ib.loans.flexicredit.contract.FlexicreditReadContractInformation.CONTRACT_IS_READ_BUTTON;

@Wait({PRE_CONTRACT_HEADER_TEXT, CONTRACT_IS_READ_BUTTON, AGREE_AND_CONTINUE})
public interface FlexicreditReadContractInformation extends IbPageFlow<FlexicreditReadContractInformation>, FlexicreditApplicationPage {

    String PRE_CONTRACT_HEADER_TEXT = "//span[text() = 'Předsmluvní informace']";
    String CONTRACT_IS_READ_BUTTON = "//span[text() = 'Přečteno']//parent::button";
    String AGREE_AND_CONTINUE = "//span[text() = 'Souhlasím a pokračovat']//parent::button";

    @Click(AGREE_AND_CONTINUE)
    FlexicreditPreparedToSignPage contractIsReadAndAgree();
}
