     .done()
 
   it 'should begin a new conversation', (test_done) ->
-    $app_a = $('<div>')
-    $app_b = $('<div>')
+    identity_a_json = JSON.stringify(
+        key: FIX.PRIVATE_KEY
+        fingerprint: FIX.FINGERPRINT)
+    identity_b_json = JSON.stringify(
+        key: FIX.PRIVATE_KEY_B
+        fingerprint: FIX.FINGERPRINT_B)
 
     Q.all([
-      zc.create_app(
-        urls: zc.TESTING_URL_MAP
-        el: $app_a[0]
-        local_storage: new zc.MockLocalStorage(identity: JSON.stringify(
-          key: FIX.PRIVATE_KEY
-          fingerprint: FIX.FINGERPRINT))
-        channel: 'app_a'
-      )
-      zc.create_app(
-        urls: zc.TESTING_URL_MAP
-        el: $app_b[0]
-        local_storage: new zc.MockLocalStorage(identity: JSON.stringify(
-          key: FIX.PRIVATE_KEY_B
-          fingerprint: FIX.FINGERPRINT_B))
-        channel: 'app_b'
-      )
+      create_testing_app({identity: identity_a_json}, {channel: 'app_a'})
+      create_testing_app({identity: identity_b_json}, {channel: 'app_b'})
     ])
 
     .then ([@app_a, @app_b]) =>
       (new zc.Identity(app: @app_b)).publish()
 
     .then (url_b) =>
-      $app_a.find('.header-btn-add-contact').click()
-      $form_a = $app_a.find('.app-main > form')
+      @app_a.$el.find('.header-btn-add-contact').click()
+      $form_a = @app_a.$el.find('.app-main > form')
       $form_a.find('[name=url]').val(url_b)
       $form_a.submit()
-      zc.waitfor(-> zc.some($app_a.find('.conversation-compose form')))
+      zc.waitfor(=> zc.some(@app_a.$el.find('.conversation-compose form')))
 
     .then ($form) =>
       $form.find('[name=message]').val("hello from A")

describe 'conversation', ->

  FIX = zc.fixtures

  beforeEach (done) ->
    $.post(zc.TESTING_URL_MAP.flush, -> done())

  it 'should generate a new identity', (test_done) ->
    local_storage = new zc.MockLocalStorage()
    zc.create_app(
      urls: zc.TESTING_URL_MAP
      el: $('<div>')[0]
      local_storage: local_storage
    )
    .then (app) =>
      identity = JSON.parse(local_storage.getItem('identity'))
      expect(identity.fingerprint.length).toEqual(32)

      fingerprint: FIX.FINGERPRINT
    )

    create_testing_app(identity: identity_json)
    .then (app) =>
      identity = app.request('identity')
      app.$el.find('.header-btn-myid').click()
      app.$el.find('.myid-publish').click()
      return zc.waitfor(-> identity.get('public_url'))
    .then (public_url) =>
      expect(public_url).toContain('/id/' + FIX.FINGERPRINT)
