Enhance controller.assertJS to output relevant context for pass/fail states

VERIFIED FIXED

Status

Testing Graveyard
Mozmill
VERIFIED FIXED
9 years ago
2 years ago

People

(Reporter: whimboo, Assigned: whimboo)

Tracking

Details

(Whiteboard: [verified-mozmill-1.2.4][mozmill-doc-complete])

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Created attachment 399092 [details] [diff] [review]
Patch

At the moment assertJS doesn't output any useful information in the output which could be used to track down failures in a test. As more tests you will have as more difficult it is to identify the failing assertJS call. That's why we should change the output string for this function and add the expression itself.

Therefor we could use the same way as we already have for waitForEval. Let's specify a subject if needed which can be used to get access to members.

controller.assertJS("subject.currentStep == 'updatesfound'", update);

In this example currentStep is a member variable of the update instance. If the evaluation fails you will see the following entry in the output pane:

fail :: Controller.assertJS("subject.currentStep == 'updatesfound'")
Attachment #399092 - Flags: review?(mrogers)
(Assignee)

Comment 1

9 years ago
Mikeal, can we please get a process on this bug?
(Assignee)

Comment 2

9 years ago
Updated to Git:
http://github.com/whimboo/mozmill/commit/d6d2822402abc439e1d9cffaa3023a618a54bdc6
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
(Assignee)

Comment 3

9 years ago
Merged to the master.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-1.2.4][mozmill-doc-needed]
(Assignee)

Updated

9 years ago
Blocks: 525189
(Assignee)

Comment 4

9 years ago
No regressions seen so far. All existing assertJS calls work like expected. Marking verified.
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2.4][mozmill-doc-needed] → [verified-mozmill-1.2.4][mozmill-doc-needed]
(Assignee)

Comment 5

8 years ago
Docs are already uptodate.
Whiteboard: [verified-mozmill-1.2.4][mozmill-doc-needed] → [verified-mozmill-1.2.4][mozmill-doc-complete]
(Assignee)

Updated

3 years ago
Attachment #399092 - Flags: review?(mikeal.rogers)
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.