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

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

import static cz.moneta.test.dsl.ib.loan.ProductSelectorPage.PAGE_BUTTONS_VISIBILITY;

@Wait(PAGE_BUTTONS_VISIBILITY)
public interface ProductSelectorPage extends IbPageFlow<ProductSelectorPage> {
    String EXPRESS_BUTTON_ID = "express-button";
    String FLEXI_BUTTON_ID = "flexi-button";
    String CREDIT_CARD_BUTTON_ID = "creditCard-button";
    String PAGE_BUTTONS_VISIBILITY = "//button[@data-test-id='" + EXPRESS_BUTTON_ID + "' or @data-test-id='" + FLEXI_BUTTON_ID + "' or @data-test-id='" + CREDIT_CARD_BUTTON_ID + "']";
    String FLEXI_BUTTON = "//button[@data-test-id='" + FLEXI_BUTTON_ID + "']";

    @Click(FLEXI_BUTTON)
    ProductSelectorPage clickFlexiButton();

}
