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

import cz.moneta.test.harness.support.web.CheckElementPresent;
import cz.moneta.test.harness.support.web.StoreElementContent;
import cz.moneta.test.harness.support.web.WebFlow;

public interface PaymentEngineSearchTransactionFiles extends WebFlow<PaymentEngineSearchTransactionFiles> {

    String TRANSACTION_CHANNEL_NAME_XPATH = "//td[@class='x-grid3-col x-grid3-cell x-grid3-td-3 ']//*[contains(text(),'%s')]";
    String TRANSACTION_FILE_NAME_KEY = "TRANSACTION_FILE_NAME_KEY";
    String TRANSACTION_FILE_NAME_XPATH = TRANSACTION_CHANNEL_NAME_XPATH + "/../preceding-sibling::td[@class='x-grid3-col x-grid3-cell x-grid3-td-2 ']";

    @StoreElementContent(storeKey = TRANSACTION_FILE_NAME_KEY, value = TRANSACTION_FILE_NAME_XPATH, isStringDynamicXpath = true)
    PaymentEngineSearchTransactionFiles storeTransactionFileName(String channelName);

    @CheckElementPresent(value = TRANSACTION_CHANNEL_NAME_XPATH, isStringDynamicXpath = true)
    PaymentEngineSearchTransactionFiles checkTransactionChannelName(String channelName);
}
