package cz.moneta.test.dsl.hypos.pages.contract.loan;

import cz.moneta.test.dsl.hypos.pages.HyposPageFlow;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.hypos.pages.contract.loan.NewDrawPage.PAGE_TITLE;
import static cz.moneta.test.dsl.hypos.pages.contract.loan.NewDrawPage.SAVE_BUTTON;

@Wait({PAGE_TITLE, SAVE_BUTTON})
public interface NewDrawPage extends HyposPageFlow<NewDrawPage> {
    String PAGE_TITLE = "//h1[text()='Nové čerpání']";
    String NEW_DRAW_FORM = "//form[@id='nove-cerpani']";
    String ADD_NEW_DRAW_LINK = NEW_DRAW_FORM + "//a[text()='přidat']";
    String SAVE_BUTTON = NEW_DRAW_FORM + "//button[text()='Uložit']";

    @Click(ADD_NEW_DRAW_LINK)
    NewDrawPage clickAddNewDraw();

    @Click(SAVE_BUTTON)
    LoanPage clickSaveButton();
}