-
Notifications
You must be signed in to change notification settings - Fork 71
NotificationsCenter
github-actions[bot] edited this page May 16, 2024
·
3 revisions
To open the notifications center, use either Workbench
or StatusBar
object:
import { Workbench, StatusBar, NotificationType } from 'vscode-extension-tester';
...
center = await new Workbench().openNotificationsCenter();
center1 = await new StatusBar().openNotificationsCenter();
// get all notifications
const notifications = await center.getNotifications(NotificationType.Any);
// get info notifications
const infos = await center.getNotifications(NotificationType.Info);
// clear all notifications
await center.clearAllNotifications();
// close the notifications center
await center.close();