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

import cz.moneta.test.dsl.newib.NewIbPageFlow;
import cz.moneta.test.dsl.newib.mainpage.DashboardPage;
import cz.moneta.test.harness.support.web.CheckElementPresent;
import cz.moneta.test.harness.support.web.Click;

public interface NewPaymentSummarySwitchToStandardPage extends NewIbPageFlow<NewPaymentSummarySwitchToStandardPage>{
    String TITLE_XPATH = "//h1[contains(normalize-space(.), 'Platbu odešleme jako standardní')]";
    String INFO_XPATH = "//p[@data-testid='TextComponent' and contains(normalize-space(.), 'Z technických důvodů odešleme vaši platbu jako standardní')]";
    String DECLINE_BUTTON_XPATH = "//button[@data-testid='decline-btn']";
    String CONFIRM_BUTTON_XPATH = "//button[@data-testid='confirm-btn']";

    @CheckElementPresent(TITLE_XPATH)
    NewPaymentSummarySwitchToStandardPage checkPaymentSwithToStandardTitle();

    @CheckElementPresent(INFO_XPATH)
    NewPaymentSummarySwitchToStandardPage checkPaymentSwithToStandardText();

    @Click(DECLINE_BUTTON_XPATH)
    DashboardPage clickCancelPayment();

    @Click(CONFIRM_BUTTON_XPATH)
    DashboardPage confirmStandardPayment();
}