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

import cz.moneta.test.dsl.ufo.operations.recorder.panels.*;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.ufo.UfoEndpoint;
import cz.moneta.test.harness.support.web.*;

public interface CRC710_S001_RecorderMainPage extends WebFlow<CRC710_S001_RecorderMainPage>, StoreAccessor, CRC710_S001_SubjectRecorderPanel,
        CRC710_S001_SelectedWritingsRecorderPanel, CRC710_S001_SolutionRecorderPanel, CRC710_S001_RequirementsRecorderPanel, CRC710_S001_WritingsToCrcPanel, CRC710_S001_DetailOfRequestRecorderPanel {

    String LOAD_IMG_XPATH = "//div[@class='popupContent']";
    String GENERAL_TREE_ITEM_XPATH = "//span[contains(text(),'%s')]";

    @CustomAction
    default CRC710_S001_RecorderMainPageTransitions closeRecorderWindow() {
        UfoEndpoint endpoint = getEndpoint(UfoEndpoint.class);
        endpoint.closePopup(5);
        return null;
    }
}