package cz.moneta.test.dsl.monetaportal.savings.childbuildingsavings;

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

import static cz.moneta.test.dsl.monetaportal.savings.childbuildingsavings.PermanentAddressPage.LAND_REGISTRY_NUMBER_WITH_VALUE;
import static cz.moneta.test.dsl.monetaportal.savings.childbuildingsavings.PermanentAddressPage.PAGE_HEADER;

@Waits({@Wait(PAGE_HEADER), @Wait(LAND_REGISTRY_NUMBER_WITH_VALUE)})
public interface PermanentAddressPage extends ChildBuildingSavingsPageFlow<PermanentAddressPage> {
    String PAGE_HEADER = "//h2[text()='Trvalý pobyt dítěte' or text()='Dodatečné informace']";
    String LAND_REGISTRY_NUMBER_WITH_VALUE = "//*[(@id='permanentAddressForm.descriptiveNumber' and string-length(@value) > 0) or (@id='nationality_button' and string-length(@data-value) > 0)]";

    @Click(CONTINUE_BUTTON)
    AdditionalInformationPage clickContinue();

    AdditionalInformationPage onAdditionalInformation();

}
