title: Angular e2e tests affecting database
body: <p>Here's my issue, steb by step :)) I thought it reads better this way, unlike a wall of text pitifully trying to explain my very domain-specific problem. </p>
  
  <p>1) We have a <code>Angular.js</code> app with <code>PHP</code> back-end backed with <code>MongoDB</code> storage.   </p>
  
  <p>2) <code>Protractor</code> for End-to-end tests.  </p>
  
  <p>3) Need to test pages which alter the database, i.e. registration scenario - I'm going through all registration steps in a test, so the db gets a new user record.    </p>
  
  <p>4) Predictably, test will fail after it was run, since the db has a record for the test user and no registration is needed - user is redirected to homepage instead.</p>
  
  <p>I was thinking to get a <code>mongodb</code> package for <code>node.js</code>, and interact with a DB in tests.<br>
  But it just doesn't seem right: config files for DB connection are in a <code>php</code> files on the backend, while I'm trying to write tests for purely front-end part of our app.</p>
  
  <p>Any ideas?</p>