
/*= require lib/utils/common_utils */

(function() {
  describe('Application', function() {
    return describe('disable buttons', function() {
      fixture.preload('application.html');
      beforeEach(function() {
        return fixture.load('application.html');
      });
      it('should prevent default action for disabled buttons', function() {
        var $button, isClicked;
        gl.utils.preventDisabledButtons();
        isClicked = false;
        $button = $('#test-button');
        $button.click(function() {
          return isClicked = true;
        });
        $button.trigger('click');
        return expect(isClicked).toBe(false);
      });
      return it('should be on the same page if a disabled link clicked', function() {
        var locationBeforeLinkClick;
        locationBeforeLinkClick = window.location.href;
        gl.utils.preventDisabledButtons();
        $('#test-link').click();
        return expect(window.location.href).toBe(locationBeforeLinkClick);
      });
    });
  });

}).call(this);

@@ -481,24 +481,59 @@
 t-button');%0A
+        expect($button).toExist();%0A
         $but
@@ -547,32 +547,32 @@
 ck(function() %7B%0A
-
           return
@@ -692,28 +692,22 @@
     %7D);%0A
- 
+%0A
      
-return
  it('sho
@@ -807,16 +807,23 @@
 inkClick
+, $link
 ;%0A      
@@ -922,16 +922,24 @@
 %0A       
+ $link =
  $('#tes
@@ -946,16 +946,64 @@
 t-link')
+;%0A        expect($link).toExist();%0A        $link
 .click()

Check for existence of elements under test in application_spec.js (!6051)