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

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.activate.CheckActivateDisponentPage.ACTIVATE_DISPONENT_STEP_2;
import static cz.moneta.test.dsl.ib.settings.ib.ediponents.activate.CheckActivateDisponentPage.CHECK_ACTIVATE_DISPONENT_TITLE;

@Wait({CHECK_ACTIVATE_DISPONENT_TITLE, ACTIVATE_DISPONENT_STEP_2})
public interface CheckActivateDisponentPage extends IbPageFlow<CheckActivateDisponentPage>, MainMenu, SettingsVerticalMenu {
    String CHECK_ACTIVATE_DISPONENT_TITLE = "//img[@alt='Aktivace disponenta']";
    String ACTIVATE_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(),'Aktivní')]";
    String DEACTIVATE_SIGN_BUTTON = "//a[@id='sendBtn' and contains(text(),'PODEPSAT')]";

    @CheckElementPresent(NEW_DISPONENT_STATUS)
    @Click(DEACTIVATE_SIGN_BUTTON)
    ConfirmActivateDisponentPage checkActiveStatusAndSign();
}
