package cz.moneta.test.dsl.payment_engine.parts_of_menu.menu_transaction;

import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

public interface PaymentEngineOutgoingArchivEdit extends WebFlow<PaymentEngineOutgoingArchivEdit> {

    String REQUEST_FOR_CANCELLATION = "//input[following-sibling::label[text() = 'Žádost o storno (banka)']]";
    String OK_BUTTON = "//button[text() = 'OK']";

    @Wait(value = REQUEST_FOR_CANCELLATION, until = Until.VISIBLE)
    @Click(value = REQUEST_FOR_CANCELLATION, andWait = @Wait(value = OK_BUTTON, until = Until.CLICKABLE))
    PaymentEngineOutgoingArchivEdit clickOnRequestForCancellation();

    @Click(value = OK_BUTTON, andWait = @Wait(value = OK_BUTTON, until = Until.GONE))
    PaymentEngineOutgoingArchivEdit clickOk();
}