Acabei de ler o capítulo 12 do livro que trata sobre integração contínua com Travis e SauceLabs e estou enfrentando problemas. A aplicação não está completando o build com o Travis. Acompanhando o log consigo perceber que a aplicação sobe sem problemas,
$ node server &
The command "node server &" exited with 0.
3.26s$ protractor config/protractor.js
consign v0.1.2 Initialized in app
+ ./models/Usuario.js
+ ./models/contato.js
+ ./controllers/contato.js
! : .old
+ ./routes/auth.js
+ ./routes/contato.js
! : .old
+ ./routes/index.js
[13:12:15] I/sauce - Using SauceLabs selenium server at http://ondemand.saucelabs.com:80/wd/hub
[13:12:15] I/launcher - Running 1 instances of WebDriver
Express server escutando na port 3000
Mongoose! Conectado em mongodb://localhost/contatooh_test
Mongoose: usuarios.ensureIndex({ login: 1 }, { unique: true, background: true })
Mongoose: contatos.ensureIndex({ email: 1 }, { unique: true, background: true })
Started
contudo falha ao realizar os testes no SauceLabs:
[13:12:18] E/launcher - no such element: Unable to locate element: {"method":"css selector","selector":"*[id="entrar"]"}
(Session info: chrome=48.0.2564.97)
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Linux 3.13.0-83-generic x86)
[13:12:18] E/launcher - NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"*[id="entrar"]"}
(Session info: chrome=48.0.2564.97)
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Linux 3.13.0-83-generic x86)
at WebDriverError (/home/travis/.nvm/versions/node/v5.9.1/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:26:26)
at NoSuchElementError
No vídeo gerado pela plataforma a seguinte mensagem é apresentada: To test against localhost and other locations behind hyour firewall, you’ll need to use Sauce Connect. It’s simple and secure.
Alguma ideia, @flaviohenriquealmeida ?
Repositório GitHub: https://github.com/geisonsn/cac-mean/commits/master
Build Travis: https://travis-ci.org/geisonsn/cac-mean/jobs/168396946