Skip to content

Commit

Permalink
Closing notifications center
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Grossmann <[email protected]>
  • Loading branch information
Lukas Grossmann committed Nov 26, 2023
1 parent 584df90 commit da82cff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/ui/suite/serverlessFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Check failure on line 7 in test/ui/suite/serverlessFunction.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest, 18.15.x)

'NotificationsCenter' is defined but never used

Check failure on line 7 in test/ui/suite/serverlessFunction.ts

View workflow job for this annotation

GitHub Actions / build (windows-latest, 18.15.x)

'NotificationsCenter' is defined but never used
import { VIEWS } from '../common/constants';
import { collapse } from '../common/overdrives';
import { ServerlessFunctionWebView } from '../common/ui/webview/ServerlessFunctionWebViewEditor';
Expand All @@ -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() {
Expand Down

0 comments on commit da82cff

Please sign in to comment.