ruby on rails - Testing a web application's Facebook integration with Cucumber -


I want to use the cab with Cabura to test the Facebook registration process of my Rail application by executing this scenario. Javascript scenario: Connect the account when I go to the home page and I press "Connect to my Facebook account" and I fill out "test @ address" for "email" I fill out "test" and "password" and I press "login" and I suppress "Allow", then I should be on the dashboard page

How do people connect with the problem of browser-based Facebook integration testing? A web search changes only a few blog posts that meet the graph API, and they start thinking about applying only a pre-condition that already sets the environment representing the log-in user in Facebook.

To know some specific problems:

One & lt; Fb: login-button & gt; How does the simulation of clicking element? I have come up with the best thing (but to test so far) to manually fire a click event on the element

Once there is a dialogue on Facebook, then Capoebara has its Is used? how? It is necessary to set up a testing Facebook account's email address and password and to install the Facebook app for the test account.

For that matter, how does a test manage accounts? Indicates that test users can be created and deleted with the graph API, but the API does not provide access to an email address or password for a test account, which makes them useless to test this particular flow.

I am sure that I also see other important issues. I'm sure how other people have attacked this problem!

I have been able to work with RSPC acceptable specs with the following code: < P>

This test uses Mowgli to create and destroy users and to arrange the Carrier Browser Test. I believe that you can work with cucumber by blocking the shared link and using the cucumber before / after the hook such as:

  '@fb_test_user' do @ Fb_user = create_test_user (Installed: Incorrect) End '@fb_test_user' do @fb_user.destroy The World after the end (Facebook InclLoader)    

Comments