Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add test view for touch-input-test #36879

Merged
merged 20 commits into from
Oct 20, 2022
Merged

Add test view for touch-input-test #36879

merged 20 commits into from
Oct 20, 2022

Conversation

lin-erik
Copy link
Contributor

This PR adds a touch-input-view for use in the touch-input-test to validate touch input. The view will be attached to the test, and a touch event will be injected. The test asserts that a correct response is sent back from the view (the location of the touch as well as the name of the view).

@lin-erik lin-erik requested a review from akbiggs October 19, 2022 21:42
@lin-erik lin-erik changed the title Add test view for the touch-input-test Add test view for touch-input-test Oct 19, 2022
Copy link
Contributor

@akbiggs akbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this is awesome for two reasons:

  1. Expanding our integration test coverage.
  2. It's so well-documented, I learned a bunch from reading through it.

fx serve
```

Start the Fuchsia emulator in a graphical environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, any reason not to have run_integration-test.sh handle this by dropping --skip-fuchsia-emu from the next command?

More generally should we point this section at https://github.com/flutter/engine/blob/main/shell/platform/fuchsia/flutter/tests/integration/README.md to avoid maintaining these instructions in two places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script defaults to launching a --headless emulator, which causes the test to fail.. I can add a flag to launch a graphical emulator (if this is what you meant by having the script handle it)

Good point on the documentation, I can update the README

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shoot, I forgot about that. The Fuchsia tools tend to be graphical by default and support passing --headless for headless environments, so it's poor design that I didn't do the same.

We can also detect if we're in a headless environment with [[ -z $DISPLAY ]] I believe and use that to configure the emulator appropriately, but it might be better to be more explicit (graphical by default, pass --headless for non-graphics). We can handle this in a follow-up PR though.

@lin-erik lin-erik added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 20, 2022
@lin-erik lin-erik merged commit 791221c into flutter:main Oct 20, 2022
@lin-erik lin-erik deleted the one-flutter branch October 20, 2022 17:26
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-fuchsia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants