|
Hi,
I need to use resurce plugin in geb test, to test something like iconoFavorito.attr('src') == resource(dir:"images",file:"fav-disabled.png") Is it posible? Thanks --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi KNO,
That doesn't sound like a very good test. You're relying on functionality from another plugin for your test infrastructure. A good test would be to hard code the url you are comparing to, to ensure your site actually works :) Cheers, Antony On 22 August 2012 09:03, KNO <[hidden email]> wrote: > Hi, > I need to use resurce plugin in geb test, to test something like > iconoFavorito.attr('src') == resource(dir:"images",file:"fav-disabled.png") > > Is it posible? > > Thanks > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > -- ________________________________ ꜽ . antony jones . http://www.enzy.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Antony,
I'm trying test the change of an image src via ajax, so I don't know other way to test it. I think I'll have another problem: how to wait to image src change... The image is there, so I can't wait for it... Any ideas? 2012/8/22 Antony Jones <[hidden email]>: > Hi KNO, > > That doesn't sound like a very good test. You're relying on > functionality from another plugin for your test infrastructure. > > A good test would be to hard code the url you are comparing to, to > ensure your site actually works :) > > Cheers, > Antony > > On 22 August 2012 09:03, KNO <[hidden email]> wrote: >> Hi, >> I need to use resurce plugin in geb test, to test something like >> iconoFavorito.attr('src') == resource(dir:"images",file:"fav-disabled.png") >> >> Is it posible? >> >> Thanks >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > > > -- > ________________________________ > ꜽ . antony jones . http://www.enzy.org > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi KNO,
So something like given: iconoFavorito.attr('src') == '/my/url/a' when: button.click() then: waitFor { iconoFavorito.attr('src') == '/my/url/b' } Assuming that there is a physical trigger for your ajax url change. If not, add your original assertion to the at {} block of the page/module you are testing, and simply waitFor {} the state change. Cheers, Antony On 22 August 2012 13:51, KNO <[hidden email]> wrote: > > I'm trying test the change of an image src via ajax, so I don't know > other way to test it. > I think I'll have another problem: how to wait to image src change... > The image is there, so I can't wait for it... > Any ideas? -- ________________________________ ꜽ . antony jones . http://www.enzy.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
The waitFor seems not to work, the src does,not change at all. In a
manual test it change (and very fast). 2012/8/23 Antony Jones <[hidden email]>: > Hi KNO, > > So something like > > given: > iconoFavorito.attr('src') == '/my/url/a' > > when: > button.click() > > then: > waitFor { > iconoFavorito.attr('src') == '/my/url/b' > } > > Assuming that there is a physical trigger for your ajax url change. If > not, add your original assertion to the at {} block of the page/module > you are testing, and simply waitFor {} the state change. > > Cheers, > Antony > > On 22 August 2012 13:51, KNO <[hidden email]> wrote: >> >> I'm trying test the change of an image src via ajax, so I don't know >> other way to test it. >> I think I'll have another problem: how to wait to image src change... >> The image is there, so I can't wait for it... >> Any ideas? > > > > -- > ________________________________ > ꜽ . antony jones . http://www.enzy.org > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
