optin

package
v0.0.0-...-9474aff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package optin provides set of util functions used to control ARC provisioning.

Index

Constants

View Source
const (
	// OptinTimeout is the maximum amount of time that Optin is expected to take.
	OptinTimeout = 5 * time.Minute

	// PlayStoreCloseTimeout is the timeout value waiting for Play Store window to show up
	// and then close it after optin.
	PlayStoreCloseTimeout = 1 * time.Minute
)

Variables

This section is empty.

Functions

func ClosePlayStore

func ClosePlayStore(ctx context.Context, tconn *chrome.TestConn) error

ClosePlayStore closes the Play Store app.

func DumpLogCat

func DumpLogCat(ctx context.Context, filesuffix string) error

DumpLogCat saves logcat to test output directory.

func EnsureNoPlayStoreError

func EnsureNoPlayStoreError(ctx context.Context, cr *chrome.Chrome) error

EnsureNoPlayStoreError ensures that the Play Store window doesn't display an error.

func FindOptInExtensionPageAndAcceptTerms

func FindOptInExtensionPageAndAcceptTerms(ctx context.Context, cr *chrome.Chrome, maxAttempts int, wait bool) error

FindOptInExtensionPageAndAcceptTerms finds the opt-in extension page, optins if verified, and optionally waits for completion.

func GetPlayStoreState

func GetPlayStoreState(ctx context.Context, tconn *chrome.TestConn) (map[string]bool, error)

GetPlayStoreState is a wrapper for chrome.autotestPrivate.getPlayStoreState.

func LaunchAndWaitForPlayStore

func LaunchAndWaitForPlayStore(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, timeout time.Duration) error

LaunchAndWaitForPlayStore launches Play Store and ensures that it doesn't display an error.

func Perform

func Perform(ctx context.Context, cr *chrome.Chrome, tconn *chrome.TestConn) error

Perform steps through opt-in flow and waits for it to complete.

func PerformAndClose

func PerformAndClose(ctx context.Context, cr *chrome.Chrome, tconn *chrome.TestConn) error

PerformAndClose performs opt-in with retries, and then closes the play store window.

func PerformWithRetry

func PerformWithRetry(ctx context.Context, cr *chrome.Chrome, maxAttempts int) error

PerformWithRetry steps through opt-in flow, waits for it to complete, and re-attempts in case of failure.

func SetPlayStoreEnabled

func SetPlayStoreEnabled(ctx context.Context, tconn *chrome.TestConn, enabled bool) error

SetPlayStoreEnabled is a wrapper for chrome.autotestPrivate.setPlayStoreEnabled.

func WaitForPlayStoreReady

func WaitForPlayStoreReady(ctx context.Context, tconn *chrome.TestConn) error

WaitForPlayStoreReady waits for Play Store app to be ready.

func WaitForPlayStoreShown

func WaitForPlayStoreShown(ctx context.Context, tconn *chrome.TestConn, timeout time.Duration) error

WaitForPlayStoreShown waits for Play Store window to be shown.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL