package cz.moneta.test.dsl.hypos.pages.hypokalkulacka;

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

import static cz.moneta.test.dsl.hypos.pages.hypokalkulacka.HypokalkulackaHouseholdPage.SAVE_HOUSEHOLD_BUTTON;

@Wait(value = SAVE_HOUSEHOLD_BUTTON, until = Until.VISIBLE)
public interface HypokalkulackaHouseholdPage extends HyposPageFlow<HypokalkulackaHouseholdPage> {
    String HOUSEHOLD_INPUT_DIV = "//div[@id='household-input']";
    String HOUSEHOLD_INCOME_INPUT = HOUSEHOLD_INPUT_DIV + "//input[@id='household-income']";
    String HOUSEHOLD_WITHOUT_INCOME_INPUT = HOUSEHOLD_INPUT_DIV + "//input[@id='household-without-income']";

    String SAVE_HOUSEHOLD_BUTTON = HOUSEHOLD_INPUT_DIV + "//input[@value='Uložit']";

    @TypeInto(HOUSEHOLD_INCOME_INPUT)
    HypokalkulackaHouseholdPage fillHouseholdwithIncome(int withIncome);

    @TypeInto(HOUSEHOLD_WITHOUT_INCOME_INPUT)
    HypokalkulackaHouseholdPage fillHouseholdWithoutIncome(int withoutIncome);

    @Click(SAVE_HOUSEHOLD_BUTTON)
    HypokalkulackaPage clickSaveExpenditureButton();
}
