perfetto-ui: Add ability to have multiple types of jest test
In preparation for headless Chrome based integration tests add support
multiple test environments to jest.
- Add puppeteer & @types/puppeteer deps for headless chrome
- Move sorcery to devDependencies
- Add tslib for await/async support
- Add out/foo/ui_unittests (to run just the unit tests)
- Add out/foo/ui_tests (to run all tests)
- Add various examples to ui/test/example_*
- Update travis to use out/foo/ui_tests
- Update ui/README to explain how to run the tests
Change-Id: Ifc7cb7eddd17330ea9d981877c4451fb73623bc3
diff --git a/ui/BUILD.gn b/ui/BUILD.gn
index d8f3688..aa5e497 100644
--- a/ui/BUILD.gn
+++ b/ui/BUILD.gn
@@ -28,6 +28,7 @@
deps = [
":index_release",
":main_bundle_release",
+ ":test_scripts",
":wasm_bundle_release",
":wasm_release",
":worker_bundle_release",
@@ -407,3 +408,28 @@
stamp_file,
]
}
+
+group("test_scripts") {
+ deps = [
+ ":copy_tests_script",
+ ":copy_unittests_script",
+ ]
+}
+
+copy("copy_unittests_script") {
+ sources = [
+ "config/ui_unittests_template",
+ ]
+ outputs = [
+ "$root_build_dir/ui_unittests",
+ ]
+}
+
+copy("copy_tests_script") {
+ sources = [
+ "config/ui_tests_template",
+ ]
+ outputs = [
+ "$root_build_dir/ui_tests",
+ ]
+}