I have two select lists in my app called ‘topic’ and ‘member’.
Based on what I select in topic, member is populated accordingly (using
java script).
eg. If I select ‘subject1’ in topic, member should be populated with the
values ‘prof x’, ‘prof y’ and ‘prof z’.
Can I test that my java script function is populating member with the
correct values in a unit test?
I have two select lists in my app called ‘topic’ and ‘member’.
Based on what I select in topic, member is populated accordingly (using
java script).
eg. If I select ‘subject1’ in topic, member should be populated with the
values ‘prof x’, ‘prof y’ and ‘prof z’.
Can I test that my java script function is populating member with the
correct values in a unit test?
Not really, since your ruby code doesn’t know how to execute
javascript. (I often use the Test.Unit stuff from prototype to write
javascript unit tests)
Not really, since your ruby code doesn’t know how to execute
javascript. (I often use the Test.Unit stuff from prototype to write
javascript unit tests)
Thanks for that Fred.
It’s good to know that I was barking up the wrong tree.
Since reading your post I have been looking at the javascript_test
plugin but still unsure as to how to write a sensible test with it.
I guess I’ll rephrase my question and post it again.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.