Closed
Bug 1050562
Opened 10 years ago
Closed 10 years ago
[spartacus] make errors within casper.evaluate() show up in test logs
Categories
(Marketplace Graveyard :: Payments/Refunds, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kumar, Assigned: mstriemer)
Details
(Whiteboard: [qa-][repoman])
When writing spartacus tests you have to sometimes inject javascript into the page. You do this by calling: casper.evaluate(function() { // Execute brave javascript that cannot fail. }); This is great if you write pristine code. If you write code that raises an exception, however, the error will not show up in the test console. LET'S FIX THIS. It is painful and difficult to track down. The most common problem is when you try to access a closure-scope variable (like you would in normal javascript) because that's not allowed within this mutant callback.
Updated•10 years ago
|
Priority: -- → P3
Reporter | ||
Comment 1•10 years ago
|
||
Thanks Dethe! As an example, you could throw an exception within this casper callback https://github.com/mozilla/spartacus/blob/master/tests/helpers.js#L239 and run `grunt uitest --test tests/ui/test-enter-pin-200.js`
Reporter | ||
Comment 2•10 years ago
|
||
oh, heh, I thought you self-assigned the bug when I read the change email :) Thanks still for prioritizing
Comment 3•10 years ago
|
||
Thanks, Kumar, that's helpful. I may take this on once I've closed some other things, if no-one gets to it first.
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → kumar.mcmillan
Assignee | ||
Comment 4•10 years ago
|
||
https://github.com/mozilla/spartacus/commit/7308811135f3e5f4b49e4e23e753e1485912b44b
Assignee: kumar.mcmillan → mstriemer
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•