[Windmill-dev] Controller naming

Matthew Eernisse mde at osafoundation.org
Thu Oct 11 09:51:43 PDT 2007


Mikeal,

The reason we went with the redundant naming convention of 
"asserts.assertX" is because you ended up with a bunch of asserts using 
JavaScript reserved keywords as object property names.

This is not just a bad idea from code cleanliness perspective, but 
causes fatal syntax errors in IE.

Rather than having an inconsistent naming convention for asserts, we 
went with the redundant convention. I think in the long run this is way 
less confusing for people, as ultimately all the assserts are available 
for anyone to use irrespective of whether they originated as 
XUnix-compatible ones, or Windmill-native ones.

Hope that makes sense.


Matthew


Mikeal Rogers wrote:
> Rather than try to explain what i would like the jum to do to stay 
> compatible and go back and forth about how much work it is I just put 
> together a patch.
> 
> 
> I tested it and after modifying the cosmo tests they all seem to run fine.
> 
> The only thing I couldn't test was the jum integration, i don't have any 
> tests to run through that lying around. But since i basically just 
> ripped off mde's code to assign all the functions in a hash to an object 
> I don't see why it wouldn't work.
> 
> This is mostly Adam's code I'm messing with so he'll have to look it 
> over. But we have to end this discussion in order to release 0.2 whether 
> we take the patch and go in this direction or not.
> 
> -Mikeal
> 
> On Oct 11, 2007, at 12:35 AM, Adam Christian wrote:
> 
>> Wait for mde to reply, I can't remember what the reasons were so there 
>> isn't really any point in me arguing. I know we had two options and we 
>> went with the current one for a reason.
>>
>> The forNotTitle has now been renamed and made a system only function 
>> resulting from its specific use case for the the page load, a more 
>> generic one will be added at a later date.
>>
>> On Oct 11, 2007, at 12:30 AM, Mikeal Rogers wrote:
>>
>>> Whoops, didn't hit reply all.
>>>
>>> -Mikeal
>>>
>>> On Oct 11, 2007, at 12:29 AM, Mikeal Rogers wrote:
>>>
>>>>
>>>> On Oct 10, 2007, at 11:37 PM, Adam Christian wrote:
>>>>
>>>>> Mikeal, the whole asserts thing is there and redundant due to a 
>>>>> naming convention mde needed for developing the jsTests, we had a 
>>>>> long debate about it and this really was the best solution.. 
>>>>> however at the moment I can't remember the details, mde?
>>>>
>>>> No, the solution was to do things like asserts.text, and mde was 
>>>> going to point jum.assertsBlah stuff at the proper windmill asserts.
>>>>
>>>> We never agreed to bend the windmill controller naming convention to 
>>>> look like xUnit.
>>>>
>>>>>
>>>>> The waits.forNotTitle is useful because it allows you to provide a 
>>>>> HTML title, and to wait until it changes to something else.. it's 
>>>>> good for moving to a new page and we use it in the loading code to 
>>>>> wait to set a listener until the testWindow title is no longer 
>>>>> "Windmill Testing Framework"
>>>>
>>>> Ok, that totally makes sense, I was just really confused by the 
>>>> name. Now that I look at it, it's not even the name, is that when I 
>>>> read it he "Not" part stands out so much it confuses me. But 
>>>> whatever, it totally makes sense after explaining it. Maybe I'll 
>>>> update the WindmillBook to be a bit more descriptive.
>>>>
>>>>>
>>>>> Adam
>>>>>
>>>>> On Oct 10, 2007, at 10:09 PM, Mikeal Rogers wrote:
>>>>>
>>>>>> I was looking through the controller documentation and noticed 
>>>>>> some really nasty looking names.
>>>>>>
>>>>>> I know it's a pain in the ass to change these, but we've gotta do 
>>>>>> this before we release 0.2 if we're going to do it.
>>>>>>
>>>>>> I've already committed to not making any public API changes until 
>>>>>> 0.3, so this will have to go in tomorrow 0.2 before people invest 
>>>>>> in them any more.
>>>>>>
>>>>>> http://windmill.osafoundation.org/trac/wiki/BookChapter-4-WritingTests#AvailableMethods 
>>>>>>
>>>>>>
>>>>>> waits.forNotTitle -- maybe this one is fine, i just don't 
>>>>>> understand it
>>>>>>
>>>>>> The entire assert namespace is redundant
>>>>>> asserts.assertText -> asserts.text
>>>>>> asserts.assertNode -> asserts.node
>>>>>> asserts.assertValue -> asserts.value
>>>>>> asserts.assertSelected -> asserts.selected
>>>>>> asserts.assertChecked -> asserts.checked
>>>>>> asserts.assertProperty -> asserts.property
>>>>>> asserts.assertImageLoaded -> asserts.imageLoaded
>>>>>>
>>>>>> What does everyone else think?
>>>>>>
>>>>>> -Mikeal
>>>>>> _______________________________________________
>>>>>> Windmill-dev mailing list
>>>>>> Windmill-dev at osafoundation.org
>>>>>> http://lists.osafoundation.org/mailman/listinfo/windmill-dev
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Windmill-dev mailing list
>>> Windmill-dev at osafoundation.org
>>> http://lists.osafoundation.org/mailman/listinfo/windmill-dev
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Windmill-dev mailing list
> Windmill-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/windmill-dev



More information about the Windmill-dev mailing list