Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build successful but problem with test case #73

Closed
yokeshvaradhan opened this issue Apr 16, 2016 · 3 comments
Closed

build successful but problem with test case #73

yokeshvaradhan opened this issue Apr 16, 2016 · 3 comments

Comments

@yokeshvaradhan
Copy link

yokeshvaradhan commented Apr 16, 2016

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


- 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"
F


  •                Failures                    *
    

  1. 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:

  1. MyApp should have
    Message:
    Failed: Angular could not be found on the page http://localhost:8100/ : retries looking for angular exceeded
    Stack:
    Error: Angular could not be found on the page http://localhost:8100/ : retries looking for angular exceeded
    at /Users/yokesh/myApp/node_modules/protractor/built/protractor.js:680:17
    at Promise.invokeCallback_ (/Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14)
    at TaskQueue.execute_ (/Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14)
    at TaskQueue.executeNext_ (/Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2773:21)
    at /Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2652:27
    at /Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
    at process._tickCallback (node.js:369:9)
    From: Task: Run beforeEach in control flow
    at Object. (/Users/yokesh/myApp/node_modules/protractor/node_modules/jasminewd2/index.js:81:14)
    From asynchronous test:
    Error
    at Suite. (/Users/yokesh/myApp/www/build/test/app.e2e.js:2:5)
    at Object. (/Users/yokesh/myApp/www/build/test/app.e2e.js:1:1)
    at Module.compile (module.js:409:26)
    at Object.Module.extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module.load (module.js:300:12)
    Message:
    Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function"
    Stack:
    Error: Failed: Error while waiting for Protractor to sync with the page: "window.getAllAngularTestabilities is not a function"
    at /Users/yokesh/myApp/node_modules/protractor/node_modules/jasminewd2/index.js:101:16
    at Promise.invokeCallback
    (/Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14)
    at TaskQueue.execute
    (/Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14)
    at TaskQueue.executeNext
    (/Users/yokesh/myApp/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2773:21)

1 spec, 1 failure
Finished in 10.387 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 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

@yokeshvaradhan
Copy link
Author

i fixed it i did not change the url in protractor.config.js file

@bringking
Copy link

@yokeshvaradhan how did you resolve this issue?

@lathonez
Copy link
Owner

#191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants