package cz.moneta.test.dsl.ib.payment.domestic;

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

import static cz.moneta.test.dsl.ib.payment.domestic.PaymentOrderConfirmationPage.FORM_DIV;

@Wait(value = FORM_DIV)
public interface PaymentOrderConfirmationPage extends IbPageFlow<PaymentOrderConfirmationPage>, MainMenu, AccountsAndTransactionsSubmenu {

    String LIST_PAYMENT_ORDERS_BUTTON = "//a[@class='smallSecondaryButton' and contains(text(), 'Přehled příkazů')]";
    String LIST_PAYMENT_ORDERS_MASS_PAYMENT_BUTTON = "//img[@alt='Přehled příkazů k úhradě']";
    String FORM_DIV = "//div[@id='x31809652']";
    String PAYMENT_OK_WINDOW = "//span[@class='ok']";

    @Click(LIST_PAYMENT_ORDERS_BUTTON)
    PaymentOrderConfirmationPage clickListPaymentOrders();

    @Click(LIST_PAYMENT_ORDERS_MASS_PAYMENT_BUTTON)
    PaymentOrderConfirmationPage clickListMassPaymentOrders();

    @Wait(explicitWaitSeconds = 15)
    @CheckElementPresent(value = PAYMENT_OK_WINDOW)
    PaymentOrderConfirmationPage checkPaymentOkWindow();
}