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

OsmNoteQuestController: surveyme override and regex test update #6075

Merged

Conversation

kmpoppe
Copy link
Collaborator

@kmpoppe kmpoppe commented Jan 2, 2025

Resolves #6052.

  • Restructured exclusion of notes that get overridden by #surveyme
  • Added RegexOption.DOT_MATCHES_ALL to function NoteComment.containsSurveyRequiredMarker: #surveyme wasn't found at the end of the text added by the user, because SC add "\n\nvia StreetComplete <x.y>" to the text

Resolves streetcomplete#6052.

* Restructured exclusion of notes that get overridden by #surveyme
* Added RegexOption.DOT_MATCHES_ALL to function NoteComment.containsSurveyRequiredMarker:
#surveyme wasn't found at the end of the text added by the user, because SC add "\n\nvia StreetComplete <x.y>" to the text
@kmpoppe
Copy link
Collaborator Author

kmpoppe commented Jan 2, 2025

@westnordost as Florian rightfully asked, I tried adding some tests for the changes I made and got a ton of errors hinting to the mockito-version being out of date. I changed those to the most recent (mockito-core and mockitor-android 5.14.2, mockito-inline is now merged into -core), which makes all tests work again for me.

Is there any reason for not using the newest mockito packages?

* containsSurveyRequiredMarker now also ignores case
* added three tests
@kmpoppe kmpoppe changed the title OsmNoteQuestController: surveyme override and D_M_A for regex test OsmNoteQuestController: surveyme override and regex test update Jan 2, 2025
Simplify containsSurveryRequiredMarker
@westnordost
Copy link
Member

No, I think there wasn't a reason for the old version. Never bothered to upgrade because it was working fine and I didn't need any new features.

@kmpoppe
Copy link
Collaborator Author

kmpoppe commented Jan 3, 2025

Put the new version as a suggestion in your #6074.
@FloEdelmann can you "tests the tests" with the new code?

@westnordost westnordost merged commit db4d11c into streetcomplete:master Jan 4, 2025
@kmpoppe kmpoppe deleted the display-surveyme-ownnotes branch January 4, 2025 18:57
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.

#surveyme in last Note comment should show the Note (even if there are no preceding comments)
4 participants