package cz.moneta.test.dsl.salesforce.pages.opportunities;

import cz.moneta.test.dsl.salesforce.components.PageHeader;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

import static cz.moneta.test.dsl.salesforce.pages.opportunities.NewOpportunityConfirmationPage.CONFIRMATION_PAGE_TITLE;
import static cz.moneta.test.dsl.salesforce.pages.opportunities.NewOpportunityConfirmationPage.FINISH_BUTTON;

@Wait(value = {CONFIRMATION_PAGE_TITLE, FINISH_BUTTON}, until = Until.VISIBLE)
public interface NewOpportunityConfirmationPage extends WebFlow<NewOpportunityConfirmationPage>, PageHeader, StoreAccessor {
    String CONFIRMATION_PAGE_TITLE = "//div/font[contains(text(),'Založili jsme pro Vás příležitost.')]";
    String FINISH_BUTTON = "//td[contains(@class,'pbButtonb')]/input[@value='Dokončit']"; //Tlacitko v zapati

    NewOpportunityConfirmationPage onOpportunityConfirmationPage();

    @Click(FINISH_BUTTON)
    OpportunityDetailPage clickFinishButton();

}
