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
FUSETOOLS-2276 - Incorporate 'MarkersRemoverValidatorIT.checkMarkers'… #1366
Conversation
List<Problem> problems = view.getProblems(ProblemType.ALL); | ||
int count = 0; | ||
for (Problem problem : problems) { | ||
if (problem.getType().equals(FUSE_TOOLING_PROBLEM_TYPE)) { |
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.
it is best to invert equals to ensure no NPE (in case problem.getType() is returning null)
ProblemsView view = new ProblemsView(); | ||
view.open(); | ||
List<Problem> problems = view.getProblems(ProblemType.ALL); | ||
int count = 0; |
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.
Do you think that you can use streams to simplify it?
something like
problems.stream().filter(problem -> FUSE_TOOLING_PROBLEM_TYPE.equals(problem.getType())).count();
or maybe:
problems.stream().map(Problem::getType).filter(FUSE_TOOLING_PROBLEM_TYPE::equals).count();
editor.activate(); | ||
CamelEditor.switchTab(SOURCE_TAB); | ||
EditorManipulator.copyFileContentToCamelXMLEditor(ROUTE_WITHOUT_ERRORS); | ||
CamelEditor.switchTab(DESIGN_TAB); |
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.
why do you need to switch tab to design? it should work without switching to design tab
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.
I buy some time with the switch to ensure that problems have enough time to emerge. If you insist on "do not change to design tab", I can rewrite it.
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.
wouldn't be safer to wait for Problems view job to be finished as it was done previously? or maybe do both?
I just fear that you will have the unstable test moved to your UI test instead of being in "normal" test
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.
I have to perform some "user" action, because EditorManipulator.copyFileContentToCamelXMLEditor does not invoke validation. Therefore I switch the tab. Once a user action is performed, validation is triggered and in getFuseToolingProblems is logic which wait until the Problems view job is finished. I believe it will be stable ;-)
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.
strange that the validation is not triggered.
But let's go with that if you think it will be stable
* </ol> | ||
*/ | ||
@Test | ||
public void testProblemsOnGlobalElemets() { |
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.
typo testProblemsOnGlobalElemets -> testProblemsOnGlobalElements
… into UI tests https://issues.jboss.org/browse/FUSETOOLS-2276 Signed-off-by: Tomáš Sedmík <tsedmik@redhat.com>
… into UI tests
https://issues.jboss.org/browse/FUSETOOLS-2276
Signed-off-by: Tomáš Sedmík tsedmik@redhat.com
Pull Request Checklist
After this checklist is all checked or PR provides explanations for possible pass-through, please put the label "Ready for review" on the PR.
General
Functional
Maintainability
Tests
Legal