27 Commits

Author SHA1 Message Date
nturgut
38d8ebaa46
E2e screenshot tests2 (#21383)
* carrying code

* more changes for carrying the code

* rebase changes onto ios-screenshot tests

* adding screenshot capability to text_editing e2e test

* address some comments

* change enable flag for isUnitTestsScreenshotsAvailable

* addressing the reviewer comments

* change the dependency for path

* add to licencense file

* changing goldens commit no. the new commit has the screenshot goldens

* update readme file

* firefox tests needs LUCI changes

* change to release mode since screenshots were taken in release mode

* change window size

* some argument changes

* small comment change

* test the chrome linux tests again

* use roboto font instead of default font

* addressing reviewer comments

* change commit for goldens
2020-10-12 16:25:57 -07:00
nturgut
d877b830cb
[web] enable ios safari screenshot tests (#21226)
* enable ios safari screenshot tests

* this is the value used for screenshots in the repo.

* change revision

* fix the error made in the gaps

* do not try to fetch on LUCI

* lunix luci migth break existing prs. only skip fetching for mac

* add a placeholder tests for shadow golden test

* try to use iPhone 11 Pro on LUCI

* change the scale and the smoke test image

* add unmerged goldens PR to tests all the screenshots. will be removed later

* change the goldens lock back to flutter/goldens

* change wrong comment on screenshot tests block

* address reviewer comments

* change the commit number for goldens file

* skip canvas blend mode tests

* debugging LUCI error

* debugging LUCI error printing directory contents

* skip one test, remove the debug logs

* change the revision number to include the correct chrome files
2020-09-25 12:30:57 -07:00
nturgut
6e42b54d59
creating test result directory before running tests (#21324)
* creating test result directory. adding a prepare method to test runner

* addressing reviewer comments
2020-09-22 12:51:14 -07:00
nturgut
1cabedf8ac
running screenshot tests on ios-safari unit tests (#20963)
* running screenshot tests on ios-safari unit tests

* fixing the golden_smoke tests. changes to the documentation

* addressing reviewer comments

* cropping footer from the simulator screenshot. addressing some reviewer comments

* use .dart_tools for recording the screenshots

* fix the usage of the method

* adding TODO's for missing documentation and not supported windows tests

* addressing comments

* changing to incremental counter for file names

* add comment to the counter

* fix anaylze issues

* using takescreenshot method from the iosSimulator.

* address reviewer comments

* fix the scaling issue. disable eronous test

* change the smoke file for top gap 282

* change the variable name for scale factor
2020-09-15 12:36:00 -07:00
nturgut
bb24b4938f
[web] Build unit tests with dart2js instead of build_runner (#20390)
* change from build_runner to dart2js

* add internalBootstrapBrowserTest to some of the tests

* add internalBootstrapBrowserTest to all remaining tests

* make tests build in paralel. Total time dropped from 586 to 177 seconds for 8 core MacBook

* change isolates with pool

* fixing analysis errors

* skipping canvaskit tests for ios-safari

* copy image files to the build directory

* adding internalBootstrapBrowserTest to newly added tests

* add internalBootstrapBrowserTest to faling path iterator test

* necessary changes to make chrome windows work

* in windows test in chrome instead of edge. our edge code was for legacy edge

* do not run golden unit tests on Windows LUCI bots for now

* addressing reviewer comments. Adding a method for deciding when to run integration tests.

* remove lines that I forgot to remove

* fixing analysis error. add issue for todo

* add bootstap to a test file

* adding bootstrap to another test

* add internalBootstrapBrowserTest to a golden test

* return test result in bat file. use archieve package to unzip

* fixing logs for chrome_installer

* use archieve and archieve entity instead of dynamic

* adding comments for windows platform archieve part

* addressing reviewer comments

* change readme file
2020-08-17 16:19:27 -07:00
nturgut
ffe82a77a7
[web] runs ios unit tests (#18650)
* runs ios unit tests, if the simulator is already booted.

* address reviewer comments

* changing comments for the Safari desktop tests

* addressing reviewer comments. removing the timeout.

* change mobile browsers ver name for safari.dart

* removing then calback on browser exit, only leaving the exception callback
2020-06-01 16:52:27 -07:00
Jason Simmons
905836d466
[web] Upgrade the test package to remove the dependency on package_resolver (#18135) 2020-05-05 10:57:02 -07:00
Yegor
7bd8dee5be
fix implicit dynamic and two lints everywhere; implicit cast in dev/ (#17372) 2020-03-29 19:23:37 -07:00
Yegor
b2a7470748
Reland "add limited analysis options (#17332)" (#17374)
* Reland "add limited analysis options (#17332)"

This time I'm starting without Cirrus. Will add Cirrus serpartely from code changes.

This reverts commit 6d33ee1a2ca7d404ebd5cb434d8ab859bf8ac0b7.

* disable Cirrus analysis check
2020-03-27 11:06:10 -07:00
Chinmay Garde
6d33ee1a2c
Revert "add limited analysis options (#17332)" (#17368)
This reverts commit 5389159643fa26342580208b6a9de547ef4de406.
2020-03-27 02:38:50 -07:00
Yegor
5389159643
add limited analysis options (#17332)
add limited analysis options
2020-03-26 14:38:59 -07:00
vsmenon
0ef67b5e74
opt out dart:ui from nnbd (#16473)
* opt out dart:ui from nnbd

* Annotate tests as well
2020-02-20 11:04:00 -08:00
Yegor
8c855dba98
fix text blurriness in HTML-rendered text (#15649)
* fix text blurriness in HTML-rendered text
2020-01-15 14:20:28 -08:00
Yegor
5d9509ae05
[web][felt] fix source map path (#14134) 2019-12-04 13:28:23 -08:00
Nurhan Turgut
333a8058c6
Changing test runner and platform to be browser independent (#13869)
* changes to add firefox as one of the browser options to test_platform and test_runner

* Creating a supported_browsers file to put all the different browser related maps and utilities

* Remove accidentaly forgotten commented out lines. Clear imports

* fix error in screenshot handler

* Addressing PR comments.

* addressing PR comments part 2:
2019-11-19 12:18:10 -08:00
Nurhan Turgut
3b97d3a329
[web] [test] Adding firefox install functionality to the test platform (#13272)
* Add Firefox installing functionality to test platform. For Linux only. Refactor test platform code

* remove download.dart. Not complete for now

* uncomment firefox.dart. Adding new CL parameters.

* Licence headers added.

* adding more comments to firefox_installer

* adding test for firefox download

* address pr comments. change directory for test in .cirrus.yml

* change directory for test_web_engine_firefox_script

* removing the system test.
2019-10-23 14:41:49 -07:00
Nurhan Turgut
dea7150f33
Adding firefox_installer.dart (#13185)
* adding firefox downloading functionality to felt

* Getting the location directly from the response
2019-10-18 10:35:21 -07:00
Ferhat
3fd877715b
[web] Add basic color per vertex drawVertices API support (#13066)
* Implement basic drawVertices for BlendMode.srcOver and hairline rendering
* Implement maxDiffRate parameter for screenshot tests
2019-10-14 13:16:05 -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
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
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
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