Skip to content

Commit

Permalink
Add debug console
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmotta committed Dec 13, 2024
1 parent d609654 commit a41ead3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ describe("KIE Editors End to End Test Suite - Smoke tests", () => {
let folderView: SideBarView;

before(async function () {
console.log("DEBUG VS CODE -> SETTING TIMEOUT");
this.timeout(60000);
console.log("DEBUG VS CODE -> NEW INSTANCE");
testHelper = new VSCodeTestHelper();
console.log("DEBUG VS CODE -> OPENING FOLDER");
folderView = await testHelper.openFolder(RESOURCES);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,25 @@ export class VSCodeTestHelper {
* @returns a promise that resolves to a SideBarView of the openned folder
*/
public openFolder = async (absoluteFsPath: string): Promise<SideBarView> => {
console.log("DEBUG VS CODE -> OPENING RESOURCES");
await this.browser.openResources(absoluteFsPath);

console.log("DEBUG VS CODE -> NEW VIEW CONTROL");
const control = (await new ActivityBar().getViewControl("Explorer")) as ViewControl;
console.log("DEBUG VS CODE -> SIDEBAR VIEW");
this.sidebarView = await control.openView();
console.log("DEBUG VS CODE -> CHECK IS DISPLAYED");
assert.isTrue(await this.sidebarView.isDisplayed(), "Explorer side bar view was not opened");

console.log("DEBUG VS CODE -> FOLDER NAME");
const folderName = absoluteFsPath.split(path.sep).pop();
if (folderName == undefined) {
throw new Error("Invalid path: " + absoluteFsPath);
}

console.log("DEBUG VS CODE -> SECTION VIEW");
this.workspaceSectionView = await this.sidebarView.getContent().getSection(folderName);

console.log("DEBUG VS CODE -> RETURNING");
return this.sidebarView;
};

Expand Down

0 comments on commit a41ead3

Please sign in to comment.