 
     it 'Should contain button "Selaa palveluita"', (done) ->
       browser
-        .waitForElementByCss(browseButtonSelector, delay)
+        .waitForElementByCss(browseButtonSelector, delay, pollFreq)
         .click().should.be.fulfilled
         .should.notify(done)
 
     it 'Should contain list item "Terveys"', (done) ->
       browser
         .waitForElementByCss(serviceTreeItemSelector,
-          asserters.textInclude('Terveys'), delay)
+          asserters.textInclude('Terveys'), delay, pollFreq)
         .should.be.fulfilled
         .should.notify(done)
 

    it 'Should find item "Kallion kirjasto"', (done) ->
      searchText = 'kallion kirjasto'
      browser
        .waitForElementByCss(searchFieldPath, delay)
        .click()
        .type(searchText)
        .waitForElementByCss(typeaheadResultPath, asserters.textInclude("Kallion kirjasto"), delay)
        .should.be.fulfilled
        .should.notify(done)


browser = undefined
asserters = undefined

delay = 20000
errorDelay = 1000
pollFreq = 100

baseUrl = 'http://localhost:9001'
pageTitle = 'Pääkaupunkiseudun palvelukartta'
