spec/javascripts/customizations_spec.js
function exampleBookFunction(element, uniqueId) {
          expect(element).not.toBeUndefined();
          expect(element.length).toBe(1);
          expect($('.inline-edit-btn-' + uniqueId).length).toBe(2); // two because there are two buttons per section
          expect($('.inline-edit-btn-' + uniqueId + '-fa-book').length).toBe(1);
          buttonSetupRunCount += 1;
        }
function exampleBookFunction(element, uniqueId) {
          expect(element).not.toBeUndefined();
          expect(element.length).toBe(1);
          expect($('.inline-edit-btn-' + uniqueId).length).toBe(2); // two because there are two buttons per section
          expect($('.inline-edit-btn-' + uniqueId + '-fa-book').length).toBe(1);
          buttonSetupRunCount += 1;
        }
function exampleBookFunction ( element , uniqueId ) { expect ( element ) . not . toBeUndefined ( ) ; expect ( element . length ) . toBe ( 1 ) ; expect ( $ ( '.inline-edit-btn-' + uniqueId ) . length ) . toBe ( 2 ) ; // two because there are two buttons per section expect ( $ ( '.inline-edit-btn-' + uniqueId + '-fa-book' ) . length ) . toBe ( 1 ) ; buttonSetupRunCount += 1 ; }
here we specify a button icon and a function to be run on it
here we specify a button icon and a function to be run on it