Skip to content

Commit 5cd6734

Browse files
committed
add status messages
1 parent c6264c4 commit 5cd6734

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

firebase-vscode/src/data-connect/execution/execution.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,15 @@ ${arg.existingQuery ? `\n\nRefine this existing operation:\n${arg.existingQuery}
373373
arg.projectId!,
374374
schemas.length > 0 ? schemas : undefined,
375375
(status: any) => {
376+
let message = "";
377+
if (status.state) {
378+
message += `[${status.state}] `;
379+
}
376380
if (status.message) {
377-
progress.report({ message: status.message });
378-
} else if (status.state) {
379-
progress.report({ message: status.state });
381+
message += status.message;
382+
}
383+
if (message) {
384+
progress.report({ message });
380385
}
381386
}
382387
);
@@ -429,10 +434,15 @@ ${arg.existingQuery ? `\n\nRefine this existing operation:\n${arg.existingQuery}
429434
projectId,
430435
location,
431436
(status: any) => {
437+
let message = "";
438+
if (status.state) {
439+
message += `[${status.state}] `;
440+
}
432441
if (status.message) {
433-
progress.report({ message: status.message });
434-
} else if (status.state) {
435-
progress.report({ message: status.state });
442+
message += status.message;
443+
}
444+
if (message) {
445+
progress.report({ message });
436446
}
437447
}
438448
);

firebase-vscode/src/test/suite/execution-error-handling.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ firebaseSuite("generateOperation Error Handling", () => {
8383
assert.equal(showErrorMessageStub.getCall(0).args[0], "Ensure schema compiles before generating queries");
8484
});
8585

86-
firebaseTest("should show notification when response is not valid GraphQL", async function(this: any) {
87-
this.timeout(10000);
86+
firebaseTest("should show notification when response is not valid GraphQL", async () => {
8887
buildStub.resolves({ errors: [] });
8988

9089
const scope = nock("https://firebasedataconnect.googleapis.com")

0 commit comments

Comments
 (0)