Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions test/ui/common/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ export async function notificationExists(
driver: WebDriver,
timeout = 10000,
): Promise<Notification> {
const center = await new Workbench().openNotificationsCenter();


let currentNotifications = undefined;
return driver.wait(async () => {
try {
const center = await new Workbench().openNotificationsCenter();
const notifications = await center.getNotifications(NotificationType.Any);
currentNotifications = notifications;
for (const item of notifications) {
Expand All @@ -70,9 +68,9 @@ export async function notificationDoesNotExist(
driver: WebDriver,
timeout = 10_000,
): Promise<boolean> {
const center = await new Workbench().openNotificationsCenter();
return driver.wait(async () => {
try {
const center = await new Workbench().openNotificationsCenter();
const notifications = await center.getNotifications(NotificationType.Any);
const notificationText = [];
notifications.forEach(
Expand Down
Loading