       beforeEach -> disposeDialog()
 
       it "does nothig", ->
-        expect(databasesList.column("database.name")).toContain("first_database")
-        expect(databasesList.column("database.name")).toContain("second_database")
-        expect(databasesList.column("database.name")).toContain("third_database")
+        shouldShowAllDatabases()
 
     describe "when the dialog was confirmed", ->
       beforeEach -> confirmDialog()


    it "displays all records when the filter is cleared", ->
      element("button:contains('Clear')").click()
      expect(databasesList.column("database.name")).toContain("first_database")
      expect(databasesList.column("database.name")).toContain("second_database")
      expect(databasesList.column("database.name")).toContain("third_database")

  describe "delete a database", ->
    deleteDatabase = (name) ->

describe "databases list page", ->
  databasesList = null

  shouldShowDatabase = (name) ->
    expect(databasesList.column("database.name")).toContain(name)

  shouldShowAllDatabases = ->
    shouldShowDatabase("first_database")
    shouldShowDatabase("second_database")
    shouldShowDatabase("third_database")

  beforeEach ->
    browser().navigateTo("/e2e/load_fixtures")
