package cz.moneta.test.dsl.newib.settings.envelopes;

import cz.moneta.test.dsl.newib.NewIbPageFlow;
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.newib.settings.envelopes.EditEnvelopeVictoryPage.BACK_TO_ENVELOPES_BTN_XPATH;
import static cz.moneta.test.dsl.newib.settings.envelopes.EditEnvelopeVictoryPage.NEW_ENVELOPE_VICTORY_TITLE_XPATH;

@Wait(value = {NEW_ENVELOPE_VICTORY_TITLE_XPATH, BACK_TO_ENVELOPES_BTN_XPATH}, waitSecondsForElement = 10)
public interface EditEnvelopeVictoryPage extends NewIbPageFlow<EditEnvelopeVictoryPage> {

    String NEW_ENVELOPE_VICTORY_TITLE_XPATH = "//h4[@class='t-title t-title--h4'][text()='Obálka byla upravena']";
    String BACK_TO_ENVELOPES_BTN_XPATH = "//button[@data-testid='submit'][text()='Zpět na seznam obálek']";

    @CheckElementPresent(NEW_ENVELOPE_VICTORY_TITLE_XPATH)
    EditEnvelopeVictoryPage checkEditVictoryScreenIsPresent();

    @Click(BACK_TO_ENVELOPES_BTN_XPATH)
    EnvelopesPage clickOnBackToEnvelopes();
}