[rspec-users] Presentation Testing and CSS ids
Zach Dennis
zach.dennis at gmail.com
Mon Mar 9 18:01:10 EDT 2009
On Mon, Mar 9, 2009 at 12:08 PM, James Byrne <lists at ruby-forum.com> wrote:
> Zach Dennis wrote:
>
>> In my experience relying on the syntactic details of the page is
>> extremely brittle and cumbersome. ... Some tags have both syntactic
>> and semantic meaning, such as forms, labels, fieldsets, and anchor tags.
>>
>
> Is it "brittle" to test for specific css selectors that are tied to page
> details?
I think it depends on what details you're tying them to. :)
> A typical case is where one has a button to drive in webrat
> and instead of using the button text we use the associated id value
> instead.
Does the id have meaning? Or is it something that communicates nothing
about what it is? ie:
click_button "add_new_item"
vs.
click_button "foobar
--
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com
More information about the rspec-users
mailing list