Closed Bug 763056 Opened 12 years ago Closed 9 years ago

Remove controller.assert* methods as they are deprecated due to the assertions module

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ahal, Unassigned, Mentored)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Mozmill has a separate assertions module (see https://github.com/mozautomation/mozmill/blob/master/mozmill/mozmill/extension/resource/modules/assertions.js)

There isn't much reason to keep the controller.assert* methods any longer. They should be removed.
As part of this bug we'll need to go through and update all the tests that use controller.assert* (e.g mutt/mutt/tests/js/controller/dnd_content.js)
Lets do this for version 2.1. First lets see if we can find someone who is interested in doing that.
Blocks: 970594
Whiteboard: [mentor=whimboo][lang=js][mozmill-2.1?]
Whiteboard: [mentor=whimboo][lang=js][mozmill-2.1?] → [mentor=whimboo][lang=js][mozmill-2.1?][good first bug]
You can assign this one to me.
Attached patch bug763056.patch (obsolete) — Splinter Review
This patch removes the deprecated assert functions in controller.js and also the logDeprecatedAssert function.

The logDeprecated (non-assert) is still there because there is still one other use in controller (__defineGetter__).

This patch also corrects the only use in the Mutt tests of the deprecated functions that I was able to find.
Attachment #8405711 - Flags: review?
Thank you for taking this bug, Gilles! I will assign it to you now.
Assignee: nobody → gilles.leblanc
Status: NEW → ASSIGNED
Comment on attachment 8405711 [details] [diff] [review]
bug763056.patch

Review of attachment 8405711 [details] [diff] [review]:
-----------------------------------------------------------------

Adding myself as reviewer for this patch. I will try to do this later today.
Attachment #8405711 - Flags: review? → review?(hskupin)
(In reply to Henrik Skupin (:whimboo) from comment #6)
> Comment on attachment 8405711 [details] [diff] [review]
> bug763056.patch
> 
> Review of attachment 8405711 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Adding myself as reviewer for this patch. I will try to do this later today.

I never know if I should assign you as the reviewer. On one hand you have done all the previous reviews. On the other, maybe I should assign it to someone else so as not to overload you (you always seem to have a pretty long queue).
(In reply to Gilles Leblanc from comment #7)
> > Adding myself as reviewer for this patch. I will try to do this later today.
> 
> I never know if I should assign you as the reviewer. On one hand you have
> done all the previous reviews. On the other, maybe I should assign it to
> someone else so as not to overload you (you always seem to have a pretty
> long queue).

As of now we don't really have someone else for reviews in the mozmill component, and I'm happy to do those whenever possible. So just keep them going! :)
Comment on attachment 8405711 [details] [diff] [review]
bug763056.patch

Review of attachment 8405711 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great. Just a tiny thing you will have to follow-up before we can get this landed. Thanks Gilles!

::: mutt/mutt/tests/js/testController/testDndContentChrome.js
@@ +21,4 @@
>    controller.waitForPageLoad();
>  
>    let div = new elementslib.ID(controller.tabs.activeTab, "test-div");
> +  assert.ok(div.getNode(), "Found test-div.");

I would change this to 'assert.ok(div.exists(), ...)'.
Attachment #8405711 - Flags: review?(hskupin) → review+
Attached patch bug763056b.patchSplinter Review
Changed the assert in testDndContentChrome.js from .getNode to .exists following review.
Attachment #8405711 - Attachment is obsolete: true
Attachment #8407264 - Flags: review?(hskupin)
Comment on attachment 8407264 [details] [diff] [review]
bug763056b.patch

Review of attachment 8407264 [details] [diff] [review]:
-----------------------------------------------------------------

Wonderful! All fine now, and I will check-in your patch in a moment.
Attachment #8407264 - Flags: review?(hskupin) → review+
Landed on master as part of the mozmill 2.1 release:
https://github.com/mozilla/mozmill/commit/fe59172863b706d8512a7b7fbdc44de177f51dfc

Good to see that those methods are finally gone. Thanks Gilles!
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [mentor=whimboo][lang=js][mozmill-2.1?][good first bug] → [mentor=whimboo][lang=js][mozmill-2.1][good first bug]
Sorry, but I had to revert this landing to get back a working testrun for our Mozmill tests due to bug 989298. We will re-land once we branched for the next Mozmill version, or got the mozmill tests fixed.

https://github.com/mozilla/mozmill/compare/da5d0291712b...42eb58bc1a12
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [mentor=whimboo][lang=js][mozmill-2.1][good first bug] → [mentor=whimboo][lang=js][mozmill-2.2?][good first bug]
No longer blocks: 970594
Mentor: hskupin
Whiteboard: [mentor=whimboo][lang=js][mozmill-2.2?][good first bug] → [lang=js][mozmill-2.2?][good first bug]
Mozmill will reach its end of life soon. We are currently working on getting all the tests for Firefox ported to Marionette. For status updates please see bug 1080766.
Assignee: gilles.leblanc → nobody
Status: REOPENED → RESOLVED
Closed: 10 years ago9 years ago
Resolution: --- → WONTFIX
Whiteboard: [lang=js][mozmill-2.2?][good first bug]
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: