Documentation
¶
Overview ¶
Package notifytest holds the notification helpers the shell's tests share: a service and a store on temporary files, and the history, the store and the popup list read back as pages and id sets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func History ¶
func History(t *testing.T, svc *notifications.Service) []*notifications.Notification
History is the first page of svc's history, newest first.
func IDs ¶
func IDs(notifs []*notifications.Notification) map[uint32]bool
IDs is the set of the notifications' ids.
func NewService ¶ added in v0.3.23
func NewService(tb testing.TB) *notifications.Service
NewService is a service whose do-not-disturb state is a temporary directory's: it starts off, and the writes the service queued have landed before the directory goes.
Types ¶
type Store ¶ added in v0.3.14
type Store struct {
// contains filtered or unexported fields
}
Store is a service's store as a test reads it back: through the service, whose writes reach the disk after its calls return.
func AttachStore ¶
func AttachStore(t *testing.T, svc *notifications.Service) Store
AttachStore persists svc's history in a store on a temporary file, closed once the writes queued when the test ends have landed; call it before the first notification.
func (Store) Stored ¶ added in v0.3.14
func (s Store) Stored(t *testing.T) []*notifications.Notification
Stored is the first page of what the store holds once every write the service queued so far has landed, newest first.