开发者

testing the google +1 button using cucumber

开发者 https://www.devze.com 2023-04-02 20:44 出处:网络
How do you test Google +1 using Cucumber? I\'ve tried manually testing the google +1 button by adding the code found here(im using the html5 version)

How do you test Google +1 using Cucumber? I've tried manually testing the google +1 button by adding the code found here(im using the html5 version)

http://code.google.com/apis/+1button/

and it threw an error when I tried it. I 开发者_开发知识库changed the data-href to "http://google.com"(amazing how google.com only has 87 +1s. @_@ well not really surprising, since they don't have a +1 button on the homepage, but I digress) and it now works. So the question is, how do you test it on your local machine?

While I can live with knowing that pressing the plus1 button calls my callbacks, how do I test in cucumber that I liked a local/non-existent page? Is there a testing API for this?

Here's a sample of what I mean in cucumber steps:

When I go to the album "Lamp Girl" page
And I Google +1 the album "Lamp Girl"
Then the album "Lamp Girl" should have 1 like


Surely you're just testing Google's code here? What's the point of having a test for this? What are you afraid could go wrong?

0

精彩评论

暂无评论...
验证码 换一张
取 消