accountmanager

package
v0.0.0-...-683b059 Latest Latest
Warning

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

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

Documentation

Overview

Package accountmanager provides common functionality for managing accounts on Chrome OS in-session e.g. adding an account in the system account addition dialog.

Index

Constants

View Source
const DefaultUITimeout = 20 * time.Second

DefaultUITimeout is the default timeout for UI interactions.

View Source
const LongUITimeout = time.Minute

LongUITimeout is for interaction with webpages to make sure that page is loaded.

Variables

This section is empty.

Functions

func AddAccount

func AddAccount(ctx context.Context, tconn *chrome.TestConn, email, password string) error

AddAccount adds an account in-session. Account addition dialog should be already open.

func AddAccountDialog

func AddAccountDialog() *nodewith.Finder

AddAccountDialog returns a root node of the system account addition dialog.

func CheckARCToggleStatus

func CheckARCToggleStatus(ctx context.Context, tconn *chrome.TestConn, brType browser.Type, expectedVal bool) error

CheckARCToggleStatus compares the state of the "ARC toggle" in the account addition flow with the expected value.

func CheckIsAccountPresentInARCAction

func CheckIsAccountPresentInARCAction(tconn *chrome.TestConn, d *androidui.Device, accountName string, expectedPresentInARC bool) action.Action

CheckIsAccountPresentInARCAction returns an action that checks whether account is present in ARC depending on expectedPresentInARC parameter.

func CheckOneGoogleBar

func CheckOneGoogleBar(ctx context.Context, tconn *chrome.TestConn, br *browser.Browser, condition uiauto.Action) error

CheckOneGoogleBar opens OGB and checks that provided condition is true.

func GetChromeProfileWindow

func GetChromeProfileWindow(ctx context.Context, tconn *chrome.TestConn, condition func(uiauto.NodeInfo) bool) (*nodewith.Finder, error)

GetChromeProfileWindow returns a nodewith.Finder to the Chrome window which matches the provided condition.

func OpenAccountManagerSettingsAction

func OpenAccountManagerSettingsAction(tconn *chrome.TestConn, cr *chrome.Chrome) action.Action

OpenAccountManagerSettingsAction returns an action that opens OS Settings > Accounts.

func OpenOneGoogleBar

func OpenOneGoogleBar(ctx context.Context, tconn *chrome.TestConn, br *browser.Browser) error

OpenOneGoogleBar opens google.com page in the browser and clicks on the One Google Bar.

func RemoveAccountFromOSSettings

func RemoveAccountFromOSSettings(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, brType browser.Type, email string) error

RemoveAccountFromOSSettings removes a secondary account with provided email from OS Settings.

func TestCleanup

func TestCleanup(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, brType browser.Type) error

TestCleanup removes all secondary accounts in-session. Should be called at the beginning of the test, so that results of the previous test don't interfere with the current test.

Types

type FixtureData

type FixtureData struct {
	ARC        *arc.ARC
	LacrosFixt lacrosfixt.FixtValue
	// contains filtered or unexported fields
}

FixtureData is the struct returned by the preconditions.

func (FixtureData) Chrome

func (f FixtureData) Chrome() *chrome.Chrome

Chrome gets the CrOS-chrome instance. Implement chrome.HasChrome and lacrosfixt.FixtValue interface.

func (FixtureData) TestAPIConn

func (f FixtureData) TestAPIConn() *chrome.TestConn

TestAPIConn gets the CrOS-chrome test connection. Implement lacrosfixt.FixtValue interface.

Jump to

Keyboard shortcuts

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