{I" class:ETI"ProcessedAsset;FI"logical_path;TI"8social_networking/shared/new_shareable_form_spec.js;FI" pathname;TI"}/Users/usabilitymonitor/Desktop/Github/social_networking/spec/javascripts/social_networking/shared/new_shareable_form_spec.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+çnøUI" length;Ti I" digest;TI"%8538549907260fe02a918b0ede13b963;FI" source;TI" ;(function() { 'use strict'; describe('addSharingToNewShareableForm', function() { var ACTION_TYPE, ITEM_TYPE; ITEM_TYPE = 'activity'; ACTION_TYPE = 'planned'; function getFixture() { return $('#jasmine_content'); }; function getPage() { return getFixture() .find('.new-shareable-form-after-form-groups'); }; function initListener(listener) { $(document).trigger(listener); }; function setPage() { return getFixture() .append(''); }; beforeEach(function() { setPage(); }); afterEach(function() { $('#jasmine_content').empty(); }); describe('addSharingToNewShareableForm', function() { describe('on page change', function() { beforeEach(function() { initListener('page:change'); }); it('formats label for attribute', function() { expect(getPage().find('label[for=' + ITEM_TYPE + '_shared_item]').length) .toEqual(1); }); it('formats label content', function() { debugger; expect(getPage().find('label[for=' + ITEM_TYPE + '_shared_item]').text()) .toMatch('Share the content of this ' + ITEM_TYPE); }); it('formats "yes" radio input', function() { expect(getPage().find('input#' + ITEM_TYPE + '_shared_item_1[value=1]').length) .toEqual(1); }); it('formats "no" radio input', function() { expect(getPage().find('input#' + ITEM_TYPE + '_shared_item_2[value=0]').length) .toEqual(1); }); it('formats hidden inputs', function() { expect(getPage().find('[value=planned]').length) .toEqual(1); }); }); describe('on page ready', function() { beforeEach(function() { initListener('page:ready'); }); it('formats label for attribute', function() { expect(getPage().find('label[for=' + ITEM_TYPE + '_shared_item]').length) .toEqual(1); }); it('formats label content', function() { expect(getPage().find('label[for=' + ITEM_TYPE + '_shared_item]').text()) .toMatch('Share the content of this ' + ITEM_TYPE); }); it('formats "yes" radio input', function() { expect(getPage().find('input#' + ITEM_TYPE + '_shared_item_1[value=1]').length) .toEqual(1); }); it('formats "no" radio input', function() { expect(getPage().find('input#' + ITEM_TYPE + '_shared_item_2[value=0]').length) .toEqual(1); }); it('formats hidden inputs', function() { expect(getPage().find('[value=' + ACTION_TYPE + ']').length) .toEqual(1); }); }); }); }); })(); ;TI"dependency_digest;TI"%573a1edb2b74c16b94bfe9ed18e373af;FI"required_paths;T[I"m/Users/usabilitymonitor/.rvm/gems/ruby-2.2.2/gems/jquery-rails-3.1.2/vendor/assets/javascripts/jquery.js;FI"u/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/shared/new_shareable_form.js.erb;FI"}/Users/usabilitymonitor/Desktop/Github/social_networking/spec/javascripts/social_networking/shared/new_shareable_form_spec.js;FI"dependency_paths;T[{I" path;TI"}/Users/usabilitymonitor/Desktop/Github/social_networking/spec/javascripts/social_networking/shared/new_shareable_form_spec.js;F@I"2015-09-15T14:17:59-05:00;T@I"%fba395a0749fe531c3c46495b5a41816;F{@I"m/Users/usabilitymonitor/.rvm/gems/ruby-2.2.2/gems/jquery-rails-3.1.2/vendor/assets/javascripts/jquery.js;F@I"2015-04-30T09:01:47-05:00;T@I"%85fd4d116d8c32a300fc0c7d3c3afa5e;F{@I"u/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/shared/new_shareable_form.js.erb;F@I"2015-09-15T14:09:56-05:00;T@I"%c85e1c9700a6d3c99f114f9aeeb6db4d;FI" _version;TI"%069e88c06b889877799890854d7f4c40;F