Closed niklas-dahl closed 7 years ago
let me check on this
@niklas-dahl I can reproduce the problem, the problem is that by default Chrome tests did not work within Docker container, you need to configure karma and protractor for running tests within Docker container.
--no-sandbox
option must be used for Chrome to get it running within Docker container.
and to run unit tests: $ ng test --browsers Chrome_no_sandbox
, e2e tests: ng e2e
.
You should refer to https://github.com/teracyhq/angular-boilerplate for best practices and working config.
I've updated the docs here too https://github.com/teracyhq/docker-files/tree/master/angular-cli#tests-with-chrome
Thanks, I got e2e working, but the karma tests are failing.
I create an example repository to isolate the problem: https://gitlab.com/niklas-dahl/angular-cli-e2e-test
The failing buid log: https://gitlab.com/niklas-dahl/angular-cli-e2e-test/builds/13618871
https://gitlab.com/niklas-dahl/angular-cli-e2e-test/blob/master/package.json#L9 should be "test": "ng test --browsers Chrome_no_sandbox",
as I mentioned on my comment above.
oh my bad, yeah it is working now, thanks a lot :D
you're welcome, don't hesitate to ask us any questions :)
hmm the karma test is not terminating.. https://gitlab.com/niklas-dahl/angular-cli-e2e-test/builds/13621811
any idea?
by defaul, karma test runs and watches. To disable watch, you should use this on CI system instead:
$ ng test --browsers Chrome_no_sandbox -w false
@niklas-dahl you should look into this example project, I'm updating to get it run on gitlab-ci, too https://github.com/acme101/angular-hello-world https://gitlab.com/acme101/angular-hello-world
@niklas-dahl gitlab-ci done, check it out: https://gitlab.com/acme101/angular-hello-world/pipelines
Hey, I wanted to use your teracy/angular-cli image to run angular-cli e2e tests.
i did the following steps:
docker run --rm -it -v $(pwd):/opt -w /opt teracy/angular-cli /bin/bash
ng new test123
cd test123
ng e2e
ng e2e
fails with the following error:Any Idea what could be the issue? Thanks!