-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue266 - automated test for view test report for gradle project #470
base: main
Are you sure you want to change the base?
Issue266 - automated test for view test report for gradle project #470
Conversation
Documentation added
src/test/GradleTestDevModeActions.ts
Outdated
@@ -248,26 +235,28 @@ it('start gradle with docker from liberty dashboard', async () => { | |||
|
|||
}).timeout(350000); | |||
|
|||
it('View test report for gradle project', async () => { | |||
it('View test report for gradle project', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed. Thanks
@SuparnaSuresh |
Updated the branch. Thanks |
src/test/GradleTestDevModeActions.ts
Outdated
await utils.delay(1000); | ||
console.log("Tabs opened: " + tabs.indexOf(constants.GRADLE_TEST_REPORT_TITLE)); | ||
|
||
expect(tabs.indexOf(constants.GRADLE_TEST_REPORT_TITLE) > -1, "Gradle test report not found").to.equal(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of checking for tab count > -1, can we close all the other tabs and open only the reports and check the tab header title?
it('View test report for gradle project', async () => {
// Close all the tabs in editor.
await new EditorView().closeAllEditors();
utils.delay(5000);
if ((process.platform === 'darwin')) {
//Function call to enter corresponding command in the command prompt to display test report for gradle project in mac
await viewTestReportForMac();
} else {
await utils.launchDashboardAction(item, constants.GRADLE_TR_DASHABOARD_ACTION, constants.GRADLE_TR_DASHABOARD_MAC_ACTION);
}
tabs = await new EditorView().getOpenEditorTitles();
await utils.delay(1000);
expect (tabs[0], "Gradle test report not found").to.equal(constants.GRADLE_TEST_REPORT_TITLE);
}).timeout(60000);
Also good to add an assert statement, if 'tabs' is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the assert condition in test for more reliable result.
Incorporated review comments. Thanks. |
Fixes #266
Automated test case for View test report is enabled for gradle project.