package cz.moneta.test.dsl.ufo.operations.ufoOperations;

import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.ufo.UfoEndpoint;
import cz.moneta.test.harness.support.web.*;

@Wait(value = HUS701_S001_WarningPage.WARNING_SENTENCE, until = Until.VISIBLE)
public interface HUS701_S001_WarningPage extends WebFlow<HUS701_S001_WarningPage>, StoreAccessor {

    String WARNING_SENTENCE = "HUS701_S001_L002";

    @CheckElementContent(WARNING_SENTENCE)
    HUS701_S001_WarningPage checkWarningSentence(String sentence);

    @CustomAction
    default UKO720_S001_TaskPage closeWarningPageWindow() {
        UfoEndpoint endpoint = getEndpoint(UfoEndpoint.class);
        endpoint.closeCurrentWindow();
        endpoint.switchToOtherWindow(3,1);
        return null;
    }
}
