text: jasmine.getFixtures().fixturesPath = 'fixtures';
  
  
  describe('Payment Page', function() {
  
      var name = 'collapse';
  
      $.fn[name] = function() {};
  
      beforeEach(function() {
          loadFixtures('tmpl-payment.html');
      });
  
      it('should have loaded the correct elements', function() {
          expect($('[data-checkbox-toggle="collapse"]')).toExist();
          expect($($('[data-checkbox-toggle="collapse"]').data('target'))).toExist();
      });
  
  
      it('should toggle the address when checkbox is clicked', function() {
  
          spyOn($.fn, name);
  
          expect($.fn.collapse).not.toHaveBeenCalled();
  
          Payment.Helper.checkboxToggle();
  
          expect($.fn.collapse).toHaveBeenCalled();
  
      });
  
      xit('should update hidden input when county field is changed', function() {
          var $countyHidden = $('.js-county-hidden'),
              $county = $('.js-county'),
              county = 'Angus';
  
          $county.val(county);
  
          expect($countyHidden.val()).toEqual('');
  
          expect($countyHidden.val()).toEqual(county);
  
      });
  
  });
  
  // Security Code Functionality suite
  describe('Security Code functionality based on Card Type', function() {
  
      beforeEach(function() {
          loadFixtures('tmpl-payment.html');
      });
  
      it('should check for MANDATORY falg when function styleSecurityCodeUI called', function() {
          spyOn(Payment, 'styleSecurityCodeUI').and.callThrough();
          Payment.styleSecurityCodeUI('MANDATORY', 3);
          expect($('#jsBlCVV').length).not.toEqual(0);
  
          setFixtures('<body><div></div></body>');
          Payment.styleSecurityCodeUI('MANDATORY', 3);
          expect($('#jsBlCVV').length).toEqual(0);
  
      });
  
      it('should check for SHOW flag when function styleSecurityCodeUI called', function() {
          setFixtures('<div id="jsBlCVV"><label id="jsLabelCVV">Security code</label></div>');
          spyOn(Payment, 'styleSecurityCodeUI').and.callThrough();
          Payment.styleSecurityCodeUI('SHOW', 3);
          expect($('#jsAsterixCVV')[0]).not.toBeInDOM();
  
      });
  
      it('should check for HIDE flag when function styleSecurityCodeUI called', function() {
          setFixtures('<div></div>');
          spyOn(Payment, 'styleSecurityCodeUI').and.callThrough();
          Payment.styleSecurityCodeUI('HIDE', 4);
          expect($('#jsBlCVV')[0]).not.toBeInDOM();
      });
  
  
      it('should init securityCodeUIsetupInit and call securityCodeUIsetup payment page only', function() {
          spyOn(Payment, 'securityCodeUIsetupInit').and.callThrough();
          spyOn(Payment, 'securityCodeUIsetup').and.callThrough();
          Payment.securityCodeUIsetupInit();
          Payment.securityCodeUIsetup();
          expect(Payment.securityCodeUIsetup).toHaveBeenCalled();
  
          setFixtures('<body><div></div></body>');
          Payment.securityCodeUIsetupInit();
          Payment.securityCodeUIsetup();
          expect(Payment.securityCodeUIsetup).toHaveBeenCalled();
      });
  
      it('should track on Selectbox chnage', function() {
          spyOn(Payment, 'selectboxChange').and.callThrough();
          spyOn(Payment, 'styleSecurityCodeUI').and.callThrough();
          var spyEventSelectboxChange = spyOnEvent('#jsCardType', 'change');
  
          $('#jsCardType').trigger('change');
          expect(spyEventSelectboxChange).toHaveBeenTriggered();
          Payment.selectboxChange();
          Payment.styleSecurityCodeUI('MANDATORY', 3);
          expect(Payment.selectboxChange).toHaveBeenCalled();
          expect(Payment.styleSecurityCodeUI).toHaveBeenCalled();
  
      });
  
  });