package cz.moneta.test.dsl.ib.settings.ib.ediponents.deactivate;

import cz.moneta.test.dsl.ib.IbPageFlow;
import cz.moneta.test.dsl.ib.components.MainMenu;
import cz.moneta.test.dsl.ib.settings.ib.SettingsVerticalMenu;
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.ib.settings.ib.ediponents.deactivate.CheckDeactivateDisponentPage.CHECK_DEACTIVATE_DISPONENT_TITLE;
import static cz.moneta.test.dsl.ib.settings.ib.ediponents.deactivate.CheckDeactivateDisponentPage.DEACTIVATE_DISPONENT_STEP_2;

@Wait({CHECK_DEACTIVATE_DISPONENT_TITLE, DEACTIVATE_DISPONENT_STEP_2})
public interface CheckDeactivateDisponentPage extends IbPageFlow<CheckDeactivateDisponentPage>, MainMenu, SettingsVerticalMenu {
    String CHECK_DEACTIVATE_DISPONENT_TITLE = "//img[@alt='Deativace disponenta']";
    String DEACTIVATE_DISPONENT_STEP_2 = "//img[@src='images_new/top_step2.gif']";
    String NEW_DISPONENT_STATUS = "//td[contains(text(),'Nový stav disponenta')]/following-sibling::td[contains(text(),'Neaktivní')]";
    String DEACTIVATE_SIGN_BUTTON = "//a[@id='sendBtn' and contains(text(),'PODEPSAT')]";

    @CheckElementPresent(NEW_DISPONENT_STATUS)
    @Click(DEACTIVATE_SIGN_BUTTON)
    ConfirmDeactivateDisponentPage checkDeactiveStatusAndSign();
}
