Skip to content
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

Fixes #282 - project detection in dashboard #284

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

aparnamichael
Copy link
Contributor

@aparnamichael aparnamichael commented Aug 25, 2023

Fixes #282 - Added test case to detect project with src/main/liberty/config/server.xml file only (ie. no LMP or LGP defined in build file)

…file only

new sample project for testing server.xml
Added test case for detect project with src/main/liberty/config/server.xml file only
@aparnamichael aparnamichael self-assigned this Aug 25, 2023
@aparnamichael aparnamichael changed the title Fixes 282 Fixes #282 Aug 31, 2023
console.log("items...."+(items.length === 0));
return items.length === 0;
} catch (error) {
// if there is no visible elements, getVisibleItems() method is throwing timeout error.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know for sure that is the only error that would occur here? Is it possible other errors may occur that would not be an indication of the view section being empty?

Copy link
Contributor Author

@aparnamichael aparnamichael Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TrevCraw - I have added a check whether the error is a kind of timeout error. Ideally the items.length should be 0, if the view section is empty. But the test framework is waiting for the view section to load some text and finally throwing timeout error. I have tried several solutions to get the count as 0, but test framework is always throwing the timeout exception.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the timeout exception have a specific error code or message with it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TrevCraw - No, always throwing timeout exception.

src/test/utils/testUtils.ts Outdated Show resolved Hide resolved
src/test/utils/testUtils.ts Outdated Show resolved Hide resolved
src/test/LibertyDashboardInitProject.ts Outdated Show resolved Hide resolved
src/test/LibertyDashboardTest.ts Outdated Show resolved Hide resolved
src/test/utils/testUtils.ts Show resolved Hide resolved
src/test/utils/testUtils.ts Outdated Show resolved Hide resolved
aparnamichael and others added 7 commits September 1, 2023 15:17
Co-authored-by: Trevor Crawford <TrevCraw@users.noreply.github.com>
Co-authored-by: Trevor Crawford <TrevCraw@users.noreply.github.com>
Co-authored-by: Trevor Crawford <TrevCraw@users.noreply.github.com>
Co-authored-by: Trevor Crawford <TrevCraw@users.noreply.github.com>
Co-authored-by: Trevor Crawford <TrevCraw@users.noreply.github.com>
Co-authored-by: Trevor Crawford <TrevCraw@users.noreply.github.com>
Added a condition in catch block to confirm the error is Timeouterror.
@aparnamichael
Copy link
Contributor Author

@TrevCraw - I have formatted the files.

TrevCraw
TrevCraw previously approved these changes Sep 1, 2023
@aparnamichael aparnamichael changed the title Fixes #282 Fixes #282 - project detection in dashboard Sep 4, 2023
@TrevCraw TrevCraw self-requested a review September 10, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for project detection
2 participants