build successful but problem with test case
my test is running, a browser opens as localhost but i am not able to view the elements, but while running ionic serve i could able to see all the elements. My terminal shows error
yokeshs-Mac-mini:myApp yokesh$ sudo npm run e2e Password:
@ e2e /Users/yokesh/myApp gulp --gulpfile test/gulpfile.ts --cwd ./ test.build && ./node_modules/protractor/bin/protractor test/protractor.conf.js
[15:40:06] Requiring external module ts-node/register [15:40:11] sourced Ionic's gulpfile @ /Users/yokesh/myApp/gulpfile.js [15:40:11] Using gulpfile ~/myApp/test/gulpfile.ts [15:40:11] Starting 'test.build'... [15:40:11] Starting 'test.clean'... [15:40:11] Deleted /Users/yokesh/myApp/www/build/test [15:40:11] Finished 'test.clean' after 19 ms [15:40:11] Starting 'sass'... [15:40:11] Starting 'fonts'... [15:40:11] Starting 'html'... [15:40:11] Finished 'html' after 40 ms [15:40:11] Finished 'fonts' after 52 ms [15:40:13] Finished 'sass' after 2.02 s [15:40:13] Starting 'test.build.typescript'... [15:40:17] Finished 'test.build.typescript' after 3.94 s [15:40:17] Finished 'test.build' after 5.99 s Using ChromeDriver directly... [launcher] Running 1 instances of WebDriver Spec started Started
MyApp ✗ should have
-
Failures *
- MyApp should have
- Failed: Angular could not be found on the page http://localhost:8100/ : retries looking for angular exceeded
- Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function"
Executed 1 of 1 spec (1 FAILED) in 10 secs.
Failures:
- MyApp should have
1 spec, 1 failure Finished in 10.387 seconds [launcher] 0 instance(s) of WebDriver still running [launcher] chrome #01 failed 1 test(s) [launcher] overall: 1 failed spec(s) [launcher] Process exited with error code 1
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "e2e"
npm ERR! node v4.4.2
npm ERR! npm v2.15.0
npm ERR! code ELIFECYCLE
npm ERR! @ e2e: gulp --gulpfile test/gulpfile.ts --cwd ./ test.build && ./node_modules/protractor/bin/protractor test/protractor.conf.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ e2e script 'gulp --gulpfile test/gulpfile.ts --cwd ./ test.build && ./node_modules/protractor/bin/protractor test/protractor.conf.js'.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp --gulpfile test/gulpfile.ts --cwd ./ test.build && ./node_modules/protractor/bin/protractor test/protractor.conf.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /Users/yokesh/myApp/npm-debug.log yokeshs-Mac-mini:myApp yokesh$
main issue is that while running my test a blank browser opens and closet then this error shoots out
i fixed it i did not change the url in protractor.config.js file
@yokeshvaradhan how did you resolve this issue?
#191