                 delay, pollFreq))
                 .should.notify(done)
         return
-
     describe 'Test embedded units', ->
       embeds = [
         {

          it 'Should display popup with correct street address', (done) ->
            browser
            .get(embedUrl + embed.path)
            .waitForElementByCssSelector(
                '.leaflet-popup-content > .unit-name',
                asserters.isDisplayed,
                delay,
                pollFreq,
              (err, el) ->
                el.text (err, text) -> text.should.equal(embed.name)
            )
            .should.notify done

          it 'Should display marker for address', (done) ->
            browser
              .waitForElementByCssSelector(
                '.leaflet-overlay-pane svg path.leaflet-clickable',
                asserters.isDisplayed,
                delay,
                pollFreq
              )
              .should.notify(done)


        .should.notify(done)
  describe 'Test embedding', ->
    embedUrl = baseUrl + '/embed'
    # Helper functions to get js string to be evaluated with
    # asserters.jsCondition
    isNearMapCenter = (location, delta = 1e-4) ->
      MAP_CENTER = 'app.getRegion("map").currentView.map.getCenter()'
      initialCenter =
        lat: MAP_CENTER + '.lat'
        lng: MAP_CENTER + '.lng'
      isNear = (x) =>
        'Math.abs(' + x + ') < ' + delta
      subLat = initialCenter.lat + ' - ' + location.lat
