notification

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

Documentation

Overview

Package notification contains utilities to help writing ARC notification tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ARCClient

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

ARCClient holds the resource that needed across ARC notification tast test steps.

func NewARCClient

func NewARCClient(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, outDir string) (cl *ARCClient, retErr error)

NewARCClient creates an ARCClient by installing the notification testing app, launch the app and initialize the UI Automator that needed for generating notifications.

func (*ARCClient) Close

func (t *ARCClient) Close(ctx context.Context, tconn *chrome.TestConn) error

Close terminates all the resources, return the first error encounter.

func (*ARCClient) CreateOrUpdateTestNotification

func (t *ARCClient) CreateOrUpdateTestNotification(ctx context.Context, tconn *chrome.TestConn, title, text, msgID string) error

CreateOrUpdateTestNotification creates a notification with a custom title, text, then verified that it is created successfully. msgID uniquely identify the notification, so if notification needed to be updated, use the same msgID.

func (*ARCClient) RemoveNotification

func (t *ARCClient) RemoveNotification(ctx context.Context, tconn *chrome.TestConn, msgID string) error

RemoveNotification removes an ARC notification with the given msgID.

Jump to

Keyboard shortcuts

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