diff --git a/src/liberty/devCommands.ts b/src/liberty/devCommands.ts index b2da6e1e..aaaecda1 100644 --- a/src/liberty/devCommands.ts +++ b/src/liberty/devCommands.ts @@ -498,6 +498,10 @@ export async function openReport(reportType: string, libProject?: LibertyProject if (reportType === "gradle") { reportTypeLabel = "test"; } + /* + if its a maven project, check for the report in the initial path , else try for the alternate one and if it doesnt exist in both + display a prompt for its non existance + */ if(libProject.getContextValue() === LIBERTY_MAVEN_PROJECT || libProject.getContextValue() === LIBERTY_MAVEN_PROJECT_CONTAINER){ console.log("report path ::"+report) if(!await checkReportAndDisplay(report,reportType,reportTypeLabel,libProject)){ @@ -507,6 +511,9 @@ export async function openReport(reportType: string, libProject?: LibertyProject vscode.window.showInformationMessage(message); } } + /* + if its a gralde project, then check existance for the report in the path set and if not display prompt for its non existance + */ }else if(!await checkReportAndDisplay(report,reportType,reportTypeLabel,libProject)){ const message = localize("test.report.does.not.exist.run.test.first", report); vscode.window.showInformationMessage(message); @@ -612,6 +619,10 @@ function isWin(): boolean { return process.platform.startsWith("win"); } +/* +will return the path of the report, since there are diffrent folders to look into and the file names can be different +we need to get the paths to look for dynamically +*/ function getReportFile(path :any,dir :string,filename:string):any{ return Path.join(path,"target",dir, filename); } diff --git a/src/test/MavenTestDevModeActions.ts b/src/test/MavenTestDevModeActions.ts index 61e97685..09754d1d 100755 --- a/src/test/MavenTestDevModeActions.ts +++ b/src/test/MavenTestDevModeActions.ts @@ -99,10 +99,10 @@ it('Run tests for sample maven project', async () => { it('start maven with options from liberty dashboard', async () => { const reportPath = path.join(utils.getMvnProjectPath(),"target","site","failsafe-report.html"); - const alternateReportPath = path.join(utils.getMvnProjectPath(),"target","reports","failsafe.html"); + const alternateReportPath = path.join(utils.getMvnProjectPath(),"target","reports","failsafe.html"); // new path to scan for the reports let deleteReport = await utils.deleteReports(reportPath); let deleteAlternateReport = await utils.deleteReports(alternateReportPath); - expect (deleteReport||deleteAlternateReport).to.be.true; + expect (deleteReport||deleteAlternateReport).to.be.true; // there should be a report available irrespective of the surefire versions we use , so either one needs to be true await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION_WITH_PARAM, constants.START_DASHBOARD_MAC_ACTION_WITH_PARAM); await utils.setCustomParameter("-DhotTests=true"); await utils.delay(30000);