conference

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

Documentation

Overview

Package conference contains conference CUJ utilities and conference room instances.

Index

Constants

View Source
const (
	// NoRoom means not joining google meet when running the test.
	NoRoom = 0
	// TwoRoomSize creates a conference room with 2 participants.
	TwoRoomSize = 2
	// SmallRoomSize creates a conference room with 5 participants.
	SmallRoomSize = 5
	// LargeRoomSize creates a conference room with 16 participants.
	LargeRoomSize = 16
	// ClassRoomSize creates a conference room with 38 participants.
	ClassRoomSize = 38
)

Variables

This section is empty.

Functions

func CheckSignedOutError

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

CheckSignedOutError check whether the account is signed out or not. If the acount is signed out, wraps the given error with signed out error specific information. If any other error happens or there is no signed out message, the original error will be returned.

func IsParticipantError

func IsParticipantError(err error) bool

IsParticipantError returns true if the given error contains participant error specific information.

func ParticipantError

func ParticipantError(err error) error

ParticipantError wraps the given error with participant error specific information which can be used to identify the error type with IsParticipantError() function.

func Run

func Run(ctx context.Context, cr *chrome.Chrome, conf Conference, prepare Prepare, tier, outDir string, tabletMode, isLacros bool, roomSize int) (retErr error)

Run runs the specified user scenario in conference room with different CUJ tiers.

Types

type Cleanup

type Cleanup func(context.Context) error

Cleanup releases the resources which the case used.

type Conference

type Conference interface {
	Join(ctx context.Context, room string, toBlur bool) error
	VideoAudioControl(ctx context.Context) error
	SwitchTabs(ctx context.Context) error
	ChangeLayout(ctx context.Context) error
	BackgroundChange(ctx context.Context) error
	Presenting(ctx context.Context, application googleApplication) error
	End(ctx context.Context) error
	SetBrowser(br *browser.Browser)
}

Conference contains user's operation when enter a confernece room.

type GoogleMeetConference

type GoogleMeetConference struct {
	// contains filtered or unexported fields
}

GoogleMeetConference implements the Conference interface.

func NewGoogleMeetConference

func NewGoogleMeetConference(cr *chrome.Chrome, tconn *chrome.TestConn, uiHandler cuj.UIActionHandler,
	tabletMode, extendedDisplay, isLacros bool, roomSize int, account, password, outDir string) *GoogleMeetConference

NewGoogleMeetConference creates Google Meet conference room instance which implements Conference interface.

func (*GoogleMeetConference) BackgroundChange

func (conf *GoogleMeetConference) BackgroundChange(ctx context.Context) error

BackgroundChange will sequentially change the background to blur, sky picture and turn off background effects.

func (*GoogleMeetConference) ChangeLayout

func (conf *GoogleMeetConference) ChangeLayout(ctx context.Context) error

ChangeLayout changes the conference UI layout.

func (*GoogleMeetConference) End

func (conf *GoogleMeetConference) End(ctx context.Context) error

End ends the conference.

func (*GoogleMeetConference) Join

func (conf *GoogleMeetConference) Join(ctx context.Context, room string, toBlur bool) error

Join joins a new conference room.

func (*GoogleMeetConference) Presenting

func (conf *GoogleMeetConference) Presenting(ctx context.Context, application googleApplication) (err error)

Presenting creates Google Slides and Google Docs, shares screen and presents the specified application to the conference.

func (*GoogleMeetConference) SetBrowser

func (conf *GoogleMeetConference) SetBrowser(br *browser.Browser)

SetBrowser sets browser to chrome or lacros.

func (*GoogleMeetConference) SwitchTabs

func (conf *GoogleMeetConference) SwitchTabs(ctx context.Context) error

SwitchTabs switches the chrome tabs.

func (*GoogleMeetConference) VideoAudioControl

func (conf *GoogleMeetConference) VideoAudioControl(ctx context.Context) error

VideoAudioControl controls the video and audio during conference.

type GoogleMeetConfig

type GoogleMeetConfig struct {
	Account       string
	Password      string
	URLs          []string
	RetryTimeout  time.Duration
	RetryInterval time.Duration
}

GoogleMeetConfig defines input params and retry settings for Google meet testing.

func GetGoogleMeetConfig

func GetGoogleMeetConfig(ctx context.Context, s *testing.ServiceState, roomSize int) (GoogleMeetConfig, error)

GetGoogleMeetConfig returns an object that contains the Google meet configuration.

type Prepare

type Prepare func(context.Context) (string, Cleanup, error)

Prepare prepares conference room link before testing.

type ZoomConference

type ZoomConference struct {
	// contains filtered or unexported fields
}

ZoomConference implements the Conference interface.

func NewZoomConference

func NewZoomConference(cr *chrome.Chrome, tconn *chrome.TestConn, uiHandler cuj.UIActionHandler, tabletMode bool,
	roomSize int, account, outDir string) *ZoomConference

NewZoomConference creates Zoom conference room instance which implements Conference interface.

func (*ZoomConference) BackgroundChange

func (conf *ZoomConference) BackgroundChange(ctx context.Context) error

BackgroundChange changes the background to patterned background and reset to none.

Zoom doesn't have background blur option for web version so changing background is used to fullfil the requirement.

func (*ZoomConference) ChangeLayout

func (conf *ZoomConference) ChangeLayout(ctx context.Context) error

ChangeLayout changes the conference UI layout.

func (*ZoomConference) End

func (conf *ZoomConference) End(ctx context.Context) error

End ends the conference.

func (*ZoomConference) Join

func (conf *ZoomConference) Join(ctx context.Context, room string, toBlur bool) error

Join joins a new conference room.

func (*ZoomConference) Presenting

func (conf *ZoomConference) Presenting(ctx context.Context, application googleApplication) (err error)

Presenting creates Google Slides and Google Docs, shares screen and presents the specified application to the conference.

func (*ZoomConference) SetBrowser

func (conf *ZoomConference) SetBrowser(br *browser.Browser)

SetBrowser sets browser to chrome or lacros.

func (*ZoomConference) SwitchTabs

func (conf *ZoomConference) SwitchTabs(ctx context.Context) error

SwitchTabs switches the chrome tabs.

func (*ZoomConference) VideoAudioControl

func (conf *ZoomConference) VideoAudioControl(ctx context.Context) error

VideoAudioControl controls the video and audio during conference.

Jump to

Keyboard shortcuts

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