-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Calling pending
in a spec marks the spec as failed.
#2454
Comments
I'm experiencing this too. It would be good to get resolved so I can have accurate reports to delineate tests actually failing and tests being skipped. |
Someone please fix this!! In the meantime, to mark as pending without using |
+1 That's a pretty cool jasmine2 feature and it's a pity that we cannot use it with protractor. Is anyone taking care of this? |
+1 |
+1 this is really anoying! I want to be able to put tests to pending with correct messages in log. |
As a workaround I introduced an own pending to use in my protractor tests (overwriting the jasmine pending), maybe that is helpful for somebody else as a workaround:
Usage: |
+1 |
Still experiencing this, meanwhile the workaround works like a charm @bruderol thanks! |
Any updates on this issue? |
Also feeling some burn here +1 |
+1 also happening here. :( |
+1 |
1 similar comment
+1 |
In the meantime I found out that there is a possibility to set comments on tests ignored with
Usage: |
also experiencing this, is this issue currently being worked on? |
+1. Also faced with this issue |
+1 Should be priorize, this is a very usefull feature. |
Closing in favor of angular/jasminewd#32 Note that this is pending a change to Jasmine. |
I extended the jasmine-spec-reporter (https://www.npmjs.com/package/jasmine-spec-reporter)
Specs marked as pending are displayed as pending in the report. |
This hack works for me while we don't have angular/jasminewd#32 // In protractor `onPrepare`
jasmine.Suite.prototype.pend = function (message) {
this.markedPending = true;
this.children.forEach(spec => spec.pend(message));
}; xdescribe('Foo', function(){
// bar
}).pend('reason'); |
Am new to protractor it('Step 1:', function () {
Please some one help me. thanks in advance. |
Short workaround: |
This issue should be fixed in jasmine 2.9 (See jasmine/jasmine@f4caf27). However, protractor is still using jasmine 2.8. |
I have the latest version of Jasmine v3.3.0 and still get this behaviour... 😕 |
If you don't use Protractor 6.x, then, whichever version of Jasmine you got installed, you will use the version used by |
@tymfear oh, sorry don't test it with protractor. It's about unit tests. |
I have used this implementation and it's awesome! Can you please suggest something. |
Hi, thank you for your support. I've updated to Protractor 7.0.0 and Jasmine 3.6.3. |
This does not work for me; however, it could be the way I'm implementing it. I put the code under the Protractor config file, "onPrepare()" function... and I am getting two "results" in one window. Failures:
1 spec, 1 failure
Executed 0 of 1 spec INCOMPLETE (1 PENDING) in 0.012 sec. |
I took the implementation provided by sgibson21 and created a new project with Jasmine 3.6.3 and Protractor 7.0.0. let htmlReporter = new Jasmine2HtmlReporter({ exports.config = { onPrepare() {
} Following is what my specs look like
}); it('shoud pass!', function() { it('shoud fail!', function() { });` Following is what the XML report looks like - - -<testcase time="0.001" name="shoud be skipped because we are using "x" in front of the spec" classname="Testing custom results"> - - - - (C:\regUSA\Utilities\ProtractorTest\spec.js:18:17)
at C:\regUSA\Utilities\ProtractorTest\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\regUSA\Utilities\ProtractorTest\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\regUSA\Utilities\ProtractorTest\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\regUSA\Utilities\ProtractorTest\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\regUSA\Utilities\ProtractorTest\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\regUSA\Utilities\ProtractorTest\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\regUSA\Utilities\ProtractorTest\node_modules\selenium-webdriver\lib\promise.js:2974:25)
at C:\regUSA\Utilities\ProtractorTest\node_modules\selenium-webdriver\lib\promise.js:668:7]]> ` |
To skip test block programmatically, please use example:
|
See the attached testcase
https://gist.github.com/sveneh/9c589d321e6fc31f7460
When I run this in protractor@2.1.0 using jasmine@2.3.1 I get this:
running the same spec in pure jasmine@2.3.1:
Protractor should not fail specs that are marked as pending.
The text was updated successfully, but these errors were encountered: