package cz.moneta.test.dsl.ib.account.saving;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.dsl.ib.components.MainMenu;
import cz.moneta.test.dsl.ib.components.SavingMenu;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.ib.account.saving.NewSavingAccountCheckPage.PAGE_XPATH;
import static cz.moneta.test.dsl.ib.account.saving.NewSavingAccountCheckPage.SECOND_STEP_IN_PROGRESS_IMG;

@Wait({PAGE_XPATH, SECOND_STEP_IN_PROGRESS_IMG})
public interface NewSavingAccountCheckPage extends IbPageFlow<NewSavingAccountCheckPage>, MainMenu, SavingMenu {
    String PAGE_XPATH = "//img[@alt='Nový spoříci účet']";
    String SECOND_STEP_IN_PROGRESS_IMG = "//img[@src='images_new/top_step2.gif']";
    String MOBILE_KEY = "//input[@id='SMSCode']";
    String CONFIRM_BUTTON = "//a[@id='sendBtn']";

    @TypeInto(MOBILE_KEY)
    NewSavingAccountCheckPage fillInSmsKey(String smsKey);

    @Click(CONFIRM_BUTTON)
    OverviewOfSavingsAccounts clickToConfirmationButton();
}