package cz.moneta.test.dsl.newib.investments;

import cz.moneta.test.dsl.newib.NewIbPageFlow;
import cz.moneta.test.dsl.newib.mainpage.InvestmentsPage;
import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.Wait;

import static cz.moneta.test.dsl.newib.investments.InvestmentsPurchaseVictory.FINISH;

@Wait(value = FINISH, waitSecondsForElement = 60)
public interface InvestmentsPurchaseVictory extends NewIbPageFlow<InvestmentsPurchaseVictory> {
    String FINISH = "//h1[contains(text(),'A je to. Investujete')]";
    String BACK_TO_FUND_LIST_BUTTON = "//button[@data-testid='backToFundList']";

    @Click(BACK_TO_FUND_LIST_BUTTON)
    InvestmentsPage backToFundList();

    @Wait(value = FINISH, waitSecondsForElement = 60)
    InvestmentsPurchaseVictory waitForVictory();
}