Skip to content

Commit 12ba46d

Browse files
committed
Fix UI test
1 parent 849538b commit 12ba46d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

rascal-lsp/src/main/rascal/library/demo/lang/pico/LanguageServer.rsc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ value picoExecutionService(removeDecl(start[Program] program, IdType toBeRemoved
197197
}
198198
199199
@synopsis{Command handler to show an info message}
200-
void picoExecutionService(showInfoMessage(start[Program] program)) {
200+
value picoExecutionService(showInfoMessage(start[Program] program)) {
201201
showMessage(info("Info message", program.src));
202+
return ("result": true);
202203
}
203204
204205
@synopsis{Prepares the rename service by checking if the id can be renamed}

rascal-vscode-extension/src/test/vscode-suite/dsl.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* POSSIBILITY OF SUCH DAMAGE.
2626
*/
2727

28-
import { VSBrowser, WebDriver, Workbench } from 'vscode-extension-tester';
28+
import { NotificationType, VSBrowser, WebDriver, Workbench } from 'vscode-extension-tester';
2929
import { Delays, IDEOperations, RascalREPL, TestWorkspace, ignoreFails, printRascalOutputOnFailure, sleep } from './utils';
3030

3131
import * as fs from 'fs/promises';
@@ -201,10 +201,12 @@ parameterizedDescribe(function (errorRecovery: boolean) {
201201
const lens = await driver.wait(() => editor.getCodeLens("Show info message."), Delays.verySlow, "'Show info message' lens should be available");
202202
await lens!.click();
203203
await driver.wait(async () => {
204-
const notifications = await new Workbench().getNotifications();
204+
const notificationCenter = await new Workbench().openNotificationsCenter();
205+
const notifications = await notificationCenter.getNotifications(NotificationType.Info);
205206
for (const notification of notifications) {
206207
const message = await notification.getMessage();
207208
if (message.startsWith("Info message")) {
209+
await notificationCenter.clearAllNotifications();
208210
return true;
209211
}
210212
}

0 commit comments

Comments
 (0)