
Since Buck has no native support for web tests, wrap the tests in a Python shim that calls wct. As in other Polymer cases, we need to prepare a set of inputs and create a directory containing exactly what wct expects to be there. Buck exposes resources to python_tests using the pkg_resources API, which is cumbersome to use, and easier just to ship around zip files as we do elsewhere. Unlike other npm binaries we've encountered, the web-component-tester module has numerous native dependencies, up to and including Selenium. Rather than get in the game of distributing platform-specific binaries, punt and require `wct` to be on the user's $PATH for now. Tests are currently excluded in .buckconfig but can be run directly with either: buck test //polygerrit-ui/app:polygerrit_tests buck test --include web Change-Id: Ia314213925ac27ff271374a96ed539fb2acf0187
180 lines
4.4 KiB
Python
180 lines
4.4 KiB
Python
include_defs('//lib/js.defs')
|
|
|
|
# WHEN REVIEWING NEW NPM_BINARY RULES:
|
|
#
|
|
# You must check licenses in the transitive closure of dependencies to ensure
|
|
# they can be used by Gerrit. (npm binaries are not distributed with Gerrit
|
|
# releases, so we are less restrictive in our selection of licenses, but we
|
|
# still need to do a sanity check.)
|
|
#
|
|
# To do this:
|
|
# npm install -g license-checker
|
|
# mkdir /tmp/npmtmp
|
|
# cd /tmp/npmtmp
|
|
# npm install <package>@<version>
|
|
# license-checker
|
|
# (Piping to grep -o 'licenses:.*' and/or sort -u may make the output saner.)
|
|
|
|
npm_binary(
|
|
name = 'bower',
|
|
version = '1.6.5',
|
|
sha1 = '59d457122a161e42cc1625bbab8179c214b7ac11',
|
|
)
|
|
|
|
npm_binary(
|
|
name = 'vulcanize',
|
|
version = '1.14.0',
|
|
sha1 = '91eac280d031b5bbcafb5f86bb6ed30515fa2564',
|
|
repository = GERRIT,
|
|
)
|
|
|
|
# To add a new Bower component dependency:
|
|
#
|
|
# 1. Add a dummy bower_component rule to this file, specifying the version you
|
|
# want to use:
|
|
# bower_component(
|
|
# name = 'somepackage',
|
|
# package = 'someauthor/somepackage',
|
|
# version = 'TODO',
|
|
# semver = '~1.0.0',
|
|
# license = 'DO_NOT_DISTRIBUTE'
|
|
# )
|
|
#
|
|
# 2. Add your bower_component as a dep to a bower_components rule:
|
|
# bower_components(
|
|
# name = 'my_components',
|
|
# deps = [
|
|
# '//lib/js:foo',
|
|
# '//lib/js:somepackage', # NEW
|
|
# ],
|
|
# )
|
|
#
|
|
# 3. Run bower2buck.py:
|
|
# buck run //tools/js:bower2buck.py -o newbuck //path/to:my_components
|
|
#
|
|
# 4. Use your favorite diff tool to merge the output in newbuck with this file.
|
|
# bower2buck.py reevaluates semantic versions and may upgrade some packages,
|
|
# so you may need to make changes beyond the new component that was added.
|
|
#
|
|
# 5. Make sure to specify licenses for all new packages. You may need to define
|
|
# new licenses in lib/BUCK.
|
|
|
|
bower_component(
|
|
name = 'iron-a11y-keys',
|
|
package = 'PolymerElements/iron-a11y-keys',
|
|
version = '1.0.3',
|
|
deps = [
|
|
':iron-a11y-keys-behavior',
|
|
':polymer',
|
|
],
|
|
license = 'polymer',
|
|
sha1 = 'cf7fdf9ffa3349d28632fc3e86b84300d1439e29',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'iron-a11y-keys-behavior',
|
|
package = 'PolymerElements/iron-a11y-keys-behavior',
|
|
version = '1.0.8',
|
|
deps = [':polymer'],
|
|
license = 'polymer',
|
|
sha1 = '2f1ea0b4542e2949de195dff5cbe02b7cb953eff',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'iron-ajax',
|
|
package = 'PolymerElements/iron-ajax',
|
|
version = '1.1.0',
|
|
deps = [
|
|
':polymer',
|
|
':promise-polyfill',
|
|
],
|
|
license = 'polymer',
|
|
sha1 = 'f94a3a3d847842c49def41e27da42c7c94f8d7c7',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'iron-input',
|
|
package = 'PolymerElements/iron-input',
|
|
version = '1.0.6',
|
|
deps = [
|
|
':iron-validatable-behavior',
|
|
':polymer',
|
|
],
|
|
license = 'polymer',
|
|
sha1 = '2d3eedf0a26046c0e828b1ce3d5b102ee1d0ab19',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'iron-meta',
|
|
package = 'PolymerElements/iron-meta',
|
|
version = '1.1.1',
|
|
deps = [':polymer'],
|
|
license = 'polymer',
|
|
sha1 = 'e06281b6ddb3355ceca44975a167381b1fd72ce5',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'iron-test-helpers',
|
|
package = 'PolymerElements/iron-test-helpers',
|
|
version = '1.0.6',
|
|
semver = '~1.0.6',
|
|
deps = [':polymer'],
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
sha1 = 'c0f7c7f010ca3c63fb08ae0d9462e400380cde2c',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'iron-validatable-behavior',
|
|
package = 'PolymerElements/iron-validatable-behavior',
|
|
version = '1.0.5',
|
|
deps = [
|
|
':iron-meta',
|
|
':polymer',
|
|
],
|
|
license = 'polymer',
|
|
sha1 = '5a68250d6d9abcd576f116dc4fc7312426323883',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'page',
|
|
package = 'visionmedia/page.js',
|
|
version = '1.6.4',
|
|
license = 'page.js',
|
|
sha1 = 'cc442386d4e392be26c85873f463db76fafbaeaf',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'polymer',
|
|
package = 'Polymer/polymer',
|
|
version = '1.2.2',
|
|
deps = [':webcomponentsjs'],
|
|
license = 'polymer',
|
|
sha1 = '7f4033438425584d8912a80614d1a4f754438e15',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'promise-polyfill',
|
|
package = 'polymerlabs/promise-polyfill',
|
|
version = '1.0.0',
|
|
deps = [':polymer'],
|
|
license = 'promise-polyfill',
|
|
sha1 = 'a3b598c06cbd7f441402e666ff748326030905d6',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'test-fixture',
|
|
package = 'PolymerElements/test-fixture',
|
|
version = '1.0.3',
|
|
semver = '^1.0.0',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
sha1 = '21192d554ff6ad7eea894ca751c73b6bc46867dc',
|
|
)
|
|
|
|
bower_component(
|
|
name = 'webcomponentsjs',
|
|
package = 'webcomponentsjs',
|
|
version = '0.7.17',
|
|
license = 'polymer',
|
|
sha1 = '36e29cfe21caa71322a0b5026d7d423c33c0426f',
|
|
)
|