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.StructureOpusPage.SPIN_LINK;

@Wait(SPIN_LINK)
public interface StructureOpusPage extends HyposPageFlow<StructureOpusPage>, StructureMenu, StoreAccessor {
    String CONTRACTS = "//table//tbody//td/a[contains(@href,'/')]";
    String SPIN_LINK = "//a[@id='ui-id-2']";
    String SPIN_ALLOWED_LINK = "//div[@id='section-otocka']//a[text()='Povolené']";

    @Click(SPIN_LINK)
    StructureOpusPage clickSpin();

    @Click(SPIN_ALLOWED_LINK)
    StructureOpusPage clickSpinAllowed();

    @CheckElementPresent(CONTRACTS)
    StructureOpusPage checkContracts();
}