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

import cz.moneta.test.dsl.newib.NewIbPageFlow;
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.settings.payments.templates.TemplatesVictoryPage.*;

@Wait(value = {TEMPLATE_CREATED_TITLE_XPATH, BACK_TO_LIST_BTN_XPATH}, waitSecondsForElement = 30)
public interface TemplatesVictoryPage extends NewIbPageFlow<TemplatesVictoryPage> {

    String TEMPLATE_CREATED_TITLE_XPATH = "//h2[@class='t-title t-title--h3'][text()='Šablona je vytvořená']";
    String BACK_TO_LIST_BTN_XPATH = "//button[@data-testid='back-to-list-button']";

    @CheckElementPresent(TEMPLATE_CREATED_TITLE_XPATH)
    TemplatesVictoryPage checkTemplateCreatedVictoryTitle();

    @Click(BACK_TO_LIST_BTN_XPATH)
    TemplatesPage clickOnBackToList();
}
