Closed Bug 583412 Opened 14 years ago Closed 14 years ago

AssertJS has to show the expression value in the failure message

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Keywords: regression, Whiteboard: [mozmill-1.4.2+])

Attachments

(1 file)

Attached patch PatchSplinter Review
Results for tests which are using assertJS are less informative since bug 580620 has been landed. The assert(callback) call has to be enclosed into try/catch and needs its own error string:

old: assert: Failed for 'function () { return eval(expression); }'

new: controller.assertJS: Failed for 'subject.suggestionsDifferent == true'

If everything is ok, please check it in before the next beta. I will not have time before tomorrow. Thanks.
Attachment #461715 - Flags: review?(ctalbert)
Whiteboard: [mozmill-1.4.2?]
Comment on attachment 461715 [details] [diff] [review]
Patch

This looks ok.  We can take something this small on 1.4.2, if it is needed there.
Attachment #461715 - Flags: review?(ctalbert) → review+
(In reply to comment #1)
> This looks ok.  We can take something this small on 1.4.2, if it is needed
> there.

Yes, we need that. Otherwise there is no easy way to see what has been failed by waiting for the expression. It's similar to the change for the waitFor function.

I will take this as an approval for mozmill-1.4.2. Code has been landed on master and the 1.4.2 branch:

http://github.com/mozautomation/mozmill/commit/3b0c937dcb44ac8611b70bc41b4cc5b68af5890a
http://github.com/mozautomation/mozmill/commit/21ea6a36bfccacec23cb4c51e48ea1431c9c5af9
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-1.4.2?] → [mozmill-1.4.2+]
Verified fixed on 1.4.2b3: expression values are now shown in failure messages in output
Status: RESOLVED → VERIFIED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: