Add support for running (single) tests with 'run-server.sh'
- include 'web-component-tester' bower dependency as test-dependency - remove special handling for serving folder 'bower_components' - add support for passing parameters from 'run-server.sh' to 'server.go' Change-Id: Ia74b3013e07b6304a4df568b081254909749efc5
This commit is contained in:
parent
0282f27e62
commit
0f537c7bbc
83
lib/js/BUCK
83
lib/js/BUCK
@ -75,6 +75,30 @@ npm_binary(
|
||||
# Use the same procedure as for adding dependencies, except just change the
|
||||
# version number of the existing bower_component rather than adding a new rule.
|
||||
|
||||
bower_component(
|
||||
name = 'accessibility-developer-tools',
|
||||
package = 'accessibility-developer-tools',
|
||||
version = '2.10.0',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = 'bc1a5e56ff1bed7a7a6ef22a4b4e8300e4822aa5',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'async',
|
||||
package = 'async',
|
||||
version = '1.5.2',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = '1ec975d3b3834646a7e3d4b7e68118b90ed72508',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'chai',
|
||||
package = 'chai',
|
||||
version = '3.5.0',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = '849ad3ee7c77506548b7b5db603a4e150b9431aa',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'fetch',
|
||||
package = 'fetch',
|
||||
@ -266,6 +290,22 @@ bower_component(
|
||||
sha1 = '5a68250d6d9abcd576f116dc4fc7312426323883',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'lodash',
|
||||
package = 'lodash',
|
||||
version = '3.10.1',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = '2f207a8293c4c554bf6cf071241f7a00dc513d3a',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'mocha',
|
||||
package = 'mocha',
|
||||
version = '2.4.5',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = 'efbb1675710c0ba94a44eb7a4d27040229283197',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'moment',
|
||||
package = 'moment/moment',
|
||||
@ -328,6 +368,30 @@ bower_component(
|
||||
sha1 = 'a3b598c06cbd7f441402e666ff748326030905d6',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'sinon-chai',
|
||||
package = 'sinon-chai',
|
||||
version = '2.8.0',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = '0464b5d944fdf8116bb23e0b02ecfbac945b3517',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'sinonjs',
|
||||
package = 'sinonjs',
|
||||
version = '1.17.1',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = 'a26a6aab7358807de52ba738770f6ac709afd240',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'stacky',
|
||||
package = 'stacky',
|
||||
version = '1.3.2',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = 'd6c07a0112ab2e9677fe085933744466a89232fb',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'test-fixture',
|
||||
package = 'polymerelements/test-fixture',
|
||||
@ -344,6 +408,25 @@ bower_component(
|
||||
sha1 = '92f06d8417a51f1f75c94b7a19616e19695cc6db',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'web-component-tester',
|
||||
package = 'web-component-tester',
|
||||
version = '4.2.2',
|
||||
deps = [
|
||||
':accessibility-developer-tools',
|
||||
':async',
|
||||
':chai',
|
||||
':lodash',
|
||||
':mocha',
|
||||
':sinon-chai',
|
||||
':sinonjs',
|
||||
':stacky',
|
||||
':test-fixture',
|
||||
],
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
sha1 = '54556000c33d9ed7949aa546c1b4a1531491a5f0',
|
||||
)
|
||||
|
||||
bower_component(
|
||||
name = 'webcomponentsjs',
|
||||
package = 'webcomponentsjs',
|
||||
|
@ -56,6 +56,7 @@ bower_components(
|
||||
'//polygerrit-ui:polygerrit_components',
|
||||
'//lib/js:iron-test-helpers',
|
||||
'//lib/js:test-fixture',
|
||||
'//lib/js:web-component-tester',
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -23,8 +23,9 @@ if [[ ! -f .buckconfig ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd polygerrit-ui
|
||||
buck build //polygerrit-ui/app:polygerrit_tests
|
||||
cd polygerrit-ui/app
|
||||
rm -rf bower_components
|
||||
buck build //polygerrit-ui:polygerrit_components
|
||||
unzip -q ../buck-out/gen/polygerrit-ui/polygerrit_components/polygerrit_components.bower_components.zip
|
||||
exec go run server.go
|
||||
unzip -q ../../buck-out/gen/polygerrit-ui/app/test_components/test_components.bower_components.zip
|
||||
cd ..
|
||||
exec go run server.go "$@"
|
||||
|
@ -42,8 +42,6 @@ func main() {
|
||||
if *prod {
|
||||
http.Handle("/", http.FileServer(http.Dir("dist")))
|
||||
} else {
|
||||
http.Handle("/bower_components/",
|
||||
http.StripPrefix("/bower_components/", http.FileServer(http.Dir("bower_components"))))
|
||||
http.Handle("/", http.FileServer(http.Dir("app")))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user