package cz.moneta.test.harness.support.mobile.share;

import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.mobile.ios.IosTypeInto;
import cz.moneta.test.harness.support.web.Builder;

/**
 * This ss the marker interface of mobile flow builder proxies.
 * <p/>
 * The builders are usually accessed via {@code harness.withSB()} or similar method where the proxy
 * is instantiated by calling the respective
 * {@link Builders#newMobileFlowBuilder(Class, MobileEndpoint, StoreAccessor)} method.
 * <p/>
 * An example mobile flow builder may look as follows:
 * <pre>{@code
 * @literal @AndroidWait(value = PIN_INPUT, waitSecondsForElement = 60)
 * @literal @IosWait(value = PIN_INPUT, waitSecondsForElement = 60)
 *  public interface LandingView extends SbViewFlow<LandingView> {
 *
 *      String PIN_INPUT = "eu.inloop.gemoney.tst1:id/edit_pin_value";
 *      String PIN_SUBMIT_BUTTON = "eu.inloop.gemoney.tst1:id/btn_pin_submit";
 *      String PAYMENT_BUTTON_XPATH = "//android.widget.TextView[contains(@text, 'Payment')]";
 *
 *      String IOS_PIN_INPUT = "PIN_TEXT";
 *      String IOS_PIN_SUBMIT_BUTTON = "PIN_BUTTON";
 *      String IOS_PAYMENT_BUTTON = "Zaplatit"
 *
 *     @literal @AndroidTypeInto(PIN_INPUT)
 *     @literal @IosTypeInto(IOS_PIN_INPUT)
 *     @literal @AndroidClick(PIN_SUBMIT_BUTTON)
 *     @literal @IosClick(IOS_PIN_SUBMIT_BUTTON)
 *      BalanceView enterPinAndContinue(String pin);
 *
 *     @literal @AndroidClick(value = PAYMENT_BUTTON_XPATH, by = MobileLookup.XPATH)
 *     @literal @IosClick(value = IOS_PAYMENT_BUTTON)
 *      AccountSelectionView tapPayment();
 *  }
 * }</pre>
 * Please note that if the return type of the method is a different MobileFlow builder, a new proxy is instantiated
 * based on the return type
 * <p/>
 * And the usage would be as follows:
 * <pre>{@code
 *  harness.withSB()
 *      .onLandingPage()
 *      .enterPinAndContinue(PIN)
 *      .then(withSb.enableAdvancedFeatures())
 *      .restartApp()
 *      ...
 * }</pre>
 *
 * @see cz.moneta.test.harness.support.mobile.android.AndroidWait
 * @see cz.moneta.test.harness.support.mobile.android.AndroidClick
 * @see cz.moneta.test.harness.support.mobile.android.AndroidScroll
 * @see cz.moneta.test.harness.support.mobile.android.AndroidTypeInto
 *
 * @see cz.moneta.test.harness.support.mobile.ios.IosWait
 * @see cz.moneta.test.harness.support.mobile.ios.IosClick
 * @see cz.moneta.test.harness.support.mobile.ios.IosScroll
 * @see IosTypeInto
 *
 */
public interface MobileFlow<A extends MobileFlow> extends Builder {

}
