[ios]uitest for admob banner in scrollable list gesture issue#183128
[ios]uitest for admob banner in scrollable list gesture issue#183128hellohuanlin wants to merge 2 commits intoflutter:masterfrom
Conversation
3df9aa2 to
b6bc7cb
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces an integration test to address a gesture handling issue with UIKit platform views, specifically for an AdMob banner within a scrollable list on iOS. The changes include a new Dart test page, a fake AdMob banner implementation in Objective-C to ensure test stability, and a corresponding XCUITest to validate the fix. Additionally, the web view logic has been refactored into a reusable component, which is a good improvement. My review includes a minor suggestion to enhance code maintainability by replacing a magic number with a named constant, in line with the repository's style guidelines.
| self = [super init]; | ||
| if (self) { | ||
| UIView *currentView = self; | ||
| for (int i = 0; i < 6; i++) { |
There was a problem hiding this comment.
To improve readability and avoid magic numbers, please define 6 as a named constant. For example, you could add static const int kNestedViewCount = 6; at the file level and use kNestedViewCount in the loop.
References
- The repository style guide states that code should be optimized for readability (line 29) and that Objective-C code should follow the Google Objective-C Style Guide (line 47). The Google guide advises against hard-coding numbers (magic numbers) to improve clarity and maintainability. (link)
b6bc7cb to
954ae4a
Compare
| CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; | ||
| CODE_SIGN_STYLE = Automatic; | ||
| CURRENT_PROJECT_VERSION = 1; | ||
| DEVELOPMENT_TEAM = ""; |
There was a problem hiding this comment.
hmmm, ok i have to edit the source.
I removed the team from xcode, but team became "" (rather than being reverted).
This is to ensure that admob banner is still tappable after being scrolled in a scrollable list. See issue: #165787.
I have tried turning off the hacky workaround (#179908) and confirmed that the test fails, so it will be able to catch any regression in the future.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.