familylink

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: 22 Imported by: 0

Documentation

Overview

Package familylink is used for writing Family Link tests.

Package familylink provides Family Link user login functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEduSecondaryAccount

func AddEduSecondaryAccount(ctx context.Context, cr *chrome.Chrome, tconn *chrome.TestConn,
	parentUser, parentPass, secondUser, secondPass string,
	verifyEduSecondaryAddSuccess bool) error

AddEduSecondaryAccount opens the EDU Coexistence in-session flow and attempts to add a secondary account for a Family Link (FL) primary user. FL users can only have EDU secondary accounts. Trying to add other account types will fail. If `verifyEduSecondaryAddSuccess` is set to true - the account addition will be verified ("School account added" message in the dialog + confirming that new account was added in OS Settings). Precondition: The current logged in user must be FL (such as Geller or Unicorn).

func CreateUsageTimeLimitPolicy

func CreateUsageTimeLimitPolicy() *policy.UsageTimeLimit

CreateUsageTimeLimitPolicy returns the *policy.UsageTimeLimit with default settings. Its value needs to be overridden for test.

func InsertFieldVal

func InsertFieldVal(ctx context.Context, conn *chrome.Conn, selector, value string) error

InsertFieldVal directly sets the value of an input field using JS.

func NavigateEduCoexistenceFlow(ctx context.Context, cr *chrome.Chrome, tconn *chrome.TestConn,
	parentPass, secondUser, secondPass string) error

NavigateEduCoexistenceFlow goes through the EDU Coexistence in-session flow and attempts to add a secondary account for a Family Link (FL) primary user. FL users can only have EDU secondary accounts. Trying to add other account types will fail. Precondition: The current logged in user must be FL (such as Geller or Unicorn).

func NewFamilyLinkFixture

func NewFamilyLinkFixture(parentUser, parentPassword, childUser, childPassword string, isOwner bool, opts ...chrome.Option) testing.FixtureImpl

NewFamilyLinkFixture creates a new implementation of the Family Link fixture.

func VerifyUserSignedIntoBrowserAsChild

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

VerifyUserSignedIntoBrowserAsChild creates and opens the browser, then checks that the provided email is signed in and recognized as a child user.

Types

type FixtData

type FixtData struct {
	// Chrome is the running chrome instance.
	Chrome *chrome.Chrome

	// FakeDMS is the running DMS server if any.
	FakeDMS *fakedms.FakeDMS

	// TestConn is a connection to the test extension.
	TestConn *chrome.TestConn

	// PolicyUser is the user account used in the policy blob.
	PolicyUser string
}

FixtData holds information made available to tests that specify this Fixture.

Jump to

Keyboard shortcuts

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