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
- func AddAccount(ctx context.Context, tconn *chrome.TestConn, email, password string) error
- func AddAccountDialog() *nodewith.Finder
- func CheckARCToggleStatus(ctx context.Context, tconn *chrome.TestConn, brType browser.Type, ...) error
- func CheckARCToggleStatusAction(tconn *chrome.TestConn, brType browser.Type, expectedVal bool) action.Action
- func CheckIsAccountPresentInARCAction(tconn *chrome.TestConn, d *androidui.Device, accountName string, ...) action.Action
- func CheckOneGoogleBar(ctx context.Context, tconn *chrome.TestConn, br *browser.Browser, ...) error
- func GetChromeProfileWindow(ctx context.Context, tconn *chrome.TestConn, ...) (*nodewith.Finder, error)
- func OpenAccountManagerSettingsAction(tconn *chrome.TestConn, cr *chrome.Chrome) action.Action
- func OpenOneGoogleBar(ctx context.Context, tconn *chrome.TestConn, br *browser.Browser) error
- func RemoveAccountFromOSSettings(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, ...) error
- func TestCleanup(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, ...) error
- type FixtureData
Constants ¶
const DefaultUITimeout = 20 * time.Second
DefaultUITimeout is the default timeout for UI interactions.
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 ¶
AddAccount adds an account in-session. Account addition dialog should be already open.
func AddAccountDialog ¶
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 CheckARCToggleStatusAction ¶
func CheckARCToggleStatusAction(tconn *chrome.TestConn, brType browser.Type, expectedVal bool) action.Action
CheckARCToggleStatusAction returns an action that runs accountmanager.CheckARCToggleStatus.
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 ¶
OpenAccountManagerSettingsAction returns an action that opens OS Settings > Accounts.
func OpenOneGoogleBar ¶
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.