18 Commits

Author SHA1 Message Date
David Iglesias
f48f0fa01b
Open source canvas tests from flutter_web_ui (#12819)
* Open source canvas tests from flutter_web_ui

Reimplement some painter tests as screenshot tests on canvas.

Needs https://github.com/flutter/goldens/pull/53
Fixes https://github.com/flutter/flutter/issues/42027

* Remove whitespace

* Address PR feedback

* Add latest hash to dev/goldens_lock.yaml
* Rename (with git mv) *scuba_test.dart -> *golden_test.dart
2019-10-08 09:40:09 -07:00
Yegor
bba0065cf6
add option for bulk-updating screenshots; update screenshots (#12797)
* add option for bulk-updating screenshots; update screenshots
2019-10-04 15:07:05 -07:00
Mouad Debbar
327eb876f9
[web] Don't require felt to be in PATH (#12753) 2019-10-02 15:05:16 -07:00
Yegor
3360d861e5
[web] filter test targets; cache host.dart compilation (#12445)
* filter test targets; cache host.dart compilation
2019-09-25 13:51:00 -07:00
Yegor
0bfca375b3
Force exit felt tool on sigint, sigterm (#12443) 2019-09-25 10:02:32 -07:00
Yegor
c3bfbec9de
delete golden files; switch to flutter/goldens (#12434)
Delete golden files from flutter/engine; switch to flutter/goldens
2019-09-25 09:08:44 -07:00
Yegor
94368ac0ec
Add macOS testing support (#12383)
- Add support for macOS in `felt test`
- Set viewport so it does not depend on real device pixel density
2019-09-22 11:49:44 -07:00
Yegor
d5820e956e
Store screenshot test output as Cirrus artifacts; do fuzzy comparison of non-matching screenshot pixels (#12274)
- Store screenshot test output as Cirrus artifacts
- Do fuzzy comparison of non-matching screenshot pixels
- Make screenshot tests fail on Cirrus
2019-09-20 14:46:00 -07:00
David Iglesias
b875c7a5ff
Add web engine screenshot (scuba) tests (#12353)
* Import all golden files and tests from internal repo.
* Adapt test files to new screenshot API, and tweak some settings.

(Check PR to see individual changes to each file)

Fixes https://github.com/flutter/flutter/issues/40975
2019-09-20 09:00:55 -07:00
David Iglesias
d3c60acef8
More controls for Screenshot tests (for web) (#12284)
New features for golden tests (for web):

* Height/width of headless browser instance extracted to constants
* Remove border from the host iframe
* Added 'region' to matchGoldenFile, so screenshots can capture only
a subset of the viewport
* Added image-format-awareness (png) to screenshot comparison, so it
doesn't only look at raw bytes
* When a test fails, output a diff image alongside the unexpected
output.
2019-09-18 14:58:30 -07:00
Mouad Debbar
b790d48ebc
README for the felt tool (#12323) 2019-09-17 14:03:31 -07:00
Mouad Debbar
7ab695618e
Add a build command to felt (#12303)
- The build command supports a `--watch` or `-w` flag to watch for
changes and rebuild.

Fixes https://github.com/flutter/flutter/issues/40392
2019-09-17 10:31:13 -07:00
Mouad Debbar
968c3aa169
Refactor and polish the 'felt' tool (#12258)
1. Various functionalities offered by this tool are now organized into commands (e.g. `felt test`, `felt check-licenses`).
2. The felt tool can now be invoked from anywhere, not necessarily from the web_ui directory.
3. This new structure helps us scale better as we add more commands (e.g. soon a `build/watch` command is coming).
2019-09-16 10:41:34 -07:00
Yegor
d6f0b64d06
pin and auto-install chrome version (#12228)
pin and auto-install chrome version
2019-09-12 10:25:37 -07:00
Yegor
e9c998468e
add a convenience CLI tool for building and testing web engine (#12197) 2019-09-10 14:52:57 -07:00
Yegor
954f1988c5
Add custom test plugin that supports screenshot tests (#12079)
- Add a custom `PlatformPlugin` that spins up a server waiting for test to request a screenshot.
  - When a screenshot is requested the plugin talks to Chrome via the debug port, captures a screenshot, and compares it with a golden file
- This PR also adds proper CLI for `dev/test.dart` with an `ArgParser` for future extension into a proper developer tool for the team.
  - As a first couple of features, it adds `--debug` option to launch Chrome in debug mode, a `--target` option to choose a single test to run rather than all tests, and `--shard` option to choose a subset of tests to run.

Limitations:
 - While screenshot test will run on Cirrus, they are configured to not fail on Cirrus. Need to solve Chrome version skew.
 - Stack maps do not work yet (you get stacks, but they are nonsensical)
 - When requesting a single test, build_runner builds all tests anyway
 - Nothing but desktop Chrome is supported
 - Nothing but Linux is supported
 - There's no Chrome version pinning; currently assumed stable Chrome channel
2019-09-10 13:53:47 -07:00
Yegor
479719b26d
remove Web test blacklist; all tests should pass now (#11640)
* copy ahem.ttf where web_ui can find it
* remove Web test blacklist; all tests should pass now
2019-08-28 12:37:34 -07:00
Yegor
fad38e252f
sync web engine; run web engine tests (#11031)
sync web engine; run web engine tests
2019-08-22 16:38:03 -07:00