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

import cz.moneta.test.dsl.newib.NewIbPageFlow;
import cz.moneta.test.dsl.newib.components.VerticalMainMenu;
import cz.moneta.test.harness.support.web.Lookup;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.Wait;

@Wait(value = CardsOnboardingFinalPage.CARDS_ONBOARDING_CONTRACT_XPATH, by = Lookup.XPATH, waitSecondsForElement = 60)
public interface CardsOnboardingFinalPage extends NewIbPageFlow<CardsOnboardingFinalPage>, VerticalMainMenu {
    String CARDS_ONBOARDING_CONTRACT_XPATH = "//h1[@class='t-title t-title--h4 u-mb--xxLarge'][text()='Debetní karta Standard']";
    String PLASTIC_CARD_ONBOARDED_TEXT_XPATH = "//span[text()='Hotovo! Plastová karta už je na cestě k Vám.']";
    String VIRTUAL_CARD_ONBOARDED_TEXT_XPATH = "//span[text()='Hotovo! S virtuální kartou můžete okamžitě platit']";

    @Wait(value = PLASTIC_CARD_ONBOARDED_TEXT_XPATH, until = Until.VISIBLE, by = Lookup.XPATH, waitSecondsForElement = 50)
    CardsOnboardingFinalPage waitForConfirmationOfPlasticOnboarding();

    @Wait(value = VIRTUAL_CARD_ONBOARDED_TEXT_XPATH, until = Until.VISIBLE, by = Lookup.XPATH, waitSecondsForElement = 50)
    CardsOnboardingFinalPage waitForConfirmationOfVirtualOnboarding();
}
