Allow integration test helpers to work on substrings instead of whole strings#160437
Merged
dcharkes merged 4 commits intoflutter:masterfrom Dec 20, 2024
Merged
Conversation
dcharkes
approved these changes
Dec 18, 2024
Contributor
dcharkes
left a comment
There was a problem hiding this comment.
=> This makes tests simpler as they don't have to know about the exact padding of progres bar etc. Those may be irrelevant for the purpose of the integration test and only complicate it.
The goal LGTM 👍
The implementation could be simpler, left comments.
packages/flutter_tools/test/integration.shard/transition_test_utils.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/integration.shard/transition_test_utils.dart
Outdated
Show resolved
Hide resolved
mkustermann
commented
Dec 18, 2024
Member
Author
mkustermann
left a comment
There was a problem hiding this comment.
@dcharkes Please let me know if my comments make sense.
packages/flutter_tools/test/integration.shard/transition_test_utils.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/integration.shard/transition_test_utils.dart
Outdated
Show resolved
Hide resolved
a298fd4 to
d8d056a
Compare
bkonyi
approved these changes
Dec 19, 2024
d8d056a to
9b7e065
Compare
… strings The integration test framework that waits for transitions and (optionally) takes actions on transitions allows to match patterns. If one uses a RegExp pattern than the framework only checks whether a line contains the given RegExp pattern. If one uses a String pattern it matches it exactly. => We add a `Barrier.contains()` and `Multiple.contains()` that allow matching a line with if it contains the String (just like in RegExp) => This makes tests simpler as they don't have to know about the exact padding of progres bar etc. Those may be irrelevant for the purpose of the integration test and only complicate it.
9b7e065 to
15b4378
Compare
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 12, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The integration test framework that waits for transitions and (optionally) takes actions on transitions allows to match patterns.
If one uses a RegExp pattern than the framework only checks whether a line contains the given RegExp pattern.
If one uses a String pattern it matches it exactly.
=> We add a
Barrier.contains()andMultiple.contains()that allow matching a line with if it contains the String (just like in RegExp)=> This makes tests simpler as they don't have to know about the exact padding of progres bar etc. Those may be irrelevant for the purpose of the integration test and only complicate it.