sharedfolders

package
v0.0.0-...-9474aff Latest Latest
Warning

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

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

Documentation

Overview

Package sharedfolders provides support for sharing folders with Crostini.

Index

Constants

View Source
const (
	ManageLinuxSharing     = "Manage Linux sharing"
	ShareWithLinux         = `Share with Linux`
	DialogName             = "Share folder with Linux"
	MountPath              = "/mnt/chromeos"
	MountFolderMyFiles     = "MyFiles"
	MountPathMyFiles       = MountPath + "/" + MountFolderMyFiles
	MountFolderGoogleDrive = "GoogleDrive"
	MountPathGoogleDrive   = MountPath + "/" + MountFolderGoogleDrive
	MountFolderMyDrive     = "MyDrive"
	MountPathMyDrive       = MountPathGoogleDrive + "/" + MountFolderMyDrive
	MountPathDownloads     = MountPathMyFiles + "/" + filesapp.Downloads
	MountFolderPlay        = "PlayFiles"
	MountPathPlay          = MountPath + "/" + MountFolderPlay
)

Folder sharing strings.

View Source
const (
	MyFilesMsg      = "Give Linux apps permission to access files in the My files folder"
	DriveMsg        = "Give Linux apps permission to access files in your Google Drive. Changes will sync to your other devices."
	MyFiles         = "My files"
	SharedDownloads = MyFiles + " › " + filesapp.Downloads

	// SharedDrive represents the name for Drive on the Settings page.
	SharedDrive = filesapp.GoogleDrive + " › " + filesapp.MyDrive
)

Strings for sharing My files.

Variables

View Source
var ShareConfirmDialog = shareConfirmDialogStruct{
	Dialog:       shareConfirmDialog,
	Msg:          nodewith.Role(role.StaticText).Ancestor(shareConfirmDialog),
	OkButton:     nodewith.Name("OK").Role(role.Button).Ancestor(shareConfirmDialog),
	CancelButton: nodewith.Name("Cancel").Role(role.Button).Ancestor(shareConfirmDialog),
}

ShareConfirmDialog represents an instance of the confirm dialog of sharing folder.

View Source
var ShareToastNotification = shareToastNotificationStruct{
	Toast:        toastNode,
	Msg:          nodewith.Name("1 folder shared with Linux").Role(role.StaticText).Ancestor(toastNode),
	ManageButton: nodewith.Name("Manage").Role(role.Button),
}

ShareToastNotification represents an instance of the toast notification of sharing folder.

Functions

This section is empty.

Types

type SharedFolders

type SharedFolders struct {
	Folders map[string]struct{}
	// contains filtered or unexported fields
}

SharedFolders provides support for actions and records on shared folders.

func NewSharedFolders

func NewSharedFolders(tconn *chrome.TestConn) *SharedFolders

NewSharedFolders creates and returns a new Sharefolders instance.

func (*SharedFolders) AddFolder

func (sf *SharedFolders) AddFolder(folder string) uiauto.Action

AddFolder adds shared folders into the map.

func (*SharedFolders) CheckNoSharedFolders

func (sf *SharedFolders) CheckNoSharedFolders(cont *vm.Container, cr *chrome.Chrome) uiauto.Action

CheckNoSharedFolders checks there are no folders listed in the Managed shared folders page.

func (*SharedFolders) ShareDriveOK

func (sf *SharedFolders) ShareDriveOK(ctx context.Context, filesApp *filesapp.FilesApp) uiauto.Action

ShareDriveOK shares Google Drive with Crostini and clicks OK button on the confirmation dialog.

func (*SharedFolders) ShareMyFiles

func (sf *SharedFolders) ShareMyFiles(ctx context.Context, filesApp *filesapp.FilesApp) uiauto.Action

ShareMyFiles clicks "Share with Linux" on My files.

func (*SharedFolders) ShareMyFilesOK

func (sf *SharedFolders) ShareMyFilesOK(ctx context.Context, filesApp *filesapp.FilesApp) uiauto.Action

ShareMyFilesOK shares My files and clicks OK on the confirm dialog.

func (*SharedFolders) Unshare

func (sf *SharedFolders) Unshare(cr *chrome.Chrome, folders ...string) uiauto.Action

Unshare unshares folders from Linux.

func (*SharedFolders) UnshareAll

func (sf *SharedFolders) UnshareAll(cont *vm.Container, cr *chrome.Chrome) uiauto.Action

UnshareAll unshares all shared folders.

Jump to

Keyboard shortcuts

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