Skip to content

Instantly share code, notes, and snippets.

@hc3
Created August 24, 2016 15:53
Show Gist options
  • Save hc3/c3f550ce81d1e236bca4f0b274f1360f to your computer and use it in GitHub Desktop.
Save hc3/c3f550ce81d1e236bca4f0b274f1360f to your computer and use it in GitHub Desktop.
erro
Running "protractor:chrome" (protractor) task
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.104:36105/wd/hub
Products View
CREATE Products
[127.0.0.1:52874] CONNECTED
GET /api/products 200 26ms - 2b
1) "before each" hook for "should create a product"
READ Products
[127.0.0.1:52874] DISCONNECTED
GET /products 200 9ms
GET /api/products 304 4ms
2) should have the newly created product
GET /products 304 6ms
GET /api/products 304 2ms
3) should truncate long descriptions to 100 chars
UPDATE products
GET /products 304 1ms
GET /api/products 304 3ms
4) "before each" hook for "should update the title"
DELETE products
GET /products 304 1ms
GET /api/products 304 8ms
5) should be able to delete existing product
0 passing (6s)
5 failing
1) Products View CREATE Products "before each" hook for "should create a product":
NoSuchElementError: No element found using locator: by.buttonText("New Product")
at new bot.Error (node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
at node_modules/protractor/lib/element.js:694:15
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at goog.defineClass.notify (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25)
at promise.Promise.notify_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12)
at Array.forEach (native)
at promise.Promise.notifyAll_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15)
at goog.async.run.processWorkQueue (node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error
at ElementArrayFinder.applyAction_ (node_modules/protractor/lib/element.js:392:21)
at self.(anonymous function) [as click] (node_modules/protractor/lib/element.js:76:19)
at self.(anonymous function) [as click] (node_modules/protractor/lib/element.js:721:11)
at Context.<anonymous> (e2e/products/products.spec.js:14:45)
at node_modules/selenium-webdriver/testing/index.js:144:19
at new promise.Promise (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:368:5)
at controlFlowExecute (node_modules/selenium-webdriver/testing/index.js:129:14)
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at promise.ControlFlow.runEventLoop_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1729:8)
at eval (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2043:12)
at goog.async.run.processWorkQueue (node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
From: Task: Products View CREATE Products "before each" hook
at Context.ret (node_modules/selenium-webdriver/testing/index.js:128:10)
2) Products View READ Products should have the newly created product:
Error: Index out of bound. Trying to access element at index: 0, but there are only 0 elements that match locator by.repeater("product in products").column("product.title")
at node_modules/protractor/lib/element.js:257:15
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at goog.defineClass.notify (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25)
at promise.Promise.notify_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12)
at Array.forEach (native)
at promise.Promise.notifyAll_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15)
at goog.async.run.processWorkQueue (node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error
at ElementArrayFinder.applyAction_ (node_modules/protractor/lib/element.js:392:21)
at self.(anonymous function) [as getText] (node_modules/protractor/lib/element.js:76:19)
at self.(anonymous function) [as getText] (node_modules/protractor/lib/element.js:721:11)
at Context.<anonymous> (e2e/products/products.spec.js:48:73)
at node_modules/selenium-webdriver/testing/index.js:144:19
at new promise.Promise (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:368:5)
at controlFlowExecute (node_modules/selenium-webdriver/testing/index.js:129:14)
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at promise.ControlFlow.runEventLoop_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1729:8)
at eval (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2043:12)
at goog.async.run.processWorkQueue (node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: Products View READ Products should have the newly created product
at Context.ret (node_modules/selenium-webdriver/testing/index.js:128:10)
at node_modules/selenium-webdriver/testing/index.js:80:5
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at goog.defineClass.notify (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25)
at promise.Promise.notify_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12)
at Array.forEach (native)
3) Products View READ Products should truncate long descriptions to 100 chars:
Error: Index out of bound. Trying to access element at index: 0, but there are only 0 elements that match locator by.repeater("product in products").column("product.description")
at node_modules/protractor/lib/element.js:257:15
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at goog.defineClass.notify (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25)
at promise.Promise.notify_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12)
at Array.forEach (native)
at promise.Promise.notifyAll_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15)
at goog.async.run.processWorkQueue (node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error
at ElementArrayFinder.applyAction_ (node_modules/protractor/lib/element.js:392:21)
at self.(anonymous function) [as getText] (node_modules/protractor/lib/element.js:76:19)
at self.(anonymous function) [as getText] (node_modules/protractor/lib/element.js:721:11)
at Context.<anonymous> (e2e/products/products.spec.js:53:79)
at node_modules/selenium-webdriver/testing/index.js:144:19
at new promise.Promise (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:368:5)
at controlFlowExecute (node_modules/selenium-webdriver/testing/index.js:129:14)
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at promise.ControlFlow.runEventLoop_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1729:8)
at eval (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2043:12)
at goog.async.run.processWorkQueue (node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: Products View READ Products should truncate long descriptions to 100 chars
at Context.ret (node_modules/selenium-webdriver/testing/index.js:128:10)
at node_modules/selenium-webdriver/testing/index.js:80:5
at promise.ControlFlow.runInFrame_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at goog.defineClass.notify (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25)
at promise.Promise.notify_ (node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12)
at Array.forEach (native)
4) Products View UPDATE products "before each" hook for "should update the title":
AssertionError: expected 0 to equal 1
+ expected - actual
-0
+1
From: Task: Products View UPDATE products "before each" hook
at Context.ret (node_modules/selenium-webdriver/testing/index.js:128:10)
5) Products View DELETE products should be able to delete existing product:
AssertionError: expected 0 to equal 1
+ expected - actual
-0
+1
From: Task: Products View DELETE products should be able to delete existing product
at Context.ret (node_modules/selenium-webdriver/testing/index.js:128:10)
Shutting down selenium standalone server.
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 failed 5 test(s)
[launcher] overall: 5 failed spec(s)
[launcher] Process exited with error code 1
>>
Warning: Tests failed, protractor exited with code: 1 Use --force to continue.
Aborted due to warnings.
Execution Time (2016-08-24 12:50:58 UTC-3)
loading tasks 226ms ▇▇ 1%
db:clean 407ms ▇▇▇ 2%
concurrent:test 5.8s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 32%
postcss:dist 559ms ▇▇▇▇▇ 3%
express:dev 1.5s ▇▇▇▇▇▇▇▇▇▇▇▇ 8%
protractor:chrome 9.5s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 52%
Total 18.3s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment