package cz.moneta.test.dsl.newib.settings.communication.contacts;

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.communication.contacts.CreateContactVictoryPage.*;

@Wait(value = {BACK_TO_CONTACTS_BTN_XPATH}, waitSecondsForElement = 30)
public interface CreateContactVictoryPage extends NewIbPageFlow<CreateContactVictoryPage> {

    String NEW_CONTACT_VICTORY_TITLE_XPATH = "//h4[@class='t-title t-title--h4'][text()='Kontakt byl uložen']";
    String BACK_TO_CONTACTS_BTN_XPATH = "//button[@data-testid='submit'][text()='Zpět na kontakty']";
    String EDIT_CONTACT_VICTORY_TITLE_XPATH = "//h4[@class='t-title t-title--h4'][text()='Kontakt byl upraven']";

    @CheckElementPresent(NEW_CONTACT_VICTORY_TITLE_XPATH)
    CreateContactVictoryPage checkVictoryScreenIsPresent();

    @Click(BACK_TO_CONTACTS_BTN_XPATH)
    ContactsPage clickOnBackToContacts();

    @CheckElementPresent(EDIT_CONTACT_VICTORY_TITLE_XPATH)
    CreateContactVictoryPage checkEditVictoryScreenIsPresent();
}