Documentation
¶
Overview ¶
Package conference contains conference CUJ utilities and conference room instances.
Index ¶
- Constants
- func CheckSignedOutError(ctx context.Context, tconn *chrome.TestConn, err error) error
- func IsParticipantError(err error) bool
- func ParticipantError(err error) error
- func Run(ctx context.Context, cr *chrome.Chrome, conf Conference, prepare Prepare, ...) (retErr error)
- type Cleanup
- type Conference
- type GoogleMeetConference
- func (conf *GoogleMeetConference) BackgroundChange(ctx context.Context) error
- func (conf *GoogleMeetConference) DisplayAllParticipantsTime() time.Duration
- func (conf *GoogleMeetConference) End(ctx context.Context) error
- func (conf *GoogleMeetConference) Join(ctx context.Context, room string, toBlur bool) error
- func (conf *GoogleMeetConference) LostNetworkCount() int
- func (conf *GoogleMeetConference) Presenting(ctx context.Context, application googleApplication) (err error)
- func (conf *GoogleMeetConference) SetBrowser(br *browser.Browser)
- func (conf *GoogleMeetConference) SetLayoutMax(ctx context.Context) error
- func (conf *GoogleMeetConference) SetLayoutMin(ctx context.Context) error
- func (conf *GoogleMeetConference) SwitchTabs(ctx context.Context) error
- func (conf *GoogleMeetConference) TypingInChat(ctx context.Context) error
- func (conf *GoogleMeetConference) VideoAudioControl(ctx context.Context) error
- type GoogleMeetConfig
- type Prepare
- type ZoomConference
- func (conf *ZoomConference) BackgroundChange(ctx context.Context) error
- func (conf *ZoomConference) DisplayAllParticipantsTime() time.Duration
- func (conf *ZoomConference) End(ctx context.Context) error
- func (conf *ZoomConference) Join(ctx context.Context, room string, toBlur bool) error
- func (conf *ZoomConference) LostNetworkCount() int
- func (conf *ZoomConference) Presenting(ctx context.Context, application googleApplication) (err error)
- func (conf *ZoomConference) SetBrowser(br *browser.Browser)
- func (conf *ZoomConference) SetLayoutMax(ctx context.Context) error
- func (conf *ZoomConference) SetLayoutMin(ctx context.Context) error
- func (conf *ZoomConference) SwitchTabs(ctx context.Context) error
- func (conf *ZoomConference) TypingInChat(ctx context.Context) error
- func (conf *ZoomConference) VideoAudioControl(ctx context.Context) error
Constants ¶
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 ¶
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 ¶
IsParticipantError returns true if the given error contains participant error specific information.
func ParticipantError ¶
ParticipantError wraps the given error with participant error specific information which can be used to identify the error type with IsParticipantError() function.
Types ¶
type Conference ¶
type Conference interface { Join(ctx context.Context, room string, toBlur bool) error SetLayoutMax(ctx context.Context) error SetLayoutMin(ctx context.Context) error SwitchTabs(ctx context.Context) error VideoAudioControl(ctx context.Context) error TypingInChat(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) LostNetworkCount() int DisplayAllParticipantsTime() time.Duration }
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, kb *input.KeyboardEventWriter, 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) DisplayAllParticipantsTime ¶
func (conf *GoogleMeetConference) DisplayAllParticipantsTime() time.Duration
DisplayAllParticipantsTime returns the loading time for displaying all participants.
func (*GoogleMeetConference) End ¶
func (conf *GoogleMeetConference) End(ctx context.Context) error
End ends the conference.
func (*GoogleMeetConference) LostNetworkCount ¶
func (conf *GoogleMeetConference) LostNetworkCount() int
LostNetworkCount returns the count of lost network connections.
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) SetLayoutMax ¶
func (conf *GoogleMeetConference) SetLayoutMax(ctx context.Context) error
SetLayoutMax sets the conference UI layout to max tiled grid.
func (*GoogleMeetConference) SetLayoutMin ¶
func (conf *GoogleMeetConference) SetLayoutMin(ctx context.Context) error
SetLayoutMin sets the conference UI layout to minimal tiled grid.
func (*GoogleMeetConference) SwitchTabs ¶
func (conf *GoogleMeetConference) SwitchTabs(ctx context.Context) error
SwitchTabs switches the chrome tabs.
func (*GoogleMeetConference) TypingInChat ¶
func (conf *GoogleMeetConference) TypingInChat(ctx context.Context) error
TypingInChat opens chat window and type.
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 ZoomConference ¶
type ZoomConference struct {
// contains filtered or unexported fields
}
ZoomConference implements the Conference interface.
func NewZoomConference ¶
func NewZoomConference(cr *chrome.Chrome, tconn *chrome.TestConn, kb *input.KeyboardEventWriter, 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) DisplayAllParticipantsTime ¶
func (conf *ZoomConference) DisplayAllParticipantsTime() time.Duration
DisplayAllParticipantsTime returns the loading time for displaying all participants.
func (*ZoomConference) End ¶
func (conf *ZoomConference) End(ctx context.Context) error
End ends the conference.
func (*ZoomConference) LostNetworkCount ¶
func (conf *ZoomConference) LostNetworkCount() int
LostNetworkCount returns the count of lost network connections.
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) SetLayoutMax ¶
func (conf *ZoomConference) SetLayoutMax(ctx context.Context) error
SetLayoutMax sets the conference UI layout to max tiled grid.
func (*ZoomConference) SetLayoutMin ¶
func (conf *ZoomConference) SetLayoutMin(ctx context.Context) error
SetLayoutMin sets the conference UI layout to minimal tiled grid.
func (*ZoomConference) SwitchTabs ¶
func (conf *ZoomConference) SwitchTabs(ctx context.Context) error
SwitchTabs switches the chrome tabs.
func (*ZoomConference) TypingInChat ¶
func (conf *ZoomConference) TypingInChat(ctx context.Context) error
TypingInChat opens chat window and type.
func (*ZoomConference) VideoAudioControl ¶
func (conf *ZoomConference) VideoAudioControl(ctx context.Context) error
VideoAudioControl controls the video and audio during conference.