-
Notifications
You must be signed in to change notification settings - Fork 6k
Delete scenario test TextSemanticsFocusTest #29370
Conversation
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Scheme | ||
| LastUpgradeVersion = "1020" | ||
| LastUpgradeVersion = "1300" |
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.
Let Xcode update this.
Looks like the test is failing still. Should we close this?
Perhaps just the cleanups can be isolated for a patch? |
This was supposed to be a draft, I added a bunch of logging to see why it's failing but I haven't had a chance to look at it. |
b1a8771 to
2962099
Compare
7f27f22 to
4b0771b
Compare
4b0771b to
ce055ad
Compare
| /// Constructor for `SendTextFocusScemantics`. | ||
| SendTextFocusSemantics(PlatformDispatcher dispatcher) : super(dispatcher); | ||
|
|
||
| bool _firstFrameDrawn = false; |
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.
From flutter/flutter#55778 (comment)
It looks like the first frame of the test is supposed to fake a text field in
onBeginFrameengine/testing/scenario_app/lib/src/send_text_focus_semantics.dart
Lines 39 to 41 in 2962099
// On the first frame, also pretend that it drew a text field. Send the // corresponding semantics tree comprised of 1 node for the text field. window.updateSemantics((SemanticsUpdateBuilder() Then the test taps somewhere:
Which triggersengine/testing/scenario_app/ios/Scenarios/ScenariosUITests/TextSemanticsFocusTest.m
Lines 66 to 67 in 2962099
// The tap location doesn't matter. The mock framework just sends a focused text field on tap. [textInputSemanticsObject tap]; onPointerDataPacket, which "focuses" the fake text field:engine/testing/scenario_app/lib/src/send_text_focus_semantics.dart
Lines 108 to 109 in 2962099
// SemanticsFlag.isTextField and SemanticsFlag.isFocused. flags: 48, When I attach, I right after the tap I can see node 0 correctly being updated with
flutter::SemanticsFlags::kIsFocused.
nodes_[id] = node; But then
onBeginFrameis immediately called again (maybe because of the keyboard animating in?) and it resets node 0 back to an unfocused text field.
The test passes when I make this change to only call the onBeginFrame logic to create the fake text input only once, the first time it's called.
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.
The test passes
Well, on my machine... it failed in CI.
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8822017057875020497/+/u/test:_Scenario_App_Integration_Tests/stdout
chunhtai
left a comment
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.
LGTM
cyanglaz
left a comment
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.
LGTM
This test was previously marked flaky due to a test harness crash flutter/flutter#55778. Xcode has since been updated, but this test is still failing when unskipped. Delete, since it's been off for awhile.
Fixes flutter/flutter#55778
Pre-launch Checklist
writing and running engine tests.
///).