package cz.moneta.test.dsl.ufo.banka.pages.cards.credit;

import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Lookup;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

import static cz.moneta.test.dsl.ufo.banka.pages.cards.credit.NEP002_ProofOfIncomeModal.MODAL_DIV;

@Wait(MODAL_DIV)
public interface NEP002_ProofOfIncomeModal extends WebFlow<NEP002_ProofOfIncomeModal>, StoreAccessor {
    String MODAL_DIV = "NEP002_S001_FB001";
    String FIRST_CHECKBOX_INPUT = "NEP002_S001_G001-0";
    String SECOND_CHECKBOX_INPUT = "NEP002_S001_G001-1";
    String THIRD_CHECKBOX_INPUT = "NEP002_S001_G001-2";
    String FOURTH_CHECKBOX_INPUT = "NEP002_S001_G001-3";
    String FIFTH_CHEXBOX_INPUT = "NEP002_S001_G001-4";
    String SIXTH_CHEXBOX_INPUT = "NEP002_S001_G001-5";
    String SUSPICIOUS_CHECKBOX_XPATH = "//td[contains(text(), 'Potvrzení o příjmu je vyplněno podezřele.')]";
    String CONTINUE_BUTTON = "NEP002_S001_B010";

    @Click(FIRST_CHECKBOX_INPUT)
    @Click(SECOND_CHECKBOX_INPUT)
    @Click(THIRD_CHECKBOX_INPUT)
    @Click(FOURTH_CHECKBOX_INPUT)
    @Click(FIFTH_CHEXBOX_INPUT)
    @Click(SIXTH_CHEXBOX_INPUT)
    @Click(value = SUSPICIOUS_CHECKBOX_XPATH, by = Lookup.XPATH)
    @Click(value = CONTINUE_BUTTON, andWait = @Wait(value = MODAL_DIV, until = Until.GONE))
    NEP002_CreditCardApplicantInformationPage checkValidCheckboxesAndContinue();

}
