Running protractor from rails tests

I'm using RSpec to run uint tests on my Rails application and I would like to implement some Protractor test for the angular side of the application.

Now my questions are:

  1. How to setup so that RSpec and Protractor test are executed with one command
  2. Can I run protractor tests from RSpec test and do some server-side assertion after Protractor tests
  3. If 2) is not easy or trivial, what would be the best way to run the Protractor tests on test db and make sure it get cleaned between each run

The issue I have is that Protractor should be run against the real backend (which is actually good because I don't want to mock things) but I'm not sure how to be sure that create and update calls from my angular code actual create the data.


Questions 1 and 2:

Can't really comment much on the RSpec questions not being a rails developer, but you could try checking out following url for running the cucumber assertion framework with rspec: to give you some clues

Question 3:

Here you'll be wanting to make use of the "beforeEach" and/or "afterEach" functions to restore db state between tests. So for example in a simple case you wish your ui widget under test, say a 5 star rating widget, to have a certain state at the start of a test, say 3 stars, you make sure in the afterEach function, triggered at the end of each test, to click the 3 star element.

Need Your Help

About PDF vertical sliding from page to page in iOS

iphone ios pdf

I am work on an app that can make PDF vertical sliding in iOS using CGPDFDocumentRef.

What's the quickest/best way to format a ?double to currency for string output in C#?

c# format double

When using .ToString("{blah}") it gives an error because it's a ?double not a double... 'bad parameter' etc