package cz.moneta.test.dsl.ib.authentication;

import cz.moneta.test.dsl.ib.IbPageFlow;
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.authentication.AuthMobileKeyPage.*;


@Wait({MOBILE_KEY_INPUT, MOBILE_KEY_CONFIRM_BUTTON, ENTER_KEY_TEXT})
public interface AuthMobileKeyPage extends IbPageFlow<AuthMobileKeyPage> {

    String MOBILE_KEY_INPUT = "//form[@id='mainFrm']//input[@type='text']";
    String MOBILE_KEY_CONFIRM_BUTTON = "//form[@id='mainFrm']//button[@type='submit']";
    String ENTER_KEY_TEXT = "//label[contains(text(), 'Zadejte mobilní klíč')]";

    @TypeInto(MOBILE_KEY_INPUT)
    AuthMobileKeyPage fillMobileKey(String mobileKey);

    @Click(MOBILE_KEY_CONFIRM_BUTTON)
    WelcomePageTransitions clickLogin();
}