diff --git a/test/ui/suite/serverlessFunction.ts b/test/ui/suite/serverlessFunction.ts index 480d55ee9..427ab2c1a 100644 --- a/test/ui/suite/serverlessFunction.ts +++ b/test/ui/suite/serverlessFunction.ts @@ -4,7 +4,7 @@ *-----------------------------------------------------------------------------------------------*/ import * as fs from 'fs-extra'; import * as pth from 'path'; -import { ActivityBar, EditorView, SideBarView, ViewSection } from 'vscode-extension-tester'; +import { ActivityBar, EditorView, NotificationType, NotificationsCenter, SideBarView, ViewSection, Workbench } from 'vscode-extension-tester'; import { VIEWS } from '../common/constants'; import { collapse } from '../common/overdrives'; import { ServerlessFunctionWebView } from '../common/ui/webview/ServerlessFunctionWebViewEditor'; @@ -27,6 +27,12 @@ export function testCreateServerlessFunction(path: string) { } section = await view.getContent().getSection(VIEWS.serverlessFunctions); await section.expand(); + + const notificationCenter = await new Workbench().openNotificationsCenter(); + const notifications = await notificationCenter.getNotifications(NotificationType.Any); + if(notifications.length > 0) { + await notificationCenter.close(); + } }); it('Create a new Serverless Function', async function test() {