       changeInputValue element, "f"
       $rootScope.$digest()
 
-      expect(document.querySelector(".mac-menu-item").innerText).toBe "foo"
+      expect(getMenuText()).toBe "foo"
 
   describe "label", ->
     it "should use default 'name' label", ->

      changeInputValue element, "f"
      $rootScope.$digest()

      expect(document.querySelector(".mac-menu-item").innerText).toBe "foo"

    it "should use a callback function returned by an invoked function", ->
      $rootScope.source = (val) ->

      $rootScope.$digest()

      changeInputValue element, "f"
      expect(getMenuText()).toBe "foo"

  describe "updateItem", ->
    it "should convert key to label", ->
