-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Test is passing without running when putting ".only" on "it" #3045
Comments
Hey, I downloaded your testapp but I'm not reproducing the problem. Could you clone a fresh one and try it again? |
It happens only when putting .only on the " it", and then running the test.
|
Yes I added only to the |
Got it.
|
I'm on 3.1.1, selenium standalone version 2.52.0, chrome version 2.21 |
Tried on a clean copy - it is reproduced. [launcher] Process exited with error code 1 /usr/local/lib/node_modules/protractor/node_modules/q/q.js:155 Any idea? |
Ok - it seems an issue with node (I'm using 0.10.29), I'll upgrade it. |
I upgraded node (5.5.0) and protractor (3.1.1) and it still happens (running on mac, BTW). |
After doing a re-upgrade of all elements, the issue stopped happening. Now that we are with the same (latest) of node, protractor, webdriver and chrome - try to change mocha version on the package.json file and see if it reproduced for you. |
Ok, I'm gonna switch to OSX and see what happens |
Still cannot reproduce on OSX, mocha 2.4.1, node 5, etc |
I also am having this same issues (Windows 10). It "runs" the test, but never fails the assertion. Using mocha, chai, dirty chai, and chai as promised. Node version: 4.1.0
|
@cnishina Can you reproduce this issue? @benbracha's test app is at: https://github.com/benbracha/protractor-test-app |
I was able to get this into a weird state where
but now that I am trying again, I can no longer reproduce this. @benbracha when this error is happening, what is going on with |
@cnishina , thanks for checking this up. |
@cnishina I can still reproduce it, and the webdriver-manager logs doesn't shout anything strange..
|
Hi, I have same issues with it.only since mocha 2.4.1. Protractor version : 3.3.0 I updated original mocha issue : mochajs/mocha#2157 |
Before mocha 2.4.1 "it.only" function used "global.it" (protractor/lib/frameworks/mocha.js), so wrapping "global.it.only" was not necessary. But since mocha 2.4.1, "it.only" function no longer use "global.it" but the original "it" function (lib/interfaces/bdd.js - commit with change), so now wrapping "global.it.only" is necessary . |
Thanks @noisette44 for the followup. I hope protractor guys will pick that soon.. |
I've been able to put together a minimal test case and fix for this: gist. Note that this does not require The basic idea for the fix is to remove the line that sets The test should be able to be adapted as a regression test, but will have to be run separately from other tests because it has to call I also tried downgrading Mocha to 1.x.x and running with the fixed version, and the double-wrapping inherent in using the wrapped |
This kind of relates to that other thing I just did with Jasmine, so I'm going to take this up. Thanks for the detailed repro and test! We'll fix this for the next release. |
Fixes angular#3045. Since mocha 2.4.1, we should be wrapping global.it.only.
Fixes #3045. Since mocha 2.4.1, we should be wrapping global.it.only.
Hey,
Since mocha 2.4.1 it seems like test code doesn't wait for page to sync anymore.
Meaning, this was working in the past:
But since mocha 2.4.1 the click doesn't happen, and test is passed (console log is shown).
Since mocha 2.4.1 we must use callbacks on the promises, which make tests writing a lot harder and complicated:
I opened an issue for mocha, but I think it should get some help / attention:
mochajs/mocha#2157
Thanks
Bug report
The text was updated successfully, but these errors were encountered: