We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f34f923 commit 743a399Copy full SHA for 743a399
test/ui/command.test.ts
@@ -109,6 +109,17 @@ describe("Command Tests", function() {
109
}
110
});
111
112
+ afterEach(async function() {
113
+ if (this.currentTest?.state === 'failed') {
114
+ const safeName = this.currentTest.title.replace(/[^a-zA-Z0-9_-]/g, '_');
115
+ try {
116
+ await VSBrowser.instance.takeScreenshot(safeName);
117
+ console.log(`Screenshot saved for failed test: ${safeName}`);
118
+ } catch (e) {
119
+ console.warn(`Failed to take screenshot for ${safeName}: ${e}`);
120
+ }
121
122
+ });
123
124
it("Test javaProjectExplorer.focus", async function() {
125
await new Workbench().executeCommand("javaProjectExplorer.focus");
0 commit comments