package cz.moneta.test.dsl.ufo.cb.landing.proposal.pages;

import cz.moneta.test.harness.support.web.*;

@Wait(value = {KOM424_S001_TransactionDescriptionPage.DESCRIPTION_AREA, KOM424_S001_TransactionDescriptionPage.NEXT_PAGE_BUTTON}, until = Until.VISIBLE)
public interface KOM424_S001_TransactionDescriptionPage extends WebFlow<KOM424_S001_TransactionDescriptionPage> {
    String DESCRIPTION_AREA = "KOM424_S001_M009";
    String FINANCIAL_RESOURCES_AREA = "KOM424_S001_M003";
    String DONE_BUTTON = "KOM424_S001_H002_1";
    String SAVE_BUTTON = "KOM424_S001_B001";
    String LOAN_PURPOSE = "KOM424_S001_C003";
    String CHECKED_DONE_BUTTON = "//input[@name='KOM424_S001_H002' and @value='1']";
    String NEXT_PAGE_BUTTON = "KOM424_S001_S001";

    @Click(value = DONE_BUTTON, andWait = @Wait(value = CHECKED_DONE_BUTTON, by = Lookup.XPATH))
    KOM424_S001_TransactionDescriptionPage clickDoneButton();

    @Click(value = SAVE_BUTTON, andWait = @Wait(explicitWaitSeconds = 1))
    KOM424_S001_TransactionDescriptionPage clickSaveButton();

    @TypeInto(value = DESCRIPTION_AREA, clear = true)
    KOM424_S001_TransactionDescriptionPage fillDescription(String description);

    @TypeInto(value = FINANCIAL_RESOURCES_AREA, clear = true)
    KOM424_S001_TransactionDescriptionPage fillFinancialResources(String description);

    @Select(value = LOAN_PURPOSE)
    KOM424_S001_TransactionDescriptionPage selectLoanPurpose(String purpose);

    @Click(NEXT_PAGE_BUTTON)
    KOM425_S001_BasicCompanyInformation clickNextPage();
}
