Closed Bug 1127823 Opened 11 years ago Closed 11 years ago

Make use of unique parameter types in close_all() of Windows class

Categories

(Testing :: Firefox UI Tests, defect)

Version 2
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla38

People

(Reporter: whimboo, Assigned: galgeek)

Details

Attachments

(1 file)

51 bytes, text/x-github-pull-request
whimboo
: review+
chmanchester
: feedback+
Details | Review
This is from the discussion on this PR: https://github.com/mozilla/firefox-ui-tests/pull/50/files#r23735855 As of now the close_all() method allows window exceptions being passed in as handles or BaseWindow. Chris mentioned his concerns about this because it can be disruptive. So we should figure out what we want to do here. I'm happy to let this library and especially this method work with BaseWindow instances. So usually all of our tests make use of those. Handles shouldn't be touched at all. And in the unit tests we can simply create a BaseWindow class from a handle to push it into this method. Chris, would that be a proper solution for you?
Flags: needinfo?(cmanchester)
Sorry, I wasn't clear. I find APIs that take a list or a single element and convert it to a list internally really problematic. I know from past discussions that this is pretty common in Python APIs, and I'm probably in a minute minority on this point. I just mentioned it in case you were sympathetic and were OK with just always passing a list.
Flags: needinfo?(cmanchester)
Well, I have no real objection here, so I'm happy to go the route what you propose. Barbara, maybe you can work on a fix today?
Summary: Make use of unique parameter types in Windows class (especially close_all) → Make use of unique parameter types in close_all() of Windows class
As I’ve commented on github, I am sympathetic both to Henrik's suggestion that close_all should expect a particular parameter type and to Chris’s distaste for APIs that convert a single element to a list, so I've implemented both here, in case that's what everybody wants after all.
Assignee: nobody → galgeek
Attachment #8557540 - Flags: review?(hskupin)
Attachment #8557540 - Flags: feedback?(cmanchester)
I've updated the github PR per Henrik's feedback there.
Comment on attachment 8557540 [details] [review] github_pull_request.txt I think this is an improvement, thanks!
Attachment #8557540 - Flags: feedback?(cmanchester) → feedback+
I've again updated the github PT per Henrik's feedback there.
Attachment #8557540 - Flags: review?(hskupin) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Product: Mozilla QA → Testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: