Closed Bug 629748 Opened 15 years ago Closed 15 years ago

controller.radio() reporting failure even on success

Categories

(Testing Graveyard :: Mozmill, defect)

x86_64
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ahal, Assigned: ahal)

Details

(Whiteboard: [mozmill-1.5.2+][mozmill-2.0+])

Attachments

(3 files, 2 obsolete files)

STR: 1) Run the attached test in either hotfix-1.5.2 or master 2) Observe that the radio button is getting selected properly, but we still report a failure I noticed this while doing the controller API refactor. It looks like there is something wrong with the waitFor method used to check that the radio button got selected: https://github.com/mozautomation/mozmill/blob/master/mozmill/mozmill/extension/resource/modules/controller.js#L628
Whiteboard: [mozmill-1.5.3?][mozmill-2.0?]
This patch seems to fix things. The 'selected' property doesn't exist for html radio buttons. I haven't tested this out on XUL radios yet, but I think it should work for that case too. I'll check it out this afternoon and assign a review.
The right patch this time. /me makes mental note to organize old patches lying around.
Attachment #507961 - Attachment is obsolete: true
Test added.
Attachment #507963 - Attachment is obsolete: true
Attachment #508010 - Flags: review?(jhammel)
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Comment on attachment 508010 [details] [diff] [review] Patch 1.1 - Fixes waitFor method to use checked for html input radio buttons looks good; nice catch!
Attachment #508010 - Flags: review?(jhammel) → review+
Would this test be safe enough for Mozmill 1.5.2? We have a test so the risk to break things will be low. It could fairly influence my work for the add-ons manager where I have to use radio buttons. Clint or Heather, can you please make the call? Thanks.
Whiteboard: [mozmill-1.5.3?][mozmill-2.0?] → [mozmill-1.5.2?][mozmill-2.0?]
As I was about to comment, we discussed this and the change was deemed small enough to take for Mozmill 1.5.2. It has the same behaviour as before, except that now html radio buttons will also work. Not just XUL. So the add-ons tests should be unaffected (the test covers both XUL and HTML radio buttons). Feel free to back out if there are problems, but I don't see how that is possible. Master: https://github.com/mozautomation/mozmill/commit/d5b1a4f3d1aea6829a5123ff631eb99e6c7bbf9e hotfix-1.5.2: https://github.com/mozautomation/mozmill/commit/f91fba78d882841fd93d9ff48d085962c00f0e8b
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-1.5.2?][mozmill-2.0?] → [mozmill-1.5.2+][mozmill-2.0+]
Andrew, while this is fixed, the test is broken. It references the mozmill-tests repository, which clearly has to be fixed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
It requires the prefs shared module as that is one of the only places where I can find chrome level XUL radio buttons. I don't think it is a good idea to re-write that existing code just so that this test can be independent of the shared modules. (I do think that manipulating the prefs dialog is something that should be apart of mozmill core, but that's another issue ;)) To get this test to work you just need to change the include to your local share-modules directory. Seeing as half the tests in that directory were broken anyway, I figured that it wasn't a huge deal. I don't mind removing the test completely, but I don't think trying to manipulate the prefs dialog without shared-modules is a good use of time.
You don't need that. Just use mozmill.getPreferencesController() to open the preferences dialog.
Comment on attachment 515798 [details] [diff] [review] Patch 1.2 - Removes need for shared modules Not sure how I feel about the sleep(2000); do we know what that is for? does it work without it? Other than that, looks good, r=me
Attachment #515798 - Flags: review?(jhammel) → review+
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
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: