Skip to content

Commit

Permalink
added mroe screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshwinThomasIBM authored and JoshwinThomasIBM committed Jan 22, 2025
1 parent cbd1451 commit ff7a618
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/test/utils/testUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path = require('path');
import { Workbench, InputBox, DefaultTreeItem, ModalDialog } from 'vscode-extension-tester';
import { Workbench, InputBox, DefaultTreeItem, ModalDialog, VSBrowser } from 'vscode-extension-tester';
import * as fs from 'fs';
import { STOP_DASHBOARD_MAC_ACTION } from '../definitions/constants';
import { MapContextMenuforMac } from './macUtils';
Expand Down Expand Up @@ -114,30 +114,35 @@ export function getMvnProjectPath(): string {
let foundText = false;
let count=0;
do{
VSBrowser.instance.takeScreenshot('degbugging 10- 3.4.0');
clipboard.writeSync('');//clean slate for clipboard
await workbench.executeCommand('terminal select all');
const text = clipboard.readSync();
console.log("debug:" + text) ;
if( text.includes(serverStatusCode)){
VSBrowser.instance.takeScreenshot('degbugging 11- 3.4.0');
foundText = true;
console.log("Found text "+ serverStatusCode);
break;
}
else if(text.includes("FAILURE"))
{
VSBrowser.instance.takeScreenshot('degbugging 12- 3.4.0');
console.log("Found failure "+ text);
foundText = false;
break;
}
else
{
VSBrowser.instance.takeScreenshot('degbugging 13- 3.4.0');
console.log("test is running ...")
foundText = false;
}
count++;
await workbench.getDriver().sleep(10000);
} while(!foundText && (count <= 20));
await workbench.executeCommand('terminal clear');
VSBrowser.instance.takeScreenshot('degbugging 14- 3.4.0');
return foundText;
}

Expand Down

0 comments on commit ff7a618

Please sign in to comment.