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.Wait;

import static cz.moneta.test.dsl.hypos.pages.structure.StructureDrawPostponedPage.SEARCH_BUTTON;

@Wait(SEARCH_BUTTON)
public interface StructureDrawPostponedPage extends HyposPageFlow<StructureDrawPostponedPage>, StructureMenu, StoreAccessor {
    String SEARCH_BUTTON = "//button[text()='Vyhledat']";
    String RESET_FILTER_BUTTON = "//button[@id='filter-reset']";
    String CONTRACTS = "//table//tbody//td/a[contains(@href,'/')]";

    @Click(value = SEARCH_BUTTON, andWait = @Wait(value = CONTRACTS, waitSecondsForElement = 60))
    StructureDrawPostponedPage clickSearchButton();

    @Click(RESET_FILTER_BUTTON)
    StructureDrawPostponedPage clickResetFilterButton();

    @CheckElementPresent(CONTRACTS)
    StructureDrawPostponedPage checkContracts();
}