Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

step-6: Error: Expected undefined to be '/phones/nexus-s' #229

Closed
yaojingguo opened this issue Jan 31, 2015 · 8 comments
Closed

step-6: Error: Expected undefined to be '/phones/nexus-s' #229

yaojingguo opened this issue Jan 31, 2015 · 8 comments

Comments

@yaojingguo
Copy link

In step-6, when running npm run protractor, there is the following error:

Failures:

  1) PhoneCat App Phone list view should render phone specific links
   Message:
     Expected undefined to be '/phones/nexus-s'.
   Stacktrace:
     Error: Expected undefined to be '/phones/nexus-s'.
    at /home/jing/code/tutoral/angular-phonecat/test/e2e/scenarios.js:63:35

The fix is to change expect(url.split('#')[1]).toBe('/phones/nexus-s'); to expect(url).toBe('/phones/nexus-s');.

Angular version is 1.3.10. I am using a Ubuntu 14.04 box.

@yaojingguo
Copy link
Author

Step-7 has similar problems.

@yaojingguo
Copy link
Author

Upgrading AngularJS to 1.3.11 solves this problem.

@m31uk3
Copy link

m31uk3 commented May 9, 2015

still a problem with 1.3.15

bower list
bower check-new     Checking for new versions of the project dependencies..
angular-phonecat#0.0.0 /git.repo/angular-phonecat
├── angular#1.3.15 (1.3.16-build.108+sha.fee437f available, latest is 1.4.0-rc.1)
├─┬ angular-animate#1.3.15 extraneous (1.3.16-build.108+sha.fee437f available, latest is 1.4.0-rc.1)
│ └── angular#1.3.15 (latest is 1.4.0-rc.1)
├─┬ angular-mocks#1.3.15 (1.3.16-build.108+sha.fee437f available, latest is 1.4.0-rc.1)
│ └── angular#1.3.15
├─┬ angular-resource#1.3.15 extraneous (1.3.16-build.108+sha.fee437f available, latest is 1.4.0-rc.1)
│ └── angular#1.3.15
├─┬ angular-route#1.3.15 extraneous (1.3.16-build.108+sha.fee437f available, latest is 1.4.0-rc.1)
│ └── angular#1.3.15
├─┬ bootstrap#3.1.1 (latest is 3.3.4)
│ └── jquery#2.1.4
└── jquery#2.1.4
/git.repo/angular-phonecat> ./node_modules/.bin/protractor test/protractor-conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.3:57817/wd/hub
..WARNING - more than one element found for locator By.cssSelector(".phones li a") - the first result will be used
F

Failures:

  1) PhoneCat App Phone list view should render phone specific links
   Message:
     Expected undefined to be '/phones/nexus-s'.
   Stacktrace:
     Error: Expected undefined to be '/phones/nexus-s'.
    at /git.repo/angular-phonecat/test/e2e/scenarios.js:62:35
    at Array.forEach (native)

Finished in 2.673 seconds
3 tests, 6 assertions, 1 failure

Shutting down selenium standalone server.
[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

@m31uk3
Copy link

m31uk3 commented May 9, 2015

removed working directory and rechecked out with:

git clone --depth=14 https://github.com/angular/angular-phonecat.git

somehow everything works now for step 6 and 7

I notice that if you leave karma running during: i.e. git checkout -f step-7 it will fail

However if you kill it an rerun everything tests successful.

@brian-villanueva
Copy link

Still having this problem with 1.3.16

@rockallite
Copy link

Me too. I'm using AngularJS 1.3.16, need expect(url).toBe('/phones/nexus-s'); fix to pass step-6 e2e test.

@Flynsarmy
Copy link

I also needed to change it to expect(url) to make it work.

@ygamretuta
Copy link

confirming aforementioned: change it to expect(url) works for me too

kaiserk pushed a commit to kaiserk/angular-phonecat that referenced this issue Nov 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants