如何在Angular 7中运行e2e测试?

时间:2018-12-24 09:29:54

标签: angular angular-e2e

当我跑步时:

# first, create style
black_cell = s.add_style :bg_color => "FF", :fg_color => "00", :sz => 14, :alignment => { :horizontal=> :center }
red_cell = s.add_style :bg_color => "FF", :fg_color => "FF0000", :sz => 20, :alignment => { :horizontal=> :center }

# second create array to manage style, if many element you can do loop the array instead using v1, v2, v3
arr1 = Array.new
sv = v1 >= 0 ? black_cell : red_cell
arr1 << sv 
sv = v2 >= 0 ? black_cell : red_cell
arr1 << sv 
sv = v3 >= 0 ? black_cell : red_cell
arr1 << sv 

# third create the row
current_row = sheet.add_row [v1, v2, v3], :style => arr1

然后终端输出:

ng new ng-demo
cd ng-demo
ng e2e

我在浏览器中打开http://localhost:4200/,网页是正确的,但是没有任何输出,例如:** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** Date: 2018-12-24T09:11:46.656Z Hash: c327cfcccf9319a7f705 Time: 8735ms chunk {main} main.js, main.js.map (main) 9.76 kB [initial] [rendered] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 223 kB [initial] [rendered] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered] chunk {styles} styles.js, styles.js.map (styles) 16.3 kB [initial] [rendered] chunk {vendor} vendor.js, vendor.js.map (vendor) 3.43 MB [initial] [rendered] [17:11:46] I/file_manager - creating folder /Users/xxx/git/ng-demo/node_modules/protractor/node_modules/webdriver-manager/selenium [17:11:46] I/config_source - curl -o/Users/xxx/git/ng-demo/node_modules/protractor/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/ ℹ 「wdm」: Compiled successfully. 。一段时间后,终端会引发错误:

should display welcome message ...

我的环境在这里:

events.js:167
  throw er; // Unhandled 'error' event
  ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
    at Request.onRequestError (/Users/xxx/git/ng-demo/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:187:15)
    at TLSSocket.socketErrorListener (_http_client.js:391:9)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

我错过了什么吗?

0 个答案:

没有答案