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

import cz.moneta.test.dsl.newib.NewIbPageFlow;
import cz.moneta.test.dsl.newib.components.HorizontalMainMenu;
import cz.moneta.test.dsl.newib.components.VerticalMainMenu;
import cz.moneta.test.dsl.newib.settings.payments.standingorders.StandingOrdersPage;
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.StandingOrderVictoryPage.*;

@Wait(value = {OVERVIEW_BUTTON_XPATH, NEXT_PAYMENT_BUTTON_XPATH}, waitSecondsForElement = 30)
public interface StandingOrderVictoryPage extends NewIbPageFlow<StandingOrderVictoryPage>, HorizontalMainMenu, VerticalMainMenu {

    String STANDING_ORDER_VICTORY_TITLE_PAGE_XPATH = "//h1[contains(., 'Trvalý příkaz byl přijat ke zpracování')]";
    String OVERVIEW_BUTTON_XPATH = "//button[text()='Přehled trvalých příkazů'][@data-testid='submit']";
    String NEXT_PAYMENT_BUTTON_XPATH = "//button[text()='Zadat další příkaz']";

    @CheckElementPresent(STANDING_ORDER_VICTORY_TITLE_PAGE_XPATH)
    StandingOrderVictoryPage checkStandingOrderVictoryText();

    @Click(OVERVIEW_BUTTON_XPATH)
    StandingOrdersPage clickOnStandingOrders();
}
