package cz.moneta.test.dsl.ib.loans.flexicredit;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.dsl.ib.welcome.WelcomePage;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.ib.loans.flexicredit.FlexicreditFinalPage.SUCCESSFUL_REQUEST_TEST;

@Wait(SUCCESSFUL_REQUEST_TEST)
public interface FlexicreditFinalPage extends IbPageFlow<FlexicreditFinalPage>, FlexicreditApplicationPage {
    String SUCCESSFUL_REQUEST_TEST = "//span[text() = 'Váš kontokorent již máte k dispozici']";
    String BACK_BUTTON = "//span[text()='Zpět na přehled zůstatků']//parent::button";

    @Wait(BACK_BUTTON)
    @Click(value = BACK_BUTTON, jsClick = true)
    WelcomePage backToWelcomePage();
}
