package cz.moneta.test.dsl.ufo.banka.pages.products.sme;

import cz.moneta.test.dsl.ufo.banka.pages.cards.credit.OPN008_S001_SignContractPage;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.ufo.banka.pages.products.sme.KUL018_S001_SmeAutomatesRequests.KUL018_S001_PAGE_ID_XPATH;
import static cz.moneta.test.dsl.ufo.operations.shared.SharedElements.LOAD_IMG_DIV_CLASS;

@Wait(value = KUL018_S001_PAGE_ID_XPATH, waitSecondsForElement = 40, by = Lookup.XPATH)
public interface KUL018_S001_SmeAutomatesRequests extends WebFlow<KUL018_S001_SmeAutomatesRequests> {
    String KUL018_S001_PAGE_ID_XPATH = "//div[contains(text(),'KUL018_S001')]";
    String SME_CONFIRMATION_BUTTON = "KUL018_S001_B011";
    String FIRST_APPLICATION_RADIO = "KUL018_S001_G002-0";
    String CONTRACT_PRINT = "KUL018_S001_B013";
    String SIGN_CONTRACT = "KUL018_S001_B015";

    @Click(SME_CONFIRMATION_BUTTON)
    KUL018_S001_SmeAutomatesRequests confirmSME();

    @Click(value = FIRST_APPLICATION_RADIO, andWait = @Wait(value = LOAD_IMG_DIV_CLASS, by = Lookup.CLASSNAME, until = Until.GONE))
    KUL018_S001_SmeAutomatesRequests selectFirstApplication();

    @Click(CONTRACT_PRINT)
    KUL012_S001_RequestedDocumentsPage clickPrintContract();

    @Click(SIGN_CONTRACT)
    OPN008_S001_SignContractPage clickSignContract();
}
