package cz.moneta.test.dsl.newib.payments;

import cz.moneta.test.dsl.newib.NewIbPageFlow;
import cz.moneta.test.dsl.newib.accounts.CurrentAccountPage;
import cz.moneta.test.dsl.newib.components.HorizontalMainMenu;
import cz.moneta.test.dsl.newib.components.VerticalMainMenu;
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.newib.payments.NewForeignPaymentVictoryPage.TRANSACTION_OVERVIEW_BUTTON_XPATH;

@Wait(value = {TRANSACTION_OVERVIEW_BUTTON_XPATH}, waitSecondsForElement = 30)
public interface NewForeignPaymentVictoryPage extends NewIbPageFlow<NewForeignPaymentVictoryPage>, HorizontalMainMenu, VerticalMainMenu {

    String FOREIGN_PAYMENT_VICTORY_TITLE_PAGE_XPATH = "//h1[@class='t-title t-title--h3' and normalize-space(.)='Platba byla odeslána']";
    String TRANSACTION_OVERVIEW_BUTTON_XPATH = "//button[@data-testid='submit']";

    @Click(TRANSACTION_OVERVIEW_BUTTON_XPATH)
    CurrentAccountPage clickOnTransactionOverview();

    @CheckElementPresent(FOREIGN_PAYMENT_VICTORY_TITLE_PAGE_XPATH)
    NewForeignPaymentVictoryPage checkForeignPaymentVictoryText();
}
