package cz.moneta.test.dsl.hypos.pages.structure;

import cz.moneta.test.dsl.hypos.components.StructureMenu;
import cz.moneta.test.dsl.hypos.pages.HyposPageFlow;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.CheckElementPresent;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.hypos.pages.structure.StructurePktuPage.FILTER_DATE_FROM;

@Wait(FILTER_DATE_FROM)
public interface StructurePktuPage extends HyposPageFlow<StructurePktuPage>, StructureMenu, StoreAccessor {
    String TRANSACTIONS = "//table//tbody//td/a[contains(@href,'?cmd=pktu_detail')]";
    String SEARCH_BUTTON = "//input[@name='sbmt']";
    String FILTER_DATE_FROM = "//input[@id='filterDateFrom']";

    @Click(SEARCH_BUTTON)
    StructurePktuPage clickSearchButton();

    @TypeInto(value = FILTER_DATE_FROM, clear = true)
    StructurePktuPage fillFilterDateFrom(String date);

    @CheckElementPresent(TRANSACTIONS)
    StructurePktuPage checkTransactions();
}