AssertJS has to show the expression value in the failure message

VERIFIED FIXED

Status

Testing Graveyard
Mozmill
VERIFIED FIXED
8 years ago
a year ago

People

(Reporter: whimboo, Assigned: whimboo)

Tracking

({regression})

Trunk
regression

Details

(Whiteboard: [mozmill-1.4.2+])

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Created attachment 461715 [details] [diff] [review]
Patch

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)
(Assignee)

Updated

8 years ago
Whiteboard: [mozmill-1.4.2?]

Comment 1

8 years ago
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+
(Assignee)

Comment 2

8 years ago
(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
Last Resolved: 8 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.